Merge branch 'boot-consistency'

This commit is contained in:
Cyril Brulebois 2021-11-20 13:43:53 +01:00
commit cba96ddb16
2 changed files with 9 additions and 6 deletions

View File

@ -66,7 +66,7 @@ raspi_4_buster.yaml: raspi_base_buster.yaml
cat raspi_base_buster.yaml | sed "s/__ARCH__/arm64/" | \
sed "s#raspi3-firmware#raspi-firmware/buster-backports#" | \
sed "s#apt-get update#echo 'APT::Default-Release \"buster\";' > /etc/apt/apt.conf\n apt-get update#" | \
sed "s#\(RASPIROOT.*cmdline.txt\)#\1\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#\(RASPIROOT.*cmdline.txt\)#\1\n sed -i 's/cma=64M //' /boot/firmware/cmdline.txt#" | \
sed "s/__LINUX_IMAGE__/linux-image-arm64\/buster-backports/" | \
sed "s/__EXTRA_PKGS__/- firmware-brcm80211\/buster-backports/" | \
sed "s/__DTB__/\\/usr\\/lib\\/linux-image-*-arm64\\/broadcom\\/bcm*rpi*.dtb/" |\
@ -113,7 +113,7 @@ raspi_3_bullseye.yaml: raspi_base_bullseye.yaml
raspi_4_bullseye.yaml: raspi_base_bullseye.yaml
cat raspi_base_bullseye.yaml | sed "s/__ARCH__/arm64/" | \
sed "s#\(RASPIROOT.*cmdline.txt\)#\1\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#\(RASPIROOT.*cmdline.txt\)#\1\n sed -i 's/cma=64M //' /boot/firmware/cmdline.txt#" | \
sed "s/__LINUX_IMAGE__/linux-image-arm64/" | \
sed "s/__EXTRA_PKGS__/- firmware-brcm80211/" | \
sed "s/__DTB__/\\/usr\\/lib\\/linux-image-*-arm64\\/broadcom\\/bcm*rpi*.dtb/" |\

View File

@ -137,14 +137,17 @@ steps:
rm -rf /var/lib/apt/lists
# Modify the kernel commandline we take from the firmware to boot from
# the partition labeled raspiroot instead of forcing it to mmcblk0p2
# the partition labeled raspiroot instead of forcing it to mmcblk0p2.
# Also insert the serial console right before the root= parameter.
#
# These changes will be overwritten after the hardware is probed
# after dpkg reconfigures raspi-firmware (upon first boot).
# after dpkg reconfigures raspi-firmware (upon first boot), so make
# sure we don't lose label-based booting.
- chroot: /
shell: |
sed -i 's/^/console=__SERIAL_CONSOLE__ /' /boot/firmware/cmdline.txt
sed -i 's/.dev.mmcblk0p2/LABEL=RASPIROOT/' /boot/firmware/cmdline.txt
sed -i 's/root=/console=__SERIAL_CONSOLE__ root=/' /boot/firmware/cmdline.txt
sed -i 's#root=/dev/mmcblk0p2#root=LABEL=RASPIROOT#' /boot/firmware/cmdline.txt
sed -i 's/^#ROOTPART=.*/ROOTPART=LABEL=RASPIROOT/' /etc/default/raspi-firmware
# TODO(https://github.com/larswirzenius/vmdb2/issues/24): remove once vmdb
# clears /etc/resolv.conf on its own.