Your message dated Sat, 14 Mar 2020 18:48:59 +0000
with message-id <[email protected]>
and subject line Bug#939727: fixed in raspi3-firmware 1.20190215-1+deb10u3
has caused the Debian Bug report #939727,
regarding raspi3-firmware: copy DTB blobs for original Model B and other old
boards
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
939727: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939727
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: raspi3-firmware
Version: 1.20190215-1
Dear Maintainer,
Can you please add support for original Raspberry Pi boards (the ones
which precede the Pi 2, Pi 3, and Pi 4)?
In my case, I'm using a Raspberry Pi Model B revision 2, and I can get
Debian Buster on armel to work nearly out of the box by using
linux-image-rpi and raspi3-firmware. However, the bcm2835-rpi-b.dtb
blob provided by linux-image-4.19.0-5-rpi isn't installed by the
kernel postinst.d script supplied in raspi3-firmware, so the Pi
doesn't boot. (I didn't have a monitor or TV easily available to
connect to the Pi, so I don't know exactly what was on-screen, but it
never booted to a state where I could ping it.)
If I write a custom postinst.d script to copy bcm2835-rpi-b.dtb
similarly to how the raspi3-firmware postinst.d script copies other
DTB files (and to the correct destination file name), or if I modify
the packaged script directly to do the same, then the system is made
bootable (after running the script manually, or reinstalling the
kernel or raspi3-firmware packages, of course).
I've included an example patch below against the version in Buster
which adds support for my board (pi1b_dtb; bcm2835-rpi-b.dtb =>
/boot/firmware/bcm2708-rpi-b.dtb), and which I think will also add
support for the non-wireless Pi Zero and the Pi Compute Module 1.
I notice that the kernel ships with DTB blobs named after the Broadcom
package part numbers (e.g. BCM2835) while the Raspberry Pi bootloader
expects to find the files named after the silicon used (e.g. BCM2708).
While modifying the existing postinst.d script, I noticed that the
script changes the name when it installs firmware for the Pi 2 Model
B, Pi 3 Model B, and the Pi 3 Model B+. However, it keeps the old
name for the Pi Zero W, Pi Model A+, Pi Model B+.
For example, instead of installing:
/boot/firmware/bcm2708-rpi-b-plus.dtb
This file gets installed under its original name as shipped by the
kernel:
/boot/firmware/bcm2835-rpi-b-plus.dtb
Because of this, I have doubts that the system will be bootable on
these last three platforms, but I haven't verified this. In my
example patch below, I add new copy commands with what I think are the
correct destination file names for these three platforms (based on the
DTB blob file names in the official Rasperry Pi firmware repository at
https://github.com/raspberrypi/firmware/tree/master/boot), but to be
conservative I left the original copy commands alone. Do you know
which style of file name is correct? If so, can you please keep
whichever copy commands are supposed to be there and remove the ones
which are not?
--- /etc/kernel/postinst.d/z50-raspi3-firmware.dpkg-dist 2019-02-17
19:59:36.000000000 -0800
+++ /etc/kernel/postinst.d/z50-raspi3-firmware 2019-09-07
22:40:49.059041364 -0700
@@ -64,16 +64,25 @@
fi
if [ "$KERNEL" = "auto" ]; then
+ pi0_dtb=${dtb_path}/bcm2835-rpi-zero.dtb
pi0w_dtb=${dtb_path}/bcm2835-rpi-zero-w.dtb
pi1ap_dtb=${dtb_path}/bcm2835-rpi-a-plus.dtb
+ pi1b_dtb=${dtb_path}/bcm2835-rpi-b.dtb
pi1bp_dtb=${dtb_path}/bcm2835-rpi-b-plus.dtb
+ picm1_dtb=${dtb_path}/bcm2835-rpi-cm1-io1.dtb
pi2b_dtb=${dtb_path}/bcm2836-rpi-2-b.dtb
pi3b_dtb=${dtb_path}/bcm2837-rpi-3-b.dtb
pi3bp_dtb=${dtb_path}/bcm2837-rpi-3-b-plus.dtb
+ [ -e "${pi0_dtb}" ] && cp "${pi0_dtb}" /boot/firmware/bcm2708-rpi-zero.dtb
[ -e "${pi0w_dtb}" ] && cp "${pi0w_dtb}"
/boot/firmware/bcm2835-rpi-zero-w.dtb
+ [ -e "${pi0w_dtb}" ] && cp "${pi0w_dtb}"
/boot/firmware/bcm2708-rpi-zero-w.dtb
[ -e "${pi1ap_dtb}" ] && cp "${pi1ap_dtb}"
/boot/firmware/bcm2835-rpi-a-plus.dtb
+ [ -e "${pi1ap_dtb}" ] && cp "${pi1ap_dtb}"
/boot/firmware/bcm2708-rpi-a-plus.dtb
+ [ -e "${pi1b_dtb}" ] && cp "${pi1b_dtb}" /boot/firmware/bcm2708-rpi-b.dtb
[ -e "${pi1bp_dtb}" ] && cp "${pi1bp_dtb}"
/boot/firmware/bcm2835-rpi-b-plus.dtb
+ [ -e "${pi1bp_dtb}" ] && cp "${pi1bp_dtb}"
/boot/firmware/bcm2708-rpi-b-plus.dtb
+ [ -e "${picm1_dtb}" ] && cp "${picm1_dtb}" /boot/firmware/bcm2708-rpi-cm.dtb
[ -e "${pi2b_dtb}" ] && cp "${pi2b_dtb}" /boot/firmware/bcm2709-rpi-2-b.dtb
[ -e "${pi3b_dtb}" ] && cp "${pi3b_dtb}" /boot/firmware/bcm2710-rpi-3-b.dtb
[ -e "${pi3bp_dtb}" ] && cp "${pi3bp_dtb}"
/boot/firmware/bcm2710-rpi-3-b-plus.dtb
In the meantime (and in-case a fix can't be published to Buster), I've
attached the /etc/kernel/postinst.d and /etc/kernel/postrm.d scripts
I'm using as a workaround, in-case it helps anybody else.
Thanks for looking into this!
-- System Information:
Debian Release: 10.0
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: armel (armv6l)
Kernel: Linux 4.19.0-5-rpi
Kernel taint flags: TAINT_CRAP
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to
en_US.UTF-8), LANGUAGE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages raspi3-firmware depends on:
ii dosfstools 4.1-2
raspi3-firmware recommends no packages.
raspi3-firmware suggests no packages.
-- Configuration Files:
/etc/default/raspi3-firmware changed:
ROOTPART=UUID=7ffc98fc-1970-4289-a7ed-d89c844c3675
-- no debconf information
--
J.P. Larocque <[email protected]>
#!/bin/sh
set -e
# Play nice when run under debconf.
exec </dev/null >&2
eval set -- "$DEB_MAINT_PARAMS"
# Only run on configure and remove to avoid unnecessary work.
case "$1" in
configure|remove)
;;
*)
exit 0
;;
esac
if ischroot ; then
true # chroot detected - skip mount point check
elif test -e /usr/bin/systemd-detect-virt && systemd-detect-virt -q ; then
true # virtualization detected - skip mount point check
elif ! mountpoint -q /boot/firmware; then
echo "raspi3-firmware: missing /boot/firmware, did you forget to mount it?"
>&2
exit 1
fi
latest_kernel=$(ls -1 /boot/vmlinuz-* | grep -v '\.dpkg-bak$' | sort -V -r |
head -1)
if [ -z "$latest_kernel" ]; then
echo "raspi3-firmware: no kernel found in /boot/vmlinuz-*, cannot populate
/boot/firmware"
exit 0
fi
# Default configurations, overridable at /etc/default/raspi3-firmware
KERNEL="auto"
if [ -r /etc/default/raspi3-firmware ]; then
. /etc/default/raspi3-firmware
fi
# copy and rename the available device tree binaries
# the bootloader will pick the right device tree binary
# if it is named according to the system on chip family name
arch=$(dpkg --print-architecture)
if [ "arm64" = "$arch" ]; then
dtb_path="/usr/lib/linux-image-${latest_kernel#/boot/vmlinuz-}/broadcom"
else
# there is no vendor subdirectory for armhf
dtb_path="/usr/lib/linux-image-${latest_kernel#/boot/vmlinuz-}"
fi
if [ "$KERNEL" = "auto" ]; then
pi0_dtb=${dtb_path}/bcm2835-rpi-zero.dtb
pi0w_dtb=${dtb_path}/bcm2835-rpi-zero-w.dtb
pi1ap_dtb=${dtb_path}/bcm2835-rpi-a-plus.dtb
pi1b_dtb=${dtb_path}/bcm2835-rpi-b.dtb
pi1bp_dtb=${dtb_path}/bcm2835-rpi-b-plus.dtb
pi1cm_dtb=${dtb_path}/bcm2835-rpi-cm1-io1.dtb
[ -e "${pi0_dtb}" ] && cp "${pi0_dtb}" /boot/firmware/bcm2708-rpi-zero.dtb
[ -e "${pi0w_dtb}" ] && cp "${pi0w_dtb}"
/boot/firmware/bcm2708-rpi-zero-w.dtb
[ -e "${pi1ap_dtb}" ] && cp "${pi1ap_dtb}"
/boot/firmware/bcm2708-rpi-a-plus.dtb
[ -e "${pi1b_dtb}" ] && cp "${pi1b_dtb}" /boot/firmware/bcm2708-rpi-b.dtb
[ -e "${pi1bp_dtb}" ] && cp "${pi1bp_dtb}"
/boot/firmware/bcm2708-rpi-b-plus.dtb
[ -e "${pi1cm_dtb}" ] && cp "${pi1cm_dtb}" /boot/firmware/bcm2708-rpi-cm.dtb
fi
#!/bin/sh
exec /etc/kernel/postinst.d/"$(basename "$0")" "$@"
--- End Message ---
--- Begin Message ---
Source: raspi3-firmware
Source-Version: 1.20190215-1+deb10u3
Done: Gunnar Wolf <[email protected]>
We believe that the bug you reported is fixed in the latest version of
raspi3-firmware, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Gunnar Wolf <[email protected]> (supplier of updated raspi3-firmware package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Thu, 12 Mar 2020 12:30:45 -0600
Source: raspi3-firmware
Architecture: source
Version: 1.20190215-1+deb10u3
Distribution: buster
Urgency: medium
Maintainer: pkg-raspi <[email protected]>
Changed-By: Gunnar Wolf <[email protected]>
Closes: 939727
Changes:
raspi3-firmware (1.20190215-1+deb10u3) buster; urgency=medium
.
* Fix dtb names mismatch in z50-raspi-firmware and add new option
upstream_kernel=1 to the config.txt. These two changes allow for the
correct boot on RPi families 1 and 0. Thanks to Valentin Vidic for the
fix! (Closes: #939727)
Checksums-Sha1:
bdd7252cd743aa3cd29832e5c7010f97c5abc640 1575
raspi3-firmware_1.20190215-1+deb10u3.dsc
d3b366b6ffe39f71211692ff8edf40526babd852 23384
raspi3-firmware_1.20190215-1+deb10u3.debian.tar.xz
70292baba9102efc9565f9f21373f328c7060387 6343
raspi3-firmware_1.20190215-1+deb10u3_source.buildinfo
Checksums-Sha256:
f2c661c9c8fa8b116038275d0e2e47f216b733eb60c2b5ee3dd174c615956db1 1575
raspi3-firmware_1.20190215-1+deb10u3.dsc
f0d5c20008a3775e3d0ffccebafa2bfb4cae1a2bc79f26564fbca8d1a5945823 23384
raspi3-firmware_1.20190215-1+deb10u3.debian.tar.xz
7d3ab0bbbc145278f1bbeb044aabdcbb452e5489e55303e8957c9144ab5987bc 6343
raspi3-firmware_1.20190215-1+deb10u3_source.buildinfo
Files:
b858cd60a42049706e786ac7e555e766 1575 non-free/misc optional
raspi3-firmware_1.20190215-1+deb10u3.dsc
198178f322fb4416dc49dcd1a967b598 23384 non-free/misc optional
raspi3-firmware_1.20190215-1+deb10u3.debian.tar.xz
587c285314d85c866eba7304cd1abf60 6343 non-free/misc optional
raspi3-firmware_1.20190215-1+deb10u3_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iHUEARYIAB0WIQRgswk9lhCOXLlxQu/i9jtDU/RZiQUCXmupFgAKCRDi9jtDU/RZ
iaJaAQCjgbcx63t/OL3g5wXqtPoi8eStUQofAIgIwuLiVHmNtQEA19QFnhEb5KPP
RWD+Fz69Kx2fYulZjYdAOu9x7fNTWw4=
=2eUY
-----END PGP SIGNATURE-----
--- End Message ---