[Pkg-raspi-maintainers] Bug#971748: raspi-firmware: architecture misunderstood by /etc/kernel/postinst.d/z50-raspi-firmware

Ryutaroh Matsumoto ryutaroh at ict.e.titech.ac.jp
Tue Oct 6 13:19:26 BST 2020


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

Dear Maintainer,

I am using 32-bit armhf executables on
linux-image-arm64 kernel running on
Raspberry Pi 4B, because

* armhf executables use smaller memory and storage than arm64,
* 32-bit arm kernels are unsupported on arm64bit CPUs, as told at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=971059#12
by the kernel package maintainer Ben Hutchings.

/etc/kernel/postinst.d/z50-raspi-firmware has to understand
that it is running on a 64bit kernel. But it fails to do so.
Because it use:

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

Since all binaries are 32-bit,
dpkg --print-architecture prints armhf,
while the kernel is linux-image-arm64.

I think "uname -m" should be used in place of "dpkg --print-architecture".

The SD card image was built by
mmdebstrap --architectures=armhf,arm64 --variant=apt --components="main contrib non-free" --include=linux-image-arm64,udev,kmod,e2fsprogs,btrfs-progs,systemd-sysv,libpam-systemd,libnss-systemd,dbus-user-session,locales,tzdata,openssh-server,bash,apt-utils,whiptail,vim-tiny,less,man-db,wpasupplicant,crda,raspi-firmware,firmware-brcm80211,firmware-linux-free,firmware-misc-nonfree,keyboard-configuration,console-setup bullseye /mnt

Best regards, Ryutaroh Matsumoto


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: armhf (aarch64)
Foreign Architectures: arm64

Kernel: Linux 5.8.0-2-arm64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages raspi-firmware depends on:
ii  dosfstools  4.1-2
ii  dpkg        1.20.5

raspi-firmware recommends no packages.

raspi-firmware suggests no packages.

-- no debconf information



More information about the Pkg-raspi-maintainers mailing list