]> git.gag.com Git - fw/quantimotor/commitdiff
deliver script to force our dtb to be the one used
authorBdale Garbee <bdale@gag.com>
Sun, 5 Jan 2025 19:04:15 +0000 (12:04 -0700)
committerBdale Garbee <bdale@gag.com>
Sun, 5 Jan 2025 19:04:15 +0000 (12:04 -0700)
debian/quantimotor.install
z99-quantimotor [new file with mode: 0755]

index 06cb5cc5665c51252fef2aed758f586f586a7c87..c1c1c8f7b13fc790a203e044e0e1f1aadac4b059 100644 (file)
@@ -1 +1,2 @@
 bcm2837-rpi-zero-2-w.dtb usr/share/quantimotor
+z99-quantimotor etc/kernel/postinst.d
diff --git a/z99-quantimotor b/z99-quantimotor
new file mode 100755 (executable)
index 0000000..e650cb9
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# force QuantiMotor's dtb to be /boot/firmware/bcm2837-rpi-zero-2-w.dtb
+
+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
+
+cp /usr/share/quantimotor/bcm2837-rpi-zero-2-w.dtb \
+  /boot/firmware/bcm2837-rpi-zero-2-w.dtb
+