[FFe] flash-kernel displays wrong "selected" DTB on various Pi models
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
flash-kernel (Ubuntu) |
Fix Released
|
Undecided
|
Dave Jones |
Bug Description
[ Impact ]
flash-kernel displays a "selected" DTB at the top of its output. On a Pi this isn't actually that relevant as it goes on to copy every DTB associated with the kernel anyway, but this is still confusing for users, especially when they see a completely different board model than the one they expected (e.g. at present on the Pi 400 or Pi 5, the output will indicate that the rpi-4-b dtb is being used).
[ Test Plan ]
* Boot a mantic daily image on an affected model of Pi (400, 5, CM3, CM3+, Zero 2W)
* Run "sudo flash-kernel" and confirm it outputs "Using DTB: bcm2711-
* Enable the -proposed pocket and "sudo apt update"
* "sudo apt install flash-kernel" to update flash-kernel to the proposed version
* Run "sudo flash-kernel" and confirm it outputs the correct DTB for the selected model of Pi.
[ Regression Potential ]
Low; the existing flash-kernel already copies all DTBs found and the proposed one will too (all Pi related entries use "Method: pi", the method isn't changing in its behaviour, the only db entries that are changing are Pi related). Thus the worst-case scenario is that flash-kernel continues to output the "wrong" DTB at the top of its output, which is no worse than the present situation.
[ Original Description ]
flash-kernel probably shouldn't even be dealing with the DTBs on Pi but it's picking the wrong one for some machine models. For example on a Raspberry Pi 400 Rev 1.0 it uses bcm2711-
It's probably because in /usr/share/
Machine: Raspberry Pi *
is listed before these above mentioned models (and others as well).
Changed in flash-kernel (Ubuntu): | |
assignee: | nobody → Dave Jones (waveform) |
summary: |
- flash-kernel installs wrong DTB on Pi + [FFe] flash-kernel displays wrong "selected" DTB on various Pi models |
description: | updated |
Changed in flash-kernel (Ubuntu): | |
milestone: | none → ubuntu-23.10 |
The problem is reproducible:
Create file /etc/flash- kernel/ machine with content
Raspberry Pi 400 Rev 1.0
on any arm64 system and run flash-kernel:
$ sudo flash-kernel $(uname -r) 6.2.0-1013- raspi/device- tree/broadcom/ bcm2711- rpi-4-b. dtb into /boot/dtbs/ 6.2.0-1013- raspi/. /bcm2711- rpi-4-b. dtb rpi-4-b. dtb. rpi-4-b. dtb.
Using DTB: bcm2711-rpi-4-b.dtb
Installing /lib/firmware/
Taking backup of bcm2711-
Installing new bcm2711-
flash-kernel: installing version 6.2.0-1013-raspi
The following change is enough to fix the issue: flash-kernel/ db/all. db 2023-10-02 11:46:14.211402418 +0000
--- db/all.db 2023-06-22 14:18:53.000000000 +0000
+++ /usr/share/
@@ -1823,7 +1805,7 @@
Machine: Raspberry Pi 4 Model B Rev 1.2
Machine: Raspberry Pi 4 Model B Rev 1.4
Machine: Raspberry Pi 4 Model B Rev 1.5
-Machine: Raspberry Pi *
+Machine: Raspberry Pi 4 *
Kernel-Flavors: raspi raspi-nolpae
Method: pi
DTB-Id: bcm2711-rpi-4-b.dtb