-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Florent CARLI <[email protected]>
- Loading branch information
1 parent
3289da9
commit 689a642
Showing
10 changed files
with
101 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
FROM debian:12 | ||
COPY etc_fai/apt/keys/fai-project.gpg /etc/apt/trusted.gpg.d/ | ||
RUN echo "deb [arch=amd64] http://fai-project.org/download bookworm koeln" > /etc/apt/sources.list.d/fai.list && \ | ||
RUN echo "deb http://fai-project.org/download bookworm koeln" > /etc/apt/sources.list.d/fai.list && \ | ||
apt-get update && \ | ||
apt-get -y upgrade && \ | ||
apt-get -y install fai-server fai-doc fai-setup-storage && \ | ||
apt-get -y install lftp curl whiptail && \ | ||
apt-get -y install lftp curl whiptail patch && \ | ||
apt-get -y install qemu-utils && \ | ||
apt-get -y install reprepro xorriso squashfs-tools vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@@ -46,7 +46,13 @@ | ||
BOOT_DEVICE=$( lvs --noheadings -o devices $BOOT_DEVICE | sed -e 's/^*\([^(]*\)(.*$/\1/' ) | ||
fi | ||
|
||
-opts="--no-floppy --target=x86_64-efi --modules=part_gpt" | ||
+# ARM64 or AMD64 | ||
+arch=$(uname -m) | ||
+if [ "$arch" == "aarch64" ]; then | ||
+ opts="--no-floppy --modules=part_gpt" | ||
+else | ||
+ opts="--no-floppy --target=x86_64-efi --modules=part_gpt" | ||
+fi | ||
|
||
# Check if RAID is used for the boot device | ||
if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@@ -221,11 +221,11 @@ | ||
--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 | ||
@@ -392,6 +392,25 @@ | ||
|
||
echo -n "ISO image size and filename: "; du -h $isoname | ||
|
||
+ 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 | ||
} | ||
# - - - - - - - - - - - - - - - - - - - - - - - - - - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
PACKAGES install-norec | ||
msr-tools | ||
intel-cmt-cat | ||
linux-image-rt-amd64 | ||
intel-microcode | ||
grub-efi-amd64-signed | ||
amd64-microcode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PACKAGES install-norec | ||
linux-image-rt-arm64 | ||
grub-efi-arm64-signed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters