VIM1S: emmc 23.8.4 install fails to boot after running upgrade using beta repository
Description
Environment
Checklist
hideActivity

Igor Pecovnik November 26, 2023 at 6:08 PM
We have so much code like that littered everywhere in the lib code.
I am aware … we have that / legacy parts everywhere. We need to fight this systematically, one by one.
When you bump into such code segment, make a ticket with context and if you have idea of resolution, propose one.

Gunjan Gupta November 26, 2023 at 5:10 PM
RCA: We had a sed call to change compression to gzip in armbian-bsp-cli’s preinst script which was added by lib/functions/bsp/armbian-bsp-cli-deb.sh file. This was overriding the value that present in the image.
Suggestion for future: We have so much code like that littered everywhere in the lib code. Some places even have code thats specific to a single board. I suggest we move all such things to some place else. Like for armbian specific OS customizations, move things to an extenstion. For board specific things, move them to board or family files. We should keep lib focusing on just one generic thing i.e. building deb files and rootfs. All the actual OS configuration stuff should be moved out. Thoughts?

Gunjan Gupta November 26, 2023 at 1:53 PMEdited
Found the problem. Initramfs is getting compressed with GZIP instead of XZ. We had this workaround added in config/sources/families/meson-s4t7.conf
We had added that cause for some reason, the kernel or u-boot (not sure which one has the problem) doesn’t seem to handle gzip compressed initramfs. Kernel fails to load initramfs if its compressed with GZip. And as we use filesystem UUID for identifying root device, we need an initramfs to mount root device.
It seems the above hook solves the problem when creating initramfs from build framework, but the value is doesn’t persist inside the actual image. I will try to add a post install section in bsp package to change that value. Also will see if there is another hook where we can move this logic so that value persists correctly inside image.
Edit: Value did persisted. Something is changing it back to Gzip. Trying to trace the same.

Gunjan Gupta November 26, 2023 at 12:18 AM
After spending most of the night trying to get this working, I am almost out of ideas.
Now only think I can think of is to add some script in initramfs to powercycle or reset emmc before the initramfs tries to mount the same. Will try the approach tomorrow.
Meanwhile, if anyone have any other Ideas, please let me know.

Gunjan Gupta November 25, 2023 at 11:11 PMEdited
A bit more detailed log captured with verbosity=7
and extraargs=debug
in /boot/armbian.txt
can be found at https://paste.armbian.com/cexizirasa.yaml
Details
Details
Assignee

Reporter

Steps to reproduce:
Install Armbian CLI image from oowow to emmc
Edit /etc/apt/sources.list.d/armbian.list and change from
apt.armbian.com
tobeta.armbian.com
Run
apt-get update && apt-get upgrade
reboot and see system fails to boot
Logs
Stopping uboot’s automatic booting from serial console and running `boot` to resume booting doesn’t seem to cause this Issue.