From 937c073e2d628d5d013e9dca1ef55998ef20eeb3 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Tue, 16 Jun 2020 22:44:25 +0700 Subject: [PATCH] arm-rpi4: Use /boot/efi as bootmountpoint Also added download support on the Raspberry Pi 3. The following feature has appeared. The FAT partition does not install the last installed kernel, but the first kernel in the KFLAVOURS list. This was done in order to enable u-boot to default load another kernel, for example std-def. --- .../98-bootstrap-boot-by-firmware | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/features.in/arm-rpi4/image-scripts.d/98-bootstrap-boot-by-firmware b/features.in/arm-rpi4/image-scripts.d/98-bootstrap-boot-by-firmware index 56dc90fb..3720501c 100755 --- a/features.in/arm-rpi4/image-scripts.d/98-bootstrap-boot-by-firmware +++ b/features.in/arm-rpi4/image-scripts.d/98-bootstrap-boot-by-firmware @@ -1,3 +1,43 @@ -#!/bin/sh -efu +#!/bin/sh -eu -rpi4-boot-nouboot --bootstrap +kflavour= +kflavour="${GLOBAL_KFLAVOURS%% *}" + +mkdir -p /boot/efi + +uboots="rpi_3 rpi_3_32b rpi_4 rpi_4_32b" +for uboot in $uboots; do + [ -d /usr/share/u-boot/$uboot ] && + cp -f /usr/share/u-boot/$uboot/* /boot/efi/ + [ -f /boot/efi/kernel8.img ] && + mv /boot/efi/{kernel8.img,uboot-$uboot.bin} + [ -f /boot/efi/kernel7.img ] && + mv /boot/efi/{kernel7.img,uboot-$uboot.bin} +done + +rm -f /boot/efi/config.txt + +[ "$GLOBAL_ARCH" = aarch64 ] && \ + echo "arm_64bit=1" > /boot/efi/config.txt + +cat >> /boot/efi/config.txt <