summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-06-03 00:09:47 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-06-03 00:09:47 -0500
commit1f685acece95b06b62cab8d81cc26e29d6c13967 (patch)
treeefa417a7c4e6e1b1cc1f4af20ff5a061f20cb78b
parent419e2951caca02ba77a89b6a75c9317c6ff02300 (diff)
downloadhorizon-1f685acece95b06b62cab8d81cc26e29d6c13967.tar.gz
horizon-1f685acece95b06b62cab8d81cc26e29d6c13967.tar.bz2
horizon-1f685acece95b06b62cab8d81cc26e29d6c13967.tar.xz
horizon-1f685acece95b06b62cab8d81cc26e29d6c13967.zip
image: Add default share directory for ISO
-rw-r--r--image/CMakeLists.txt1
-rw-r--r--image/iso-share/VolumeIcon.icnsbin0 -> 85381 bytes
-rwxr-xr-ximage/iso-share/cdinits/cdinit-pmmxbin0 -> 19260 bytes
-rwxr-xr-ximage/iso-share/cdinits/cdinit-ppcbin0 -> 74268 bytes
-rwxr-xr-ximage/iso-share/cdinits/cdinit-ppc64bin0 -> 75608 bytes
-rwxr-xr-ximage/iso-share/cdinits/cdinit-x86bin0 -> 11892 bytes
-rwxr-xr-ximage/iso-share/cdinits/cdinit-x86_64bin0 -> 20792 bytes
-rw-r--r--image/iso-share/iso-params-pmmx1
-rw-r--r--image/iso-share/iso-params-ppc1
-rw-r--r--image/iso-share/iso-params-ppc641
-rw-r--r--image/iso-share/iso-params-x86_641
-rwxr-xr-ximage/iso-share/post-pmmx.sh73
-rw-r--r--image/iso-share/post-ppc.sh108
-rwxr-xr-ximage/iso-share/post-ppc64.sh110
-rwxr-xr-ximage/iso-share/post-x86_64.sh46
15 files changed, 342 insertions, 0 deletions
diff --git a/image/CMakeLists.txt b/image/CMakeLists.txt
index 58b5eef..7a0a440 100644
--- a/image/CMakeLists.txt
+++ b/image/CMakeLists.txt
@@ -17,3 +17,4 @@ include_directories(${Boost_INCLUDE_DIR})
target_link_libraries(hscript-image hscript hi-backends ${Boost_LIBRARIES})
install(TARGETS hscript-image DESTINATION bin)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/creator.1 DESTINATION share/man/man1 RENAME hscript-image.1)
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/iso-share/ DESTINATION share/horizon/iso)
diff --git a/image/iso-share/VolumeIcon.icns b/image/iso-share/VolumeIcon.icns
new file mode 100644
index 0000000..5ffa840
--- /dev/null
+++ b/image/iso-share/VolumeIcon.icns
Binary files differ
diff --git a/image/iso-share/cdinits/cdinit-pmmx b/image/iso-share/cdinits/cdinit-pmmx
new file mode 100755
index 0000000..c59bcfb
--- /dev/null
+++ b/image/iso-share/cdinits/cdinit-pmmx
Binary files differ
diff --git a/image/iso-share/cdinits/cdinit-ppc b/image/iso-share/cdinits/cdinit-ppc
new file mode 100755
index 0000000..f98d2c4
--- /dev/null
+++ b/image/iso-share/cdinits/cdinit-ppc
Binary files differ
diff --git a/image/iso-share/cdinits/cdinit-ppc64 b/image/iso-share/cdinits/cdinit-ppc64
new file mode 100755
index 0000000..1e5dcdb
--- /dev/null
+++ b/image/iso-share/cdinits/cdinit-ppc64
Binary files differ
diff --git a/image/iso-share/cdinits/cdinit-x86 b/image/iso-share/cdinits/cdinit-x86
new file mode 100755
index 0000000..e4df83e
--- /dev/null
+++ b/image/iso-share/cdinits/cdinit-x86
Binary files differ
diff --git a/image/iso-share/cdinits/cdinit-x86_64 b/image/iso-share/cdinits/cdinit-x86_64
new file mode 100755
index 0000000..366dc48
--- /dev/null
+++ b/image/iso-share/cdinits/cdinit-x86_64
Binary files differ
diff --git a/image/iso-share/iso-params-pmmx b/image/iso-share/iso-params-pmmx
new file mode 100644
index 0000000..742e628
--- /dev/null
+++ b/image/iso-share/iso-params-pmmx
@@ -0,0 +1 @@
+--grub2-boot-info --grub2-mbr target/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 -hfs-bless-by i /System/Library/CoreServices/boot.efi
diff --git a/image/iso-share/iso-params-ppc b/image/iso-share/iso-params-ppc
new file mode 100644
index 0000000..8c4c1e2
--- /dev/null
+++ b/image/iso-share/iso-params-ppc
@@ -0,0 +1 @@
+-hfsplus -isohybrid-apm-hfsplus -hfsplus-file-creator-type chrp tbxi boot/ofboot.b -hfs-bless-by p boot -sysid PPC -chrp-boot-part
diff --git a/image/iso-share/iso-params-ppc64 b/image/iso-share/iso-params-ppc64
new file mode 100644
index 0000000..8c4c1e2
--- /dev/null
+++ b/image/iso-share/iso-params-ppc64
@@ -0,0 +1 @@
+-hfsplus -isohybrid-apm-hfsplus -hfsplus-file-creator-type chrp tbxi boot/ofboot.b -hfs-bless-by p boot -sysid PPC -chrp-boot-part
diff --git a/image/iso-share/iso-params-x86_64 b/image/iso-share/iso-params-x86_64
new file mode 100644
index 0000000..84081eb
--- /dev/null
+++ b/image/iso-share/iso-params-x86_64
@@ -0,0 +1 @@
+--grub2-boot-info --grub2-mbr target/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 -no-emul-boot -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/image/iso-share/post-pmmx.sh b/image/iso-share/post-pmmx.sh
new file mode 100755
index 0000000..14d6905
--- /dev/null
+++ b/image/iso-share/post-pmmx.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+mkdir -p cdroot/boot
+
+cat >early.cfg <<'EARLYCFG'
+search.fs_label "Adelie pmmx" root
+set prefix=($root)/boot
+EARLYCFG
+
+cat >cdroot/boot/grub.cfg <<'GRUBCFG'
+menuentry "Adelie Linux Live (Intel 32-bit)" --class linux --id adelie-live-cd {
+ insmod iso9660
+ insmod linux
+ search --label "Adelie pmmx" --no-floppy --set
+ linux ($root)/kernel-pmmx squashroot=pmmx.squashfs
+ initrd ($root)/initrd-pmmx
+}
+
+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/i386-pc -c 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 all_video
+ cat target/usr/lib/grub/i386-pc/cdboot.img grubcore-stage1.img > cdroot/boot/grubcore.img
+
+ grub-mkimage -d target/usr/lib/grub/i386-efi -c early.cfg -p boot -o 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 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 32-bit' >cdroot/System/Library/CoreServices/.disk_label.contentDetails
+cp efi32.exe cdroot/System/Library/CoreServices/boot.efi
+
+if ! type mkfs.fat>/dev/null; then
+ printf "EFI image cannot be created.\n"
+ printf "This CD will boot BIOS systems only.\n"
+else
+ mkdir -p efitemp
+ dd if=/dev/zero of=efi32.img bs=1024 count=2880
+ mkfs.fat efi32.img
+ mount -t vfat -o loop,rw efi32.img efitemp
+ mkdir -p efitemp/EFI/BOOT
+ mv efi32.exe efitemp/EFI/BOOT/bootia32.efi
+ cp efitemp/EFI/BOOT/bootia32.efi efitemp/EFI/BOOT/boot.efi
+ umount efitemp
+ rmdir efitemp
+ mv efi32.img cdroot/efi.img
+fi
+
diff --git a/image/iso-share/post-ppc.sh b/image/iso-share/post-ppc.sh
new file mode 100644
index 0000000..9623a50
--- /dev/null
+++ b/image/iso-share/post-ppc.sh
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+mkdir -p cdroot/boot
+
+cat >early.cfg <<'EARLYCFG'
+search.fs_label "Adelie ppc" root
+set prefix=($root)/boot
+EARLYCFG
+
+if ! type grub-mkimage>/dev/null; then
+ printf "GRUB image cannot be created.\n"
+ exit 1
+else
+ grub-mkimage -d target/usr/lib/grub/powerpc-ieee1275 -c early.cfg -v -p boot -o cdroot/boot/grubcore.img -O powerpc-ieee1275 boot btrfs datetime disk ext2 gfxmenu help hfs hfsplus ieee1275_fb iso9660 jfs ls luks lvm macbless macho nilfs2 ofnet part_apple part_gpt part_msdos png scsi search xfs linux reboot gfxterm gfxterm_background gfxterm_menu
+fi
+
+rm early.cfg
+
+cp cdroot/VolumeIcon.icns 'cdroot/Icon '
+
+cat >cdroot/boot/grub.cfg <<'GRUBCFG'
+menuentry "Adelie Linux Live (PowerPC 32-bit)" --class linux --id adelie-live-cd {
+ insmod part_apple
+ insmod iso9660
+ insmod linux
+ search --label "Adelie ppc" --hint cd,apple2 --no-floppy --set
+ linux ($root)/kernel-ppc squashroot=ppc.squashfs
+ initrd ($root)/initrd-ppc
+}
+
+menuentry "Reboot and Try Again" --class reboot --id reboot {
+ reboot
+}
+
+GRUB_DEFAULT=adelie-live-cd
+GRUB_TIMEOUT=10
+GRUB_DISTRIBUTOR="Adelie"
+GRUBCFG
+
+cat >cdroot/boot/ofboot.b <<'OFBOOT'
+<CHRP-BOOT>
+<COMPATIBLE>MacRISC MacRISC3 MacRISC4</COMPATIBLE>
+<DESCRIPTION>Adelie</DESCRIPTION>
+<OS-NAME>Linux</OS-NAME>
+<boot-script>
+" screen" output
+load-base release-load-area
+boot &device;:\boot\grubcore.img
+</boot-script>
+<OS-BADGE-ICONS>
+1010
+000000000000F8FEACF6000000000000
+0000000000F5FFFFFEFEF50000000000
+00000000002BFAFEFAFCF70000000000
+0000000000F65D5857812B0000000000
+0000000000F5350B2F88560000000000
+0000000000F6335708F8FE0000000000
+00000000005600F600F5FD8100000000
+00000000F9F8000000F5FAFFF8000000
+000000008100F5F50000F6FEFE000000
+000000F8F700F500F50000FCFFF70000
+00000088F70000F50000F5FCFF2B0000
+0000002F582A00F5000008ADE02C0000
+00090B0A35A62B0000002D3B350A0000
+000A0A0B0B3BF60000505E0B0A0B0A00
+002E350B0B2F87FAFCF45F0B2E090000
+00000007335FF82BF72B575907000000
+000000000000ACFFFF81000000000000
+000000000081FFFFFFFF810000000000
+0000000000FBFFFFFFFFAC0000000000
+000000000081DFDFDFFFFB0000000000
+000000000081DD5F83FFFD0000000000
+000000000081DDDF5EACFF0000000000
+0000000000FDF981F981FFFF00000000
+00000000FFACF9F9F981FFFFAC000000
+00000000FFF98181F9F981FFFF000000
+000000ACACF981F981F9F9FFFFAC0000
+000000FFACF9F981F9F981FFFFFB0000
+00000083DFFBF981F9F95EFFFFFC0000
+005F5F5FDDFFFBF9F9F983DDDD5F0000
+005F5F5F5FDD81F9F9E7DF5F5F5F5F00
+0083DD5F5F83FFFFFFFFDF5F835F0000
+000000FBDDDFACFBACFBDFDFFB000000
+000000000000FFFFFFFF000000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFFFF00000000
+00000000FFFFFFFFFFFFFFFFFF000000
+00000000FFFFFFFFFFFFFFFFFF000000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
+00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00
+00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFF000000
+</OS-BADGE-ICONS>
+</CHRP-BOOT>
+OFBOOT
+
+cp cdroot/boot/ofboot.b cdroot/boot/bootinfo.txt
+
+# CHRP
+mkdir -p cdroot/ppc
+cp cdroot/boot/bootinfo.txt cdroot/ppc/bootinfo.txt
diff --git a/image/iso-share/post-ppc64.sh b/image/iso-share/post-ppc64.sh
new file mode 100755
index 0000000..e5b5c65
--- /dev/null
+++ b/image/iso-share/post-ppc64.sh
@@ -0,0 +1,110 @@
+#!/bin/sh
+
+mkdir -p cdroot/boot
+
+# /boot/grub instead of /boot for Petitboot compatibility.
+cat >early.cfg <<'EARLYCFG'
+search.fs_label "Adelie ppc64" root
+set prefix=($root)/boot/grub
+EARLYCFG
+
+if ! type grub-mkimage>/dev/null; then
+ printf "GRUB image cannot be created.\n"
+ exit 1
+else
+ grub-mkimage -d target/usr/lib/grub/powerpc-ieee1275 -c early.cfg -v -p boot -o cdroot/boot/grubcore.img -O powerpc-ieee1275 boot btrfs datetime disk ext2 gfxmenu help hfs hfsplus ieee1275_fb iso9660 jfs ls luks lvm macbless macho nilfs2 ofnet part_apple part_gpt part_msdos png scsi search xfs linux reboot gfxterm gfxterm_background gfxterm_menu all_video
+fi
+
+rm early.cfg
+
+cp cdroot/VolumeIcon.icns 'cdroot/Icon '
+
+mkdir -p cdroot/boot/grub
+cat >cdroot/boot/grub/grub.cfg <<'GRUBCFG'
+menuentry "Adelie Linux Live (PowerPC 64-bit)" --class linux --id adelie-live-cd {
+ insmod part_apple
+ insmod iso9660
+ insmod linux
+ search --label "Adelie ppc64" --hint cd,apple2 --no-floppy --set
+ linux ($root)/kernel-ppc64 squashroot=ppc64.squashfs
+ initrd ($root)/initrd-ppc64
+}
+
+menuentry "Reboot and Try Again" --class reboot --id reboot {
+ reboot
+}
+
+GRUB_DEFAULT=adelie-live-cd
+GRUB_TIMEOUT=10
+GRUB_DISTRIBUTOR="Adelie"
+GRUBCFG
+
+cat >cdroot/boot/ofboot.b <<'OFBOOT'
+<CHRP-BOOT>
+<COMPATIBLE>MacRISC MacRISC3 MacRISC4</COMPATIBLE>
+<DESCRIPTION>Adelie</DESCRIPTION>
+<OS-NAME>Linux</OS-NAME>
+<boot-script>
+" screen" output
+load-base release-load-area
+boot &device;:\boot\grubcore.img
+</boot-script>
+<OS-BADGE-ICONS>
+1010
+000000000000F8FEACF6000000000000
+0000000000F5FFFFFEFEF50000000000
+00000000002BFAFEFAFCF70000000000
+0000000000F65D5857812B0000000000
+0000000000F5350B2F88560000000000
+0000000000F6335708F8FE0000000000
+00000000005600F600F5FD8100000000
+00000000F9F8000000F5FAFFF8000000
+000000008100F5F50000F6FEFE000000
+000000F8F700F500F50000FCFFF70000
+00000088F70000F50000F5FCFF2B0000
+0000002F582A00F5000008ADE02C0000
+00090B0A35A62B0000002D3B350A0000
+000A0A0B0B3BF60000505E0B0A0B0A00
+002E350B0B2F87FAFCF45F0B2E090000
+00000007335FF82BF72B575907000000
+000000000000ACFFFF81000000000000
+000000000081FFFFFFFF810000000000
+0000000000FBFFFFFFFFAC0000000000
+000000000081DFDFDFFFFB0000000000
+000000000081DD5F83FFFD0000000000
+000000000081DDDF5EACFF0000000000
+0000000000FDF981F981FFFF00000000
+00000000FFACF9F9F981FFFFAC000000
+00000000FFF98181F9F981FFFF000000
+000000ACACF981F981F9F9FFFFAC0000
+000000FFACF9F981F9F981FFFFFB0000
+00000083DFFBF981F9F95EFFFFFC0000
+005F5F5FDDFFFBF9F9F983DDDD5F0000
+005F5F5F5FDD81F9F9E7DF5F5F5F5F00
+0083DD5F5F83FFFFFFFFDF5F835F0000
+000000FBDDDFACFBACFBDFDFFB000000
+000000000000FFFFFFFF000000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFF0000000000
+0000000000FFFFFFFFFFFFFF00000000
+00000000FFFFFFFFFFFFFFFFFF000000
+00000000FFFFFFFFFFFFFFFFFF000000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFFFF0000
+00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
+00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00
+00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
+000000FFFFFFFFFFFFFFFFFFFF000000
+</OS-BADGE-ICONS>
+</CHRP-BOOT>
+OFBOOT
+
+cp cdroot/boot/ofboot.b cdroot/boot/bootinfo.txt
+
+# CHRP
+mkdir -p cdroot/ppc
+cp cdroot/boot/bootinfo.txt cdroot/ppc/bootinfo.txt
diff --git a/image/iso-share/post-x86_64.sh b/image/iso-share/post-x86_64.sh
new file mode 100755
index 0000000..04d0f6d
--- /dev/null
+++ b/image/iso-share/post-x86_64.sh
@@ -0,0 +1,46 @@
+mkdir -p cdroot-x86_64/boot
+
+if ! type grub-mkimage>/dev/null; then
+ printf "GRUB image cannot be created. Using stale copy.\n"
+ printf "If you don't have one, this will fail!\n"
+else
+ printf '\033[01;32m * \033[37mInstalling GRUB...\033[00;39m\n'
+ grub-mkimage -c x86/early.cfg64 -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 all_video
+ cat /usr/lib/grub/i386-pc/cdboot.img grubcore-stage1.img > cdroot-x86_64/boot/grubcore.img
+
+ grub-mkimage -c x86/early.cfg64 -v -p boot -o x86/efi64.exe -O x86_64-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
+
+cp x86/grub.cfg64 cdroot-x86_64/boot/grub.cfg
+
+mkdir -p cdroot-x86_64/System/Library/CoreServices
+touch cdroot-x86_64/System/Library/CoreServices/mach_kernel
+cat >cdroot-x86_64/System/Library/CoreServices/SystemVersion.plist <<PLIST
+<plist version="1.0">
+<dict>
+ <key>ProductBuildVersion</key>
+ <string>1B4</string>
+ <key>ProductName</key>
+ <string>Adélie Linux</string>
+ <key>ProductVersion</key>
+ <string>1.0-BETA4</string>
+</dict>
+PLIST
+cp disk-label cdroot-x86_64/System/Library/CoreServices/.disk_label
+echo 'Adélie 1.0-BETA4' >cdroot-x86_64/System/Library/CoreServices/.disk_label.contentDetails
+cp x86/efi64.exe cdroot-x86_64/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/efi64.img bs=1024 count=1440
+ mkfs.fat x86/efi64.img
+ mount -t vfat -o loop,rw x86/efi64.img x86/efitemp
+ mkdir -p x86/efitemp/EFI/BOOT
+ mv x86/efi64.exe x86/efitemp/EFI/BOOT/bootx64.efi
+ umount x86/efitemp
+ rmdir x86/efitemp
+fi
+cp x86/efi64.img cdroot-x86_64/efi.img