summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-08-01 21:32:09 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-08-01 21:32:48 -0500
commit383abd851a5e36fee8eb17bcd5d7aed87a4dabaf (patch)
tree6132b057b2cdbd232eaf33492000fd87b0426d3a
parent9fa40a34e9a651a7f282590fabeb5feaad31e2a3 (diff)
downloadimage-383abd851a5e36fee8eb17bcd5d7aed87a4dabaf.tar.gz
image-383abd851a5e36fee8eb17bcd5d7aed87a4dabaf.tar.bz2
image-383abd851a5e36fee8eb17bcd5d7aed87a4dabaf.tar.xz
image-383abd851a5e36fee8eb17bcd5d7aed87a4dabaf.zip
Fix for xorriso usage
-rwxr-xr-xadelie-build-cd21
-rw-r--r--iso-params-ppc2
-rw-r--r--iso-params-ppc642
-rwxr-xr-xpost-ppc64.sh16
-rw-r--r--ppc/early.cfg2
-rw-r--r--ppc/early.cfg642
-rw-r--r--ppc/grub.cfg2
-rw-r--r--ppc/grub.cfg644
8 files changed, 30 insertions, 21 deletions
diff --git a/adelie-build-cd b/adelie-build-cd
index 2f7247c..4b03ea5 100755
--- a/adelie-build-cd
+++ b/adelie-build-cd
@@ -32,27 +32,31 @@ fatal() {
ensure_commands() {
- if ! type apk>/dev/null; then
+ if ! type apk>/dev/null 2>/dev/null; then
fatal
printf 'You must have apk installed. On Gentoo, see sys-devel/apk-tools.\n'
exit -1
fi
- if ! type cpio>/dev/null; then
+ if ! type cpio>/dev/null 2>/dev/null; then
fatal
printf 'You must have cpio installed. On Gentoo, see app-arch/cpio.\n'
exit -1
fi
- if ! type mksquashfs>/dev/null; then
+ if ! type mksquashfs>/dev/null 2>/dev/null; then
fatal
printf 'You must have mksquashfs installed. On Gentoo, see sys-fs/squashfs-tools.\n'
exit -1
fi
- if ! type mkisofs>/dev/null; then
+ if ! type xorriso>/dev/null 2>/dev/null; then
fatal
- printf 'You must have mkisofs installed. Try cdrtools or cdrkit.\n'
+ printf 'You must have xorriso installed:\n\n'
+ printf '* cdrkit (Alpine, Gentoo) will not generate a usable PPC ISO.\n'
+ printf '* wodim (Debian) will not generate a usable PPC64 ISO.\n'
+ printf '* cdrtools (Schily) will overrun the PPC64 ISO and write junk to grubcore.img.\n'
+ printf '\nSorry, but xorriso really is required.\n'
exit -1
fi
}
@@ -295,10 +299,14 @@ prepare_cdroot() {
}
create_iso() {
+ local CD_VERSION="$VERSION"
header 'Creating the CD...'
declare -r CD_PARAMS=$(cat iso-params-$ARCH)
- mkisofs -o adelie-${DO_FULL:-live}-$ARCH-$VERSION-$(date +%Y%m%d).iso -joliet -rational-rock -V "Adelie $VERSION $ARCH" ${CD_PARAMS} cdroot-$ARCH
+ CD_VERSION=${CD_VERSION/-alpha/a}
+ CD_VERSION=${CD_VERSION/-beta/b}
+ CD_VERSION=${CD_VERSION/-rc/rc}
+ xorriso -as mkisofs -o adelie-${DO_FULL:-live}-$ARCH-$VERSION-$(date +%Y%m%d).iso -joliet -rational-rock -V "Adelie $CD_VERSION $ARCH" ${CD_PARAMS} cdroot-$ARCH
}
case $PHASE in
@@ -313,7 +321,6 @@ case $PHASE in
make_initrd
;;
iso)
- prepare_cdroot
create_iso
;;
all)
diff --git a/iso-params-ppc b/iso-params-ppc
index c29df72..74901b5 100644
--- a/iso-params-ppc
+++ b/iso-params-ppc
@@ -1 +1 @@
--hfs -hfs-volid Adelie_1.0b1 -part -no-desktop -map mapping-ppc -hfs-bless cdroot-ppc/boot -chrp-boot -prep-boot cdroot-ppc/boot/grubcore.img
+-hfsplus -isohybrid-apm-hfsplus -hfsplus-file-creator-type chrp tbxi boot/ofboot.b -hfs-bless-by p boot -chrp-boot-part
diff --git a/iso-params-ppc64 b/iso-params-ppc64
index 7f9757d..74901b5 100644
--- a/iso-params-ppc64
+++ b/iso-params-ppc64
@@ -1 +1 @@
--hfs -hfs-volid Adelie_1.0b1 -part -no-desktop -map mapping-ppc -hfs-bless cdroot-ppc/boot -chrp-boot -prep-boot boot/grubcore.img
+-hfsplus -isohybrid-apm-hfsplus -hfsplus-file-creator-type chrp tbxi boot/ofboot.b -hfs-bless-by p boot -chrp-boot-part
diff --git a/post-ppc64.sh b/post-ppc64.sh
index b07656a..0ae2ca9 100755
--- a/post-ppc64.sh
+++ b/post-ppc64.sh
@@ -1,11 +1,11 @@
mkdir -p cdroot-ppc64/boot
-#if ! type grub-mkimage>/dev/null; then
-# echo "GRUB image cannot be created. Using stale copy."
-# curl "https://distfiles.adelielinux.org/adelie/1.0-alpha/ppc/grubcore.img" > cdroot-ppc/boot/grubcore.img
-#else
-# grub-mkimage -c ppc/early.cfg -v -p boot -o cdroot-ppc64/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
+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
+ grub-mkimage -c ppc/early.cfg64 -v -p boot -o cdroot-ppc64/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
cp AdelieTux.icns 'cdroot-ppc64/Icon '
cp ppc/grub.cfg64 cdroot-ppc64/boot/grub.cfg
@@ -14,6 +14,6 @@ cp cdroot-ppc64/boot/ofboot.b cdroot-ppc64/boot/bootinfo.txt
# Fix petitboot
mkdir cdroot-ppc64/boot/grub
-ln -s "../grub.cfg" cdroot-ppc64/boot/grub/grub.cfg
+cp ppc/grub.cfg64 cdroot-ppc64/boot/grub/grub.cfg
-curl https://distfiles.adelielinux.org/adelie/1.0-beta1/system/ppc64/easy-kernel-power8-4.14.48-mc8-4.14.48-r8.apk | tar -xzOf - boot/vmlinux-4.14.48-mc8-easy > cdroot-ppc64/boot/bzImage-p8
+curl https://distfiles.adelielinux.org/adelie/1.0-beta1/system/ppc64/easy-kernel-power8-4.14.48-mc8-4.14.48-r8.apk | tar -xzOf - boot/vmlinux-4.14.48-mc8-easy > cdroot-ppc64/bzImage-p8
diff --git a/ppc/early.cfg b/ppc/early.cfg
index cd46b9a..e476c74 100644
--- a/ppc/early.cfg
+++ b/ppc/early.cfg
@@ -1,2 +1,2 @@
-search.fs_label Adelie_1.0b1 root
+search.fs_label "Adelie 1.0b1 ppc" root
set prefix=($root)/boot
diff --git a/ppc/early.cfg64 b/ppc/early.cfg64
new file mode 100644
index 0000000..c2cc511
--- /dev/null
+++ b/ppc/early.cfg64
@@ -0,0 +1,2 @@
+search.fs_label "Adelie 1.0b1 ppc64" root
+set prefix=($root)/boot
diff --git a/ppc/grub.cfg b/ppc/grub.cfg
index 257efd5..c363438 100644
--- a/ppc/grub.cfg
+++ b/ppc/grub.cfg
@@ -2,7 +2,7 @@ menuentry "Adelie Linux 1.0-beta1 Live (PowerPC 32-bit)" --class linux --id adel
insmod part_apple
insmod iso9660
insmod linux
- search --label "Adelie_1.0b1" --hint cd,apple2
+ search --label "Adelie 1.0b1 ppc" --hint cd,apple2
linux /bzImage
initrd /initrd
}
diff --git a/ppc/grub.cfg64 b/ppc/grub.cfg64
index 9a28cc8..ac1dda7 100644
--- a/ppc/grub.cfg64
+++ b/ppc/grub.cfg64
@@ -2,7 +2,7 @@ menuentry "Adelie Linux 1.0-beta1 Live (PowerPC 64-bit)" --class linux --id adel
insmod part_apple
insmod iso9660
insmod linux
- search --label "Adelie_1.0b1" --hint cd,apple2
+ search --label "Adelie 1.0b1 ppc64" --hint cd,apple2
linux /bzImage
initrd /initrd
}
@@ -11,7 +11,7 @@ menuentry "Adelie Linux 1.0-beta1 Live (PowerPC 64-bit - POWER8 and newer CPUs)"
insmod part_apple
insmod iso9660
insmod linux
- search --label "Adelie_1.0b1" --hint cd,apple2
+ search --label "Adelie 1.0b1 ppc64" --hint cd,apple2
linux /bzImage-p8
initrd /initrd
}