summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-14 18:01:20 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-14 18:01:20 -0500
commitd54f0c8959b1478245165b6ef4f657643444d7a2 (patch)
tree2021a9b9b47656313f1aa2d88e6eeb069a5c85a2
parentcabad0bfe37e575a9a2fc2c868e23206d4e174e4 (diff)
downloadimage-d54f0c8959b1478245165b6ef4f657643444d7a2.tar.gz
image-d54f0c8959b1478245165b6ef4f657643444d7a2.tar.bz2
image-d54f0c8959b1478245165b6ef4f657643444d7a2.tar.xz
image-d54f0c8959b1478245165b6ef4f657643444d7a2.zip
PMMX: UEFI boot fixes here, too
-rw-r--r--iso-params-pmmx2
-rwxr-xr-xpost-pmmx.sh36
2 files changed, 36 insertions, 2 deletions
diff --git a/iso-params-pmmx b/iso-params-pmmx
index a897a55..eb13688 100644
--- a/iso-params-pmmx
+++ b/iso-params-pmmx
@@ -1 +1 @@
---grub2-boot-info --grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img -eltorito-boot boot/grubcore.img -no-emul-boot -boot-load-size 4 -boot-info-table --eltorito-catalog boot/grub.cat -eltorito-alt-boot -e boot/grubcore-efi.img -no-emul-boot -isohybrid-gpt-basdat
+--grub2-boot-info --grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img -eltorito-boot boot/grubcore.img -no-emul-boot -boot-load-size 4 -boot-info-table --eltorito-catalog boot/grub.cat -isohybrid-gpt-basdat --efi-boot efi.img -efi-boot-part --efi-boot-image -hfsplus -apm-block-size 2048 -hfsplus-file-creator-type chrp tbxj /System/Library/CoreServices/.disk_label -hfs-bless-by i /System/Library/CoreServices/boot.efi
diff --git a/post-pmmx.sh b/post-pmmx.sh
index 6daa760..3a62846 100755
--- a/post-pmmx.sh
+++ b/post-pmmx.sh
@@ -8,7 +8,41 @@ else
grub-mkimage -c x86/early.cfg -v -p boot -o grubcore-stage1.img -O i386-pc biosdisk boot btrfs datetime disk ext2 gfxmenu help iso9660 jfs linux ls luks lvm memdisk nilfs2 normal part_gpt part_msdos png scsi search xfs reboot gfxterm gfxterm_background gfxterm_menu
cat /usr/lib/grub/i386-pc/cdboot.img grubcore-stage1.img > cdroot-pmmx/boot/grubcore.img
- grub-mkimage -c x86/early.cfg -v -p boot -o cdroot-pmmx/boot/grubcore-efi.img -O i386-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
+ grub-mkimage -c x86/early.cfg -v -p boot -o x86/efi32.exe -O i386-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
fi
cp x86/grub.cfg cdroot-pmmx/boot/grub.cfg
+
+mkdir -p cdroot-pmmx/System/Library/CoreServices
+touch cdroot-pmmx/System/Library/CoreServices/mach_kernel
+cat >cdroot-pmmx/System/Library/CoreServices/SystemVersion.plist <<PLIST
+<plist version="1.0">
+<dict>
+ <key>ProductBuildVersion</key>
+ <string>1B3</string>
+ <key>ProductName</key>
+ <string>Adélie Linux</string>
+ <key>ProductVersion</key>
+ <string>1.0-BETA3</string>
+</dict>
+PLIST
+cp disk-label cdroot-pmmx/System/Library/CoreServices/.disk_label
+echo 'Adélie 1.0-BETA3' >cdroot-pmmx/System/Library/CoreServices/.disk_label.contentDetails
+cp x86/efi32.exe cdroot-pmmx/System/Library/CoreServices/boot.efi
+
+if ! type mkfs.fat>/dev/null; then
+ printf "EFI image cannot be created.\n"
+ printf "If one does not already exist, this CD will boot BIOS systems only.\n"
+else
+ mkdir -p x86/efitemp
+ dd if=/dev/zero of=x86/efi32.img bs=1024 count=2880
+ mkfs.fat x86/efi32.img
+ mount -t vfat -o loop,rw x86/efi32.img x86/efitemp
+ mkdir -p x86/efitemp/EFI/BOOT
+ mv x86/efi32.exe x86/efitemp/EFI/BOOT/bootia32.efi
+ cp x86/efitemp/EFI/BOOT/bootia32.efi x86/efitemp/EFI/BOOT/boot.efi
+ umount x86/efitemp
+ rmdir x86/efitemp
+fi
+cp x86/efi32.img cdroot-pmmx/efi.img
+