Package: raspi-firmware
Version: 1.20200601-2
Severity: important

/etc/kernel/postinst.d/z50-raspi-firmware will fail in the following
situations:

1) findmnt fails.  It attempts to mitigate this:

ROOTPART=`findmnt -n --output=source /`
if [ -z "$ROOTPART" ]; then ROOTPART=/dev/mmcblk0p2;fi

But findmnt will exit 1 and fail -e, so this is needed:

ROOTPART=`findmnt -n --output=source / || true`
if [ -z "$ROOTPART" ]; then ROOTPART=/dev/mmcblk0p2;fi

2) dtbs don't exist for kernel being considered:

  for dtb in ${dtb_path}/bcm*.dtb; do
    [ -e "${dtb}" ] && cp "${dtb}" /boot/firmware/

[ will exit 1 in that case and fail -e, so we need to flip the test:

  for dtb in ${dtb_path}/bcm*.dtb; do
    [ -e "${dtb}" ] || continue
    cp "${dtb}" /boot/firmware/

Context: live-build pulls in all packages which have files in
/lib/firmware, so raspi-firmware is installed in the arm64/armel chroot
it's building, even though it's not necessarily targeting raspi hardware
or kernel.

Thank you!

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to