Fix ubuntu builds
authorDaniel Abrecht <public@danielabrecht.ch>
Thu, 12 May 2022 18:17:55 +0000 (20:17 +0200)
committerDaniel Abrecht <public@danielabrecht.ch>
Thu, 12 May 2022 18:17:55 +0000 (20:17 +0200)
config/default/b-raspberry-pi-3-b+/post_early_install
config/ubuntu/b-raspberry-pi-3-b+/rootfs/boot/firmware/cmdline.txt [new file with mode: 0755]
config/ubuntu/b-raspberry-pi-3-b+/rootfs/boot/firmware/config.txt [new file with mode: 0755]

index 902107d3f8ce1e6e45ccbc6724d1f877faa27a72..a31175aa3e3cb45a9b5b1b34da382090aaaa1bfa 100755 (executable)
@@ -1,6 +1,10 @@
 #!/bin/sh
 
-# raspi-firmware adds a hook which determines this wrongly using "findmnt -n --output=source /", but this is a chroot with pwrking proc, so that'd give the wrong result.
-# Other parts of initramfs-tools would have known how to figure out the right device, so they just break it by doing unnecessary stuff with good intentions...
-# Anyway, overriding it to the default:
-sed -i 's/^#ROOTPART=/ROOTPART=/' /etc/default/raspi-firmware
+# Ubuntu does it differently
+if [ -f /etc/default/raspi-firmware ]
+then
+  # raspi-firmware adds a hook which determines this wrongly using "findmnt -n --output=source /", but this is a chroot with pwrking proc, so that'd give the wrong result.
+  # Other parts of initramfs-tools would have known how to figure out the right device, so they just break it by doing unnecessary stuff with good intentions...
+  # Anyway, overriding it to the default:
+  sed -i 's/^#ROOTPART=/ROOTPART=/' /etc/default/raspi-firmware
+fi
diff --git a/config/ubuntu/b-raspberry-pi-3-b+/rootfs/boot/firmware/cmdline.txt b/config/ubuntu/b-raspberry-pi-3-b+/rootfs/boot/firmware/cmdline.txt
new file mode 100755 (executable)
index 0000000..a6537c5
--- /dev/null
@@ -0,0 +1 @@
+console=serial0,115200 dwc_otg.lpm_enable=0 console=tty1 rootwait fixrtc quiet splash
diff --git a/config/ubuntu/b-raspberry-pi-3-b+/rootfs/boot/firmware/config.txt b/config/ubuntu/b-raspberry-pi-3-b+/rootfs/boot/firmware/config.txt
new file mode 100755 (executable)
index 0000000..339ea45
--- /dev/null
@@ -0,0 +1,45 @@
+[all]
+kernel=vmlinuz
+cmdline=cmdline.txt
+initramfs initrd.img followkernel
+
+[pi4]
+max_framebuffers=2
+arm_boost=1
+
+[all]
+# Enable the audio output, I2C and SPI interfaces on the GPIO header. As these
+# parameters related to the base device-tree they must appear *before* any
+# other dtoverlay= specification
+dtparam=audio=on
+dtparam=i2c_arm=on
+dtparam=spi=on
+
+# Comment out the following line if the edges of the desktop appear outside
+# the edges of your display
+disable_overscan=1
+
+# If you have issues with audio, you may try uncommenting the following line
+# which forces the HDMI output into HDMI mode instead of DVI (which doesn't
+# support audio output)
+#hdmi_drive=2
+
+# Enable the serial pins
+enable_uart=1
+
+# Autoload overlays for any recognized cameras or displays that are attached
+# to the CSI/DSI ports. Please note this is for libcamera support, *not* for
+# the legacy camera stack
+camera_auto_detect=1
+display_auto_detect=1
+
+# Config settings specific to arm64
+arm_64bit=1
+dtoverlay=dwc2
+
+[cm4]
+# Enable the USB2 outputs on the IO board (assuming your CM4 is plugged into
+# such a board)
+dtoverlay=dwc2,dr_mode=host
+
+[all]