site  contact  subhomenews

Bringing back run GTK apps in the initrd

January 23, 2023 — BarryK

This is the latest post about gui_engine, the ongoing saga to run GUI apps in the initrd:

https://bkhome.org/news/202301/guiengine-project-put-on-hold.html

...that one has been put on hold. However, there is another solution, that I developed back in 2019, to setup an aufs layer with 'easy.sfs' in the initrd, then chroot onto it. Then run the Xorg server and hence run any GUI app.

Googled for a post on that, had trouble finding the right keywords, then found it, posted March 2019:

https://bkhome.org/news/201903/xorg-gui-running-in-initrd.html

A photo from above post:

img1

A problem I had with that, is all Xorg versions after 1.19.7 do not work in the initrd. Let's see, yes, here are posts about that:

https://bkhome.org/www/news/202105/glibc-bumped-to-233-in-openembedded.html

https://bkhome.org/news/201908/progress-heading-toward-buster-21.html

For the upcoming Kirkstone-series, decided to compile Xorg version 1.19.7 very cutdown, to run on the Linux framebuffer only, and with minimal drivers. This is how I compiled Xorg:

# mkdir build
# cd build
# ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=x86_64-pc-linux-gnu --with-sha1=libc \
--with-systemd-daemon=no --with-fontrootdir=/usr/share/fonts --with-fontmiscdir=/usr/share/fonts/misc \
--with-fontttfdir=/usr/share/fonts/TTF --with-fonttype1dir=/usr/share/fonts/Type1 --without-xsltproc \
--without-fop --without-xmlto --without-doxygen --disable-secure-rpc --disable-ipv6 --disable-tcp-transport \
--disable-xshmfence --disable-libunwind --disable-kdrive --disable-glamor --disable-xwin --disable-xwayland \
--disable-xquartz --disable-xnest --disable-xvfb --disable-dmx --enable-xorg --disable-suid-wrapper \
--enable-systemd-logind=no --disable-linux-apm --disable-linux-acpi --enable-pciaccess --disable-clientids \
--disable-libdrm --disable-int10-module --disable-vbe --disable-xfree86-utils --disable-vgahw \
--disable-config-wscons --disable-config-hal --disable-config-udev --disable-dpms --disable-xf86bigfont \
--disable-dbe --disable-tslib --disable-xace --disable-xf86vidmode --disable-xinerama --disable-present \
--disable-dri3 --disable-dri2 --disable-dri --disable-glx --disable-xdm-auth-1 --disable-xdmcp \
--disable-screensaver --disable-dga --disable-xvmc --disable-xv --disable-record --disable-mitshm \
--disable-composite --disable-listen-tcp --disable-unit-tests --disable-devel-docs --disable-docs \
--without-dtrace --disable-selective-werror --enable-shared --disable-static
# make
# new2dir make install

Also compiled these:

xf86-input-keyboard 1.9.0
xf86-input-mouse 1.9.2
xf86-video-fbdev 0.5.0

And made it into a PET, named 'xserver-fb-1.19.7-kirkstone64.pet'. The files in this PET are in /usr/lib/xorg-fb, so although the PET will be included in the build of EasyOS, it won't interfere with the normal Xorg.

It is only in the initrd, after the aufs layer is setup, using 'easy.sfs', after chroot onto it, the contents of /usr/lib/xorg-fb can be copied to replace /usr/lib/xorg, and then the Xorg server started.

Have created the PET, not tested yet.   

Tags: easy