cm4 2021 version failed to boot on 20.04 after an automatic security update

Bug #1992671 reported by soft
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-raspi (Ubuntu)
New
Undecided
Unassigned
Focal
New
Undecided
Unassigned

Bug Description

The new CM4 (2021), which has UKCA sign on the board, here is its cpuinfo :
Hardware : BCM2835
Revision : b03141
Model : Raspberry Pi Compute Module 4 Rev 1.1

Once it is connected to internet, the security patch creates in /boot
lrwxrwxrwx 1 root root 43 Oct 12 14:31 dtb-5.4.0-1071-raspi -> dtbs/5.4.0-1071-raspi/./bcm2711-rpi-4-b.dtb

At the same time, in /boot/firmware, all .elf files and .dat files are backed up and replaced. The new files make the next boot crash. If we connect it to screen, it shows that the cm4 needs new software to boot.

The fix from our side is to mount as usb disk and replace all .elf and .dat files by the latest here :
https://github.com/raspberrypi/firmware/tree/master/boot
and then it can boot again.

On CM4 (2020) this security patch doesn't crash on boot.
Revision : b03140
Model : Raspberry Pi Compute Module 4 Rev 1.0

Here is the product change note : https://pip.raspberrypi.com/categories/645

This bug seems to be introduced before, the 1070 patch cause the same boot problem already.

Revision history for this message
Juerg Haefliger (juergh) wrote :

I don't understand. Does the system work initially but then stops working after an update?
If so, can you post the output of 'dpkg -l' from before the update and after the update?

Changed in linux-raspi (Ubuntu):
status: New → Incomplete
Revision history for this message
soft (olcsoft) wrote :
Download full text (12.7 KiB)

You are right. It fails to boot after an update.
We can reproduce the problem since we backed up all partitions of last working CM4.
As you can see, on the Oct 13 at 19:25, the /firmware has got some new 1071 version records, meanwhile all .elf and .dat files in /boot/firmware are replaced. Since we can fix the boot problem by replacing those .elf and .dat files by those from latest rpi official firmware, this leads us to think those updates are broken for this specific CM4 version.(at the front side it prints UKCA CE and at the back side it prints copyright raspberry pi 2021)

## here is before update

$ ls -lha /boot
drwxr-xr-x 4 root root 4.0K May 23 16:20 .
drwxr-xr-x 21 root root 4.0K Oct 13 17:58 ..
-rw------- 1 root root 4.0M Jul 15 2021 System.map-5.4.0-1041-raspi
-rw------- 1 root root 4.0M Jul 29 2021 System.map-5.4.0-1042-raspi
-rw-r--r-- 1 root root 215K Jul 15 2021 config-5.4.0-1041-raspi
-rw-r--r-- 1 root root 215K Jul 29 2021 config-5.4.0-1042-raspi
lrwxrwxrwx 1 root root 43 Aug 27 2021 dtb -> dtbs/5.4.0-1042-raspi/./bcm2711-rpi-4-b.dtb
lrwxrwxrwx 1 root root 43 Aug 6 2021 dtb-5.4.0-1041-raspi -> dtbs/5.4.0-1041-raspi/./bcm2711-rpi-4-b.dtb
lrwxrwxrwx 1 root root 43 Aug 27 2021 dtb-5.4.0-1042-raspi -> dtbs/5.4.0-1042-raspi/./bcm2711-rpi-4-b.dtb
drwxr-xr-x 8 root root 4.0K Aug 27 2021 dtbs
drwxr-xr-x 4 root root 6.5K Jan 1 1970 firmware
lrwxrwxrwx 1 root root 27 Aug 27 2021 initrd.img -> initrd.img-5.4.0-1042-raspi
-rw-r--r-- 1 root root 29M Aug 6 2021 initrd.img-5.4.0-1041-raspi
-rw-r--r-- 1 root root 29M Aug 27 2021 initrd.img-5.4.0-1042-raspi
lrwxrwxrwx 1 root root 27 Aug 27 2021 initrd.img.old -> initrd.img-5.4.0-1041-raspi
lrwxrwxrwx 1 root root 24 Aug 27 2021 vmlinuz -> vmlinuz-5.4.0-1042-raspi
-rw------- 1 root root 8.1M Jul 15 2021 vmlinuz-5.4.0-1041-raspi
-rw------- 1 root root 8.1M Jul 29 2021 vmlinuz-5.4.0-1042-raspi
lrwxrwxrwx 1 root root 24 Aug 27 2021 vmlinuz.old -> vmlinuz-5.4.0-1041-raspi

$ ls -lha /boot/firmware
...
drwxr-xr-x 2 root root 38K Aug 27 2021 overlays
-rwxr-xr-x 1 root root 2.9M Aug 9 12:02 start.elf
-rwxr-xr-x 1 root root 2.2M Aug 9 12:02 start4.elf
-rwxr-xr-x 1 root root 783K Aug 9 12:02 start4cd.elf
-rwxr-xr-x 1 root root 3.6M Aug 9 12:02 start4db.elf
-rwxr-xr-x 1 root root 2.9M Aug 9 12:02 start4x.elf
-rwxr-xr-x 1 root root 783K Aug 9 12:02 start_cd.elf
-rwxr-xr-x 1 root root 4.6M Aug 9 12:02 start_db.elf
-rwxr-xr-x 1 root root 3.6M Aug 9 12:02 start_x.elf
-rwxr-xr-x 1 root root 327 Feb 1 2021 syscfg.txt
-rwxr-xr-x 1 root root 503K Feb 1 2021 uboot_rpi_3.bin
...

$dpkg -l
...
ii linux-firmware 1.187.11 all Firmware for Linux kernel drivers
ii linux-firmware-raspi2 3-0ubuntu2~20.04.1 arm64 Raspberry Pi 2/3/4 GPU firmware and bootloaders
ii linux-headers-5.4.0-1041-raspi 5.4.0-1041.45 arm64 Linux kernel headers for version 5.4.0 on ARMv8 SMP
ii linux-headers-5.4.0-1042-raspi 5.4.0-1042.46 arm64 Linux kernel he...

soft (olcsoft)
Changed in linux-raspi (Ubuntu):
status: Incomplete → New
soft (olcsoft)
summary: - cm4 2021 version failed to boot on 20.04
+ cm4 2021 version failed to boot on 20.04 after an automatic security
+ update
Revision history for this message
Juerg Haefliger (juergh) wrote :

*.elf and *.dat files are provided by package linux-firmware-raspi2 not the kernel. You have an old version installed (3-0ubuntu2~20.04.1 ). Can you update that to the latest version from the archive (6-0ubuntu0~20.04.1):

$ apt update && apt install linux-firmware-raspi2

That version should have support for the new CM4 board.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.