From 462abf1d43ca3c9037f9fc8a3a36674082dc2d0a Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Sun, 10 May 2020 19:53:22 -0400 Subject: [PATCH] Generate a raspi_4.yaml This allows you to run "make raspi_4.img" and create a raspberry pi 4 image. It doesn't yet add pi 4 to the list of images that are autobuilt. We're pulling the latest kernel and raspi3-firmware in order to get pi4 support (which was added in Linux 5.5). We're also working around a bug where cma= stops the 5.6 kernel from booting (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951744#10). This is based on Lucas Nussbaum's initial yaml. --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index cfcedef..7759f17 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,17 @@ raspi_3.yaml: raspi_master.yaml sed "s/__OTHER_APT_ENABLE__//" |\ sed "s/__HOST__/rpi3/" > $@ +raspi_4.yaml: raspi_master.yaml + cat raspi_master.yaml | sed "s/__ARCH__/arm64/" | \ + sed "s#raspi3-firmware#raspi3-firmware/unstable#" | \ + sed "s#apt-get update#echo 'APT::Default-Release \"stable\";' > /etc/apt/apt.conf\n apt-get update#" | \ + sed "s#cmdline.txt#cmdline.txt\n sed -i 's/cma=64M //' /boot/firmware/cmdline.txt\n sed -i 's/cma=\\\$$CMA //' /etc/kernel/postinst.d/z50-raspi-firmware#" | \ + sed "s/__LINUX_IMAGE__/linux-image-arm64\/unstable/" | \ + sed "s/__EXTRA_PKGS__/- firmware-brcm80211/" | \ + sed "s/__DTB__/\\/usr\\/lib\\/linux-image-*-arm64\\/broadcom\\/bcm*rpi*.dtb/" |\ + sed "s/__OTHER_APT_ENABLE__/deb http:\/\/deb.debian.org\/debian\/ unstable main contrib non-free # raspi 4 needs the latest kernel (5.5 or higher) and raspi-firmware newer than buster's/" |\ + sed "s/__HOST__/rpi4/" > $@ + %.sha256: %.img.xz echo $@ sha256sum $(@:sha256=img) > $@