-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arm64 compatibility #121
Merged
Merged
arm64 compatibility #121
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These patches are integrated into FAI 6.2.4:
faiproject/fai@3df1203#diff-93467241211d3f9d253fb8ad341738fbda5e5d3ade4721326f2bba82525fbaeeR46
We might just need to wait a little that the package make its way into the Debian/FAI repos&mirrors.
As of now, the 6.2.4 package is
See status in : https://tracker.debian.org/pkg/fai
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use the debian package because the stable version is outdated (6.0.3).
I'll merge the change now, and I will do a new PR when 6.2.4 is the default in the FAI repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll notice this quite easily, the patch will fail to apply and the process will fail :)