summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2023-09-05 21:54:36 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2023-09-05 21:54:36 -0500
commitc5c0efbd17eda2b59fa4af92ae59d3c7ad7d6899 (patch)
tree1073cec455744c61ee6a8f077a1e6e764295e626
parentef19fcc0b76db6fd6e639127ab3f6b57a002d710 (diff)
downloadhorizon-c5c0efbd17eda2b59fa4af92ae59d3c7ad7d6899.tar.gz
horizon-c5c0efbd17eda2b59fa4af92ae59d3c7ad7d6899.tar.bz2
horizon-c5c0efbd17eda2b59fa4af92ae59d3c7ad7d6899.tar.xz
horizon-c5c0efbd17eda2b59fa4af92ae59d3c7ad7d6899.zip
image: ISO backend: Add Arm64 files
These seem to work, but our GRUB kernel isn't being built properly yet, so this isn't quite release-ready.
-rw-r--r--image/iso-share/iso-params-aarch641
-rwxr-xr-ximage/iso-share/post-aarch64.sh70
2 files changed, 71 insertions, 0 deletions
diff --git a/image/iso-share/iso-params-aarch64 b/image/iso-share/iso-params-aarch64
new file mode 100644
index 0000000..a5989d8
--- /dev/null
+++ b/image/iso-share/iso-params-aarch64
@@ -0,0 +1 @@
+--grub2-boot-info -no-emul-boot -isohybrid-gpt-basdat --efi-boot efi.img -efi-boot-part --efi-boot-image
diff --git a/image/iso-share/post-aarch64.sh b/image/iso-share/post-aarch64.sh
new file mode 100755
index 0000000..6880978
--- /dev/null
+++ b/image/iso-share/post-aarch64.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+mkdir -p cdroot/boot
+
+cat >early.cfg <<'EARLYCFG'
+search.fs_label "Adelie-aarch64" root
+set prefix=($root)/boot
+EARLYCFG
+
+cat >cdroot/boot/grub.cfg <<'GRUBCFG'
+menuentry "Adelie Linux Live (64-bit Arm)" --class linux --id adelie-live-cd {
+ insmod iso9660
+ insmod linux
+ search --label "Adelie-aarch64" --no-floppy --set
+ linux ($root)/kernel-aarch64 root=live:LABEL=Adelie-aarch64 rd.live.dir=/ rd.live.squashimg=aarch64.squashfs
+ initrd ($root)/initrd-aarch64
+}
+
+menuentry "Reboot and Try Again" --class reboot --id reboot {
+ reboot
+}
+
+GRUB_DEFAULT=adelie-live-cd
+GRUB_TIMEOUT=10
+GRUB_DISTRIBUTOR="Adelie"
+GRUBCFG
+
+if ! type grub-mkimage>/dev/null; then
+ printf "GRUB image cannot be created.\n"
+ exit 1
+else
+ printf '\033[01;32m * \033[37mInstalling GRUB...\033[00;39m\n'
+ grub-mkimage -d target/usr/lib/grub/arm64-efi -c early.cfg -p boot -o efi64.exe -O arm64-efi boot btrfs datetime disk ext2 gfxmenu help iso9660 jfs ls luks lvm memdisk nilfs2 normal part_gpt part_msdos png scsi search xfs linux reboot gfxterm gfxterm_background gfxterm_menu all_video
+fi
+
+rm early.cfg
+
+mkdir -p cdroot/System/Library/CoreServices
+touch cdroot/System/Library/CoreServices/mach_kernel
+cat >cdroot/System/Library/CoreServices/SystemVersion.plist <<PLIST
+<plist version="1.0">
+<dict>
+ <key>ProductBuildVersion</key>
+ <string>100</string>
+ <key>ProductName</key>
+ <string>Adélie Linux</string>
+ <key>ProductVersion</key>
+ <string>1.0</string>
+</dict>
+PLIST
+#cp disk-label cdroot/System/Library/CoreServices/.disk_label
+#echo 'Adélie 64-bit' >cdroot/System/Library/CoreServices/.disk_label.contentDetails
+cp efi64.exe cdroot/System/Library/CoreServices/boot.efi
+
+if ! type mkfs.fat>/dev/null || ! type mtools>/dev/null; then
+ printf "EFI image cannot be created.\n"
+ printf "This CD will not be bootable.\n"
+else
+ cat >mtoolsrc <<-MTOOLSRC
+ drive A: file="efi64.img"
+ MTOOLSRC
+ export MTOOLSRC="$PWD/mtoolsrc"
+ dd if=/dev/zero of=efi64.img bs=1024 count=1440
+ mkfs.fat efi64.img
+ mmd A:/EFI
+ mmd A:/EFI/BOOT
+ mcopy efi64.exe A:/EFI/BOOT/bootaa64.efi
+ rm efi64.exe mtoolsrc
+ mv efi64.img cdroot/efi.img
+fi