]> git.gag.com Git - fw/quantimotor/commitdiff
add devicetree overlay to append cmdline, use it to make gpio commands persist
authorBdale Garbee <bdale@gag.com>
Mon, 6 Jan 2025 09:07:10 +0000 (02:07 -0700)
committerBdale Garbee <bdale@gag.com>
Mon, 6 Jan 2025 09:07:10 +0000 (02:07 -0700)
Makefile [new file with mode: 0644]
debian/quantimotor.install
devicetree/Makefile [new file with mode: 0644]
devicetree/append_cmdline.dts [new file with mode: 0644]
devicetree/raspi-firmware-custom [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..435bf46
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+# Top level Makefile for the QuantiMotor software Debian package
+# Copyright 2025 Bdale Garbee <bdale@gag.com>, GPL-3+
+
+SUBDIRS := devicetree
+SUBDIRS-clean := $(addsuffix -clean,$(SUBDIRS))
+
+all: $(SUBDIRS)
+
+clean: $(SUBDIRS-clean)
+
+$(SUBDIRS):
+       $(MAKE) -C $@
+
+$(SUBDIRS-clean):
+       $(MAKE) -C $(subst -clean,,$@) clean
+
+.Suffixes:
+.PHONY: all clean $(SUBDIRS) $(SUBDIRS-clean)
index c1c1c8f7b13fc790a203e044e0e1f1aadac4b059..c541b3a476abfd0bbc17aa9f1bed0811da51b140 100644 (file)
@@ -1,2 +1,4 @@
 bcm2837-rpi-zero-2-w.dtb usr/share/quantimotor
 z99-quantimotor etc/kernel/postinst.d
+devicetree/append_cmdline.dtbo boot/firmware/overlays
+devicetree/raspi-firmware-custom etc/default
diff --git a/devicetree/Makefile b/devicetree/Makefile
new file mode 100644 (file)
index 0000000..4957e57
--- /dev/null
@@ -0,0 +1,9 @@
+all: append_cmdline.dtbo
+
+append_cmdline.dtbo: append_cmdline.dts
+       dtc -I dts -O dtb -o $@ $<
+
+clean:
+       rm -f append_cmdline.dtbo
+
+.PHONY: clean
diff --git a/devicetree/append_cmdline.dts b/devicetree/append_cmdline.dts
new file mode 100644 (file)
index 0000000..3f9509f
--- /dev/null
@@ -0,0 +1,16 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+        compatible = "brcm,bcm2835";
+
+        fragment@0 {
+                target = <&chosen>;
+                frag0:  __overlay__ {
+                };
+        };
+
+               __overrides__ {
+                       append = <&frag0>, "bootargs";
+               };
+};
diff --git a/devicetree/raspi-firmware-custom b/devicetree/raspi-firmware-custom
new file mode 100644 (file)
index 0000000..3bb3f67
--- /dev/null
@@ -0,0 +1 @@
+dtoverlay=append_cmdline,append=pinctrl_bcm2835.persist_gpio_outputs=y