I am having issues building some images based on generic-efi
profile. Kernel is installed as local package with a mkinitcpio hook to build a UKI file that needs to be placed in the esp partition. For that to work files on /boot/efi need to be copied to esp partition in create_img
function.
This patch fixes this issue:
From ce5c8fc32cc647655b2d07ff45d737ffe2d83ee5 Mon Sep 17 00:00:00 2001
From: rodriguezst <2828844+rodriguezst@users.noreply.github.com>
Date: Tue, 3 Sep 2024 21:39:18 +0200
Subject: [PATCH] [generic-efi] Move files on /boot/efi from root to esp partition
partition
Files added to /boot/efi inside chroot were not being copied to esp partition
---
lib/functions.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/functions.sh b/lib/functions.sh
index d9f704f..5f37105 100755
--- a/lib/functions.sh
+++ b/lib/functions.sh
@@ -918,6 +918,7 @@ create_img() {
# Copy the rootfs contents over to the filesystem
info "Copying files to image..."
cp -a $ROOTFS_IMG/rootfs_$ARCH/* $TMPDIR/root
+ mv $TMPDIR/root/boot/efi/* $TMPDIR/boot/efi
;;
quartz64-bsp)
@@ -1047,6 +1048,7 @@ create_img() {
mount ${LDEV}p1 $TMPDIR/boot/efi
mount ${LDEV}p2 $TMPDIR/root
cp -a $ROOTFS_IMG/rootfs_$ARCH/* $TMPDIR/root
+ mv $TMPDIR/root/boot/efi/* $TMPDIR/boot/efi
;;
quartz64-bsp)