Apt full-upgrade | Getting the new software updates from Debian
- Alex

- May 18, 2020
- 4 min read
This article is at: https://forum.clockworkpi.com/t/apt-full-upgrade-getting-the-new-software-updates-from-debian/5664
By Joao_Manoel
Hello,
I couldn’t work on the device for a few months, but yesterday I tried do finally upgrade to the new Debian. I tried it before and I remember that it didn’t go well. I got a lot of problems and I didn’t get the lima driver working even compiling everything myself. In the end, I gave up.
So I invested a lot of time yesterday, and today to understand what was made to get the lima driver working with X11. I know that getting everything working was difficult but if only a few know what was done it is difficult for people to keep updating it if we don’t have much experience.
I found many duplicated libraries, strange modifications in the kernel, but it looks like I could understand most of it. Maybe from now, we can run mainline Debian without modifications, and in the near future, I can create a bare minimal Debian for the clockworkpi without many unnecessary packages installed.
The first thing to do is to create a backup of your sdcard if something goes wrong. It is likely I forgot one or two steps, but the trick ones should be here.
The first thing to note is that to get the mesa working from a Debian package we need to use Debian 11 or sid, as is documented here:
I decided to go all the way to sid, so we get the new updates from mesa as soon it goes out without the need to be compiling everything myself. The idea is to go closer to a official Debian release with full package manager, so we leave the updating process to them.
So I modified my sources.list to point to the official sid repo:
deb http://deb.debian.org/debian unstable main contrib
deb-src http://deb.debian.org/debian unstable mainI only have these two lines. so we can run:
sudo apt update
sudo apt full-upgradeI recommend using tmux or screen when running it. It will take about 30 minutes or more to complete and it is possible that the device gets unresponsive, the connection can drop… I wouldn’t recommend to reboot it in the middle. If the connection drops, try to connect a physical keyboard via USB, go to the terminal and reinitialize the upgrade. During the installation, it will ask about keeping or creating new configuration files, and I choose to keep.
Just to remind: Debian will try to install another kernel, but it won’t work on the cpi. So it is better to not have the /boot mounted during this process so we don’t give the chance to the package manager delete our kernel/dtbos and we end up not able to boot after. It is an easy fix, but better avoid.
After everything completed, you can restart and comes the fun part. The lima driver stops to work, but everything else still running.
If you run glxgears will see that it is software rendering, but the mesa installed is the 20.0.6 so, should be able to work with lima.
I recompiled mesa and xserver countless times to understand why. So I think the first thing to do is to give permission to the cpi user to use the direct rendering hardware (DRI). For some reason that I don’t really know my user (cpi) loosed this permission. I suspect that the Debian upgrade did it. Probably they don’t expect the user to start the X, normally it is done with a desktop manager loaded before.
sudo usermod -a -G render cpi
sudo usermod -a -G video cpiWith this you should be able to get kmscube running well with the lima driver, and if you don’t use X at all (like me) you are fine.
but if try to use X11 you should be getting the following error:
[ 41.187] (EE) AIGLX error: sun4i-drm does not export required DRI extension
[ 41.332] (II) IGLX: Loaded and initialized swrastand you are using software rendering instead. After hours debugging I found why: The xserver doesn’t recognize drivers with hyphen in the name, like our driversun4i-drm. After founding this problem I understood why in the kernel compilation patch from here:
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index dab2914fa293..7d7d0bb490b8 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1106,6 +1106,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \
sun8i-h3-orangepi-zero-plus2.dtb \
sun8i-h3-rervision-dvk.dtb \
sun8i-r16-bananapi-m2m.dtb \
+ sun8i-r16-clockworkpi-cpi3.dtb \
+ sun8i-r16-clockworkpi-cpi3-hdmi.dtb \
sun8i-r16-nintendo-nes-classic.dtb \
sun8i-r16-nintendo-super-nes-classic.dtb \
sun8i-r16-parrot.dtb \
diff --git a/arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3-hdmi.dts b/arch/arm/boot/dts/
sun8i-r16-clockworkpi-cpi3-hdmi.dts new file mode 100644
index 000000000000..22ba16fccb2f
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-r16-clockworkpi-cpi3-hdmi.dts
@@ -0,0 +1,372 @@
+/*they change the driver name to sun4i_drm on line 4816. I removed this section of my kernel so the kernel asks for the correct driver name sun4i-drm, the same generated by mesa, otherwise we have to create endless symbolic links to avoid this problem.
Fortunately I found the solution in one patch that address our problem without the need to modify the kernel. It is from one month ago:
This pacth is already in the master, and it should be available in the Debian repository xserver-xorg-core 1.20.9 when it comes out in a few weeks. But since I found the patch I added it to the deb source and generated my package xserver-xorg-core_1.20.8 with the patch applied.
I installed it with:
sudo dpkg -i xserver-xorg-core_1.20.8-2_armhf.debIf someones ask I can provide the deb file. The good news is that it will be soon an official package, so no need to compile ourselves. But you need a kernel without the driver name change like mine.
I have my kernel here:
After my patched package installation I got X with hardware acceleration:
[ 30.666] (II) AIGLX: Loaded and initialized sun4i-drm
[ 30.666] (II) GLX: Initialized DRI2 GL provider for screen 0If you run now glxheads, you should get:
cpi@clockworkpi:~$ DISPLAY=:0 glxheads
glxheads: exercise multiple GLX connections (any key = exit)
Usage:
glxheads xdisplayname ...
Example:
glxheads :0 mars:0 venus:1
Name: :0
Display: 0x493c00
Window: 0x600002
Context: 0x4c99f8
GL_VERSION: 2.1 Mesa 20.0.6
GL_VENDOR: lima
GL_RENDERER: Mali400and a very satisfying apt update
cpi@clockworkpi:~$ cat /etc/issue
Debian GNU/Linux bullseye/sid \n \l
cpi@clockworkpi:~$ uname -a Linux clockworkpi 5.5.0-clockworkpi-cpi3-g33b40134e-dirty #8 SMP Wed Feb 5 22:33:14 CET 2020 armv7l GNU/Linux
cpi@clockworkpi:~$ sudo apt update
Hit:1 http://deb.debian.org/debian unstable InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.I hope this can be usefull to someone with similar problems, and help future updates on the gameshell.



Nếu nhìn từ tổng thể vận hành, mình thấy https://v8ab.design/ đang theo đuổi hướng phát triển cân bằng giữa trải nghiệm người dùng và khả năng xử lý hệ thống. Việc duy trì tốc độ ổn định khi truy cập nhiều chuyên mục cùng lúc cho thấy nền tảng đã tối ưu khá tốt về mặt kỹ thuật. Đây là yếu tố giúp hệ thống giữ được sự ổn định trong môi trường cạnh tranh cao
I like posts like this because software updates always sound simple until you are the one trying to keep systems stable, avoid bad surprises, and make sure nothing important breaks halfway through. That practical side matters more than people admit. It is also why https://da-com.com/ fits this theme for me. Good technology is one thing, but steady support, organized systems, and people who can help when updates get messy are what keep everyday work moving.
Trong quá trình tìm hiểu F168, tôi quan tâm nhiều hơn đến phần quản lý thông tin người dùng thay vì chỉ tập trung vào nội dung giải trí. Các mục như xác minh tài khoản, bảo mật đăng nhập, lịch sử hoạt động và thông báo hệ thống được hiển thị tương đối rõ ràng. Tôi nghĩ người dùng nên chú ý thêm điều khoản sử dụng và khả năng tự kiểm soát dữ liệu cá nhân trong suốt quá trình trải nghiệm
Trong lúc khám phá UU88 SLOT, tôi quan tâm nhiều hơn đến trải nghiệm sử dụng thực tế thay vì chỉ nhìn vào giao diện trò chơi. Những phần như xác minh tài khoản, cài đặt bảo mật, hỗ trợ khách hàng và lịch sử hoạt động được trình bày khá dễ hiểu với người mới. Nếu nhìn theo hướng review nhẹ, tôi nghĩ người dùng cũng nên chú ý thêm đến điều khoản sử dụng và khả năng tự theo dõi dữ liệu cá nhân trong quá trình thao tác
Việc sử dụng các nền tảng giải trí trực tuyến hiện nay thường yêu cầu hệ thống có khả năng xử lý ổn định khi người dùng truy cập đồng thời nhiều khu vực trò chơi khác nhau trong cùng một thời điểm. Những nền tảng có cách tổ chức rõ ràng sẽ giúp thao tác trở nên dễ theo dõi hơn và giảm cảm giác phức tạp trong quá trình sử dụng liên tục. Khi trải nghiệm thực tế, https://luck8com.top/ cho phép người dùng truy cập vào các danh mục như casino trực tuyến, thể thao, slot nổ hũ, game bài và xổ số khá thuận tiện và duy trì sự ổn định khi chuyển đổi giữa nhiều nội…