Custom D.E.O.T. V1.0+/Clockwork OS v0.4 image - With Updated Kernel 5.3.6, Latest Lima Drivers, RA1.8.1, Mupen64+ and much more! (Current version: 191122)

I prefer the your deot version, I just already had the 0.4 version installed on that card and I didn’t want to download the deot 191111 image. Applying this to the deot 191111 image shouldn’t be a problem. You could also just replace the cpi folder from the image with the deot191122 cpi folder to get a working version ( I guess the bootup screen would be wrong but everything else should work.) as I didn’t do any significant modifications to the launcher files. (it uses original .xorg_lima.conf together with another config at /etc/X11/xorg.conf.d/02_lima.conf)

Here is the Image:

Took me a bit longer because it was 64GB and pishrink.sh wouldn’t work on it so i had to manually shrink the root partition and use truncate to manually shave the image to a size of roughly 8GB. I used LZMA2 instead of Gzip for compression so I could get the image size down to 2.5GB. It will take longer to unpack but as people here where complaining about their internet connection I thought longer unpack times were preferable to a ~5GB download. It also doesn’t include an expand script yet so just get that yourself or use GParted. You can unpack it with unxz cpibusterpoc.img , xz --decompress cpibusterpoc.img on Linux or using 7zip on windows.
Also this image is hosted on my private server located in Europe so download speeds may vary. Feel free to mirror this file guys.

What does work:

  • hardware acceleration using lima kernel driver
  • Using apt to upgrade or install packages
  • Using the builtin driver switch to switch between llvmpipe(fbturbo) and Mali400(lima) renderer
  • Retroarch, Quake and all preinstalled indiegames
  • glxgears with vsync through lima

What does not work:

  • Mupen64 did crash when trying to start through the launcher but it runs fine when using this command through ssh (no clue why maybe recompile a new version?):
    $ DISPLAY=:0 /home/cpi/apps/emulators/mupen64plus --gfx mupen64plus-video-rice --fullscreen /home/cpi/games/mupen64/rom.z64
  • when Bullseye becomes stable, apt might break it again (replacing all instances of “stable” with “buster” in /etc/apt/sources.list will prevent that)
  • MPD daemon is broken and will throw errors at boot (this is because of buster, not my lima modifications. the conf file seems to use deprecated commands- shouldn’t be to hard to fix)

What I have done to make this work:

(I tried this with d.e.o.t 191111 and it doesn’t quite work as glamor defaults back to llvmpipe. I’ll check if I forgot something and update the post)

  1. Replace the existing Kernel with @shell’s 5.3.6 Kernel uImage

  2. run: sudo apt update && sudo apt upgrade
    (when asked for config overwrites check diff when in doubt keep old conf file)

  3. follow the instructions to add xorg and mesa repos:

  1. do sudo apt update && sudo apt upgrade again

  2. get the sourcecode zip from @shell’s 5.3.6 kernel and do the following:
    (assuming you have the clockwork-pi-linux-5.3.6.zip in your cpi home folder)

sudo apt install flex
unzip clockwork-pi-linux-5.3.6.zip
cd linux-5.3.6
cp ./arch/arm/configs/clockworkpi_cpi3_defconfig .config
make -j4 menuconfig
##save and exit without changing anything
make -j4
make -j4 modules
sudo make install_modules
sudo make install
  1. create lima xorg conf by doing this:
sudo mkdir /etc/X11/xorg.conf.d/
sudo nano /etc/X11/xorg.conf.d/02-lima.conf

Insert the following and save the file(by pressing ctrl+x and typing y):

Section "ServerFlags"
        Option  "AutoAddGPU" "off"
        Option "Debug" "dmabuf_capable"
EndSection

Section "OutputClass"
        Identifier "Lima"
        MatchDriver "sun4i-drm"
        Driver "modesetting"
        Option "PrimaryGPU" "true"
EndSection
  1. make sure the sun4i* modules are loaded before lima by doing this:
sudo nano /etc/modprobe.d/lima.conf

Insert the following and save the file(by pressing ctrl+x and typing y):

softdep lima pre: sun4i_drm sun4i_drm_hdmi sun4i_frontend sun4i_tcon sun8i_tcon_top sun4i_backend
  1. (might work without libdrm but make sure to mv the files)do the following things from @guu’s instructions:
## install the new libdrm
wget https://dri.freedesktop.org/libdrm/libdrm-2.4.100.tar.bz2
tar jxvf  libdrm-2.4.100.tar.bz2
cd libdrm-2.4.100
./configure --libdir=/usr/lib/arm-linux-gnueabihf
make
sudo make install
cd 
sudo mv /usr/lib/dri/sun4i_drm_dri.so /usr/lib/dri/sun4i_drm_dri.so.old

sudo mv /usr/lib/dri/sun4i-drm_dri.so /usr/lib/dri/sun4i_drm_dri.so

sudo mv  /usr/lib/lima /usr/lib/lima.old/
  1. use the Driverswitch to switch to lima and check if it worked using
inxi -G --display

(make sure you’re logged into cpi and NOT root)
if the output looks like this:

Graphics:  Device-1: sun8i-a23-mali driver: lima v: kernel 
           Device-2: sun8i-a33-display-frontend driver: sun4i_frontend v: N/A 
           Device-3: sun8i-a33-display-backend driver: sun4i_backend v: N/A 
           Device-4: sun8i-a33-display-engine driver: sun4i_drm v: N/A 
           Display: tty server: X.Org 1.20.6 driver: sun4i_drm resolution: 320x240~60Hz 
           OpenGL: renderer: Mali400 v: 2.1 Mesa 20.0.0-devel (git-07d8b98b54) 

It worked. else try

modprobe lima

and

modprobe sun4i_drm

and check again.

also check if the inxi shows Xorg version 1.20.6 and mesa 20.0.0-devel

I might try this out again with the deot 191111 image. If this doesn’t work right at all I might’ve forgot something but I think this was all I did. It was necessary to reboot a couple of times and modprobe lima until it starts working but after that it worked perfectly.

5 Likes