Skip to content

Commit

Permalink
fai-cd: arm64 iso build support
Browse files Browse the repository at this point in the history
Leverage existing work in progress arm64 support to build a working ISO.

NB: This work comes from the SEAPATH project:
seapath/build_debian_iso#121

Co-authored-by: Florent CARLI <[email protected]>
Signed-off-by: Yoann Congal <[email protected]>
  • Loading branch information
ycongal-smile and insatomcat committed Dec 28, 2024
1 parent 630189d commit c714c3b
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions bin/fai-cd
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ create_grub2_image_arm64() {
--output=/tmp/grubaa64.efi \
--locales="" \
"boot/grub/grub.cfg=/tmp/grub.cfg"
mv $NFSROOT/tmp/grubaa64.efi $scratch
mv $NFSROOT/tmp/grubaa64.efi $scratch/BOOTAA64.EFI

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/
mmd -i $scratch/efiboot.img EFI EFI/boot
mcopy -i $scratch/efiboot.img $scratch/BOOTAA64.EFI ::EFI/boot/
else
die 11 "No grub-efi-arm64-bin installation found in NFSROOT. Aborting."
fi
Expand Down Expand Up @@ -405,6 +405,25 @@ mkiso_x86() {
unhide_dirs
}
# - - - - - - - - - - - - - - - - - - - - - - - - - -
mkiso_arm64() {

echo "Writing FAI CD-ROM image to $isoname. This may need some time."
cp $scratch/efiboot.img $tmp/boot/grub/efi.img
xorriso -as mkisofs -r \
-volid "$vname" -appid "$aname" \
-J -joliet-long \
-e boot/grub/efi.img -no-emul-boot \
-append_partition 2 0xef $scratch/efiboot.img \
-partition_cyl_align all \
"$tmp" \
-o $isoname \
|| die 12 "xorriso failed."

echo -n "ISO image size and filename: "; du -h $isoname

unhide_dirs
}
# - - - - - - - - - - - - - - - - - - - - - - - - - -
addmirror() {

[ $nomirror -eq 1 ] && return
Expand Down

0 comments on commit c714c3b

Please sign in to comment.