<div dir="ltr">Thanks for your patch and tests. As we’re currently in a freeze, I’ll hold off uploading this. Could you ping this bug once the freeze is over please?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 3, 2017 at 1:24 AM, Vagrant Cascadian <span dir="ltr"><<a href="mailto:vagrant@debian.org" target="_blank">vagrant@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2017-05-02, Vagrant Cascadian wrote:<br>
> Obviously, etc/kernel/postinst.d/raspi3-<wbr>firmware will need some<br>
> adjustments, as it's currently hard-coded for raspberry pi 3.<br>
<br>
</span>Wow, it's hard-coded in all sorts of ways... the commandline options,<br>
the boot options, etc.<br>
<br>
Patch below to at least to hard-code support raspberry pi2 on armhf,<br>
which doesn't handle running armhf on raspberry pi 3 (a plausible<br>
configuration). Maybe it should support /etc/default/raspi3-firmware and<br>
only set defaults for dtb if unspecified.<br>
<br>
<br>
diff --git a/debian/kernel/postinst.d/<wbr>raspi3-firmware b/debian/kernel/postinst.d/<wbr>raspi3-firmware<br>
index ca4d158..bfd16c9 100755<br>
--- a/debian/kernel/postinst.d/<wbr>raspi3-firmware<br>
+++ b/debian/kernel/postinst.d/<wbr>raspi3-firmware<br>
@@ -10,6 +10,18 @@ exec </dev/null >&2<br>
<br>
 eval set -- "$DEB_MAINT_PARAMS"<br>
<br>
+<br>
+# Detect appropriate .dtb<br>
+arch=$(dpkg --print-architecture)<br>
+case ${arch} in<br>
+       armhf)<br>
+               dtb=bcm2836-rpi-2-b.dtb<br>
+               ;;<br>
+       arm64)<br>
+               dtb=bcm2837-rpi-3-b.dtb<br>
+               ;;<br>
+esac<br>
+<br>
 # Only run on configure to avoid unnecessary work.<br>
 if [ -z "$1" ] || [ "$1" != "configure" ]; then<br>
   exit 0<br>
@@ -34,7 +46,7 @@ if [ -z "$latest_initrd" ]; then<br>
   exit 0<br>
 fi<br>
<br>
-latest_dtb="/usr/lib/linux-<wbr>image-${latest_kernel#/boot/<wbr>vmlinuz-}/broadcom/bcm2837-<wbr>rpi-3-b.dtb"<br>
+latest_dtb="/usr/lib/linux-<wbr>image-${latest_kernel#/boot/<wbr>vmlinuz-}/broadcom/${dtb}"<br>
<br>
 if [ ! -e "$latest_dtb" ]; then<br>
   echo "raspi3-firmware: device tree file ${latest_dtb} does not exist, cannot populate /boot/firmware"<br>
@@ -49,10 +61,15 @@ latest_kernel_basename=$(<wbr>basename "$latest_kernel")<br>
 latest_initrd_basename=$(<wbr>basename "$latest_initrd")<br>
 latest_dtb_basename=$(basename "$latest_dtb")<br>
<br>
-cat >/boot/firmware/config.txt <<EOF<br>
+if [ "arm64" = "$arch" ]; then<br>
+       cat >/boot/firmware/config.txt <<EOF<br>
<span class=""> # Switch the CPU from ARMv7 into ARMv8 (aarch64) mode<br>
</span> arm_control=0x200<br>
<br>
+EOF<br>
+fi<br>
+<br>
+cat >/boot/firmware/config.txt <<EOF<br>
 enable_uart=1<br>
<br>
 device_tree=${latest_dtb_<wbr>basename}<br>
<br>
<br>
<br>
live well,<br>
  vagrant<br>
<br>
p.s. FWIW, I also tested that u-boot works with the firmware from<br>
raspi3-firmware.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Michael</div>
</div>