Skip to content

Commit

Permalink
add create_grub2_image_arm64()
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed Mar 7, 2024
1 parent d1c5650 commit 9a7edf3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions bin/fai-cd
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,30 @@ copy_kernel_initrd() {
echo "$isoversion" > $tmp/FAI-CD
}
# - - - - - - - - - - - - - - - - - - - - - - - - - -
create_grub2_image_arm64() {

mkdir -p $tmp/boot/grub
if [ -d $NFSROOT/usr/lib/grub/arm64-efi ]; then

prepare_grub_cfg

# create arch.efi and copy to vfat file system
TMPDIR=tmp chroot $NFSROOT grub-mkstandalone \
--format=arm64-efi \
--output=/tmp/grubaa64.efi \
--locales="" \
"boot/grub/grub.cfg=/tmp/grub.cfg"
mv $NFSROOT/tmp/grubaa64.efi $scratch

mkfs.vfat -C $scratch/efiboot.img 6000 >/dev/null
mmd -i $scratch/efiboot.img efi efi/boot
mcopy -i $scratch/efiboot.img $scratch/grubaa64.efi ::efi/boot/
else
die 11 "No grub-efi-arm64-bin installation found in NFSROOT. Aborting."
fi

}
# - - - - - - - - - - - - - - - - - - - - - - - - - -
create_grub2_image_x86() {

mkdir -p $tmp/boot/grub
Expand Down

0 comments on commit 9a7edf3

Please sign in to comment.