commit:     a55e0890b809b6597066070b4822a20626f2dfc4
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 31 03:00:32 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Apr  2 17:53:15 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a55e0890

targets: Switch from SILO to GRUB on SPARC

Since PPC platforms already use GRUB, this is pretty trivial.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 livecd/cdtar/silo-1.4.13-sparc-cdtar.tar.bz2 | Bin 115857 -> 0 bytes
 targets/support/bootloader-setup.sh          |  26 +-------------------------
 targets/support/create-iso.sh                |  27 +++++++--------------------
 3 files changed, 8 insertions(+), 45 deletions(-)

diff --git a/livecd/cdtar/silo-1.4.13-sparc-cdtar.tar.bz2 
b/livecd/cdtar/silo-1.4.13-sparc-cdtar.tar.bz2
deleted file mode 100644
index 3d24672e..00000000
Binary files a/livecd/cdtar/silo-1.4.13-sparc-cdtar.tar.bz2 and /dev/null differ

diff --git a/targets/support/bootloader-setup.sh 
b/targets/support/bootloader-setup.sh
index 154874d5..db5860d5 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -80,7 +80,7 @@ case ${clst_hostarch} in
                        echo "--recoverykernel=boot/${x}" >> ${icfg}
                done
        ;;
-       ppc*|powerpc*)
+       ppc*|powerpc*|sparc*)
            # GRUB2 Openfirmware
                kern_subdir=/boot
                iacfg=$1/boot/grub/grub.cfg
@@ -120,30 +120,6 @@ case ${clst_hostarch} in
                        echo "" >> ${iacfg}
                done
        ;;
-       sparc*)
-               # NO SOFTLEVEL SUPPORT YET
-               scfg=$1/boot/silo.conf
-               echo "default=\"help\"" > ${scfg}
-               echo "message=\"/boot/boot.msg\"" >> ${scfg}
-
-               for x in ${clst_boot_kernel}
-               do
-                       echo >> ${icfg}
-                       echo "image=\"/boot/${x}\"" >> ${scfg}
-                       echo -e "\tlabel=\"${x}\"" >> ${scfg}
-                       echo -e "\tappend=\"initrd=/boot/${x}.igz 
root=/dev/ram0 init=/linuxrc ${cmdline_opts} cdroot\"" >> ${scfg}
-
-               done
-
-               echo "image=\"cat /boot/silo.conf\"" >> ${scfg}
-               echo -e "label=\"config\"" >> ${scfg}
-               echo "image=\"cat /boot/video.msg\"" >> ${scfg}
-               echo -e "label=\"video\"" >> ${scfg}
-               echo "image=\"cat /boot/help.msg\"" >> ${scfg}
-               echo -e "label=\"help\"" >> ${scfg}
-               echo "image=\"cat /boot/parameters.msg\"" >> ${scfg}
-               echo -e "label=\"parameters\"" >> ${scfg}
-       ;;
        ia64)
                # NO SOFTLEVEL SUPPORT YET
                iacfg=$1/boot/elilo.conf

diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh
index f7358b3c..6d95c398 100755
--- a/targets/support/create-iso.sh
+++ b/targets/support/create-iso.sh
@@ -15,7 +15,7 @@ case ${clst_hostarch} in
                cdmaker="sgibootcd"
                cdmakerpkg="sys-boot/sgibootcd"
                ;;
-        ppc*|powerpc*)
+        ppc*|powerpc*|sparc*)
                 cdmaker="grub-mkrescue"
                 cdmakerpkg="dev-libs/libisoburn and sys-boot/grub:2"
                 ;;
@@ -225,26 +225,13 @@ case ${clst_hostarch} in
                        *) die "SGI LiveCD(s) only support the 'squashfs' 
fstype!"      ;;
                esac
        ;;
-       ppc*|powerpc*)
-               echo ">> Running grub-mkrescue to create iso image...."
-               grub-mkrescue -o "${1}" "${clst_target_path}"
-       ;;
-       sparc*)
-               # Old silo (<=1.2.6) requires a specially built mkisofs
-               # We try to autodetect this in a simple way, said mkisofs
-               # should be in the cdtar, otherwise use the new style.
-               if [ -x "${clst_target_path}/boot/mkisofs.sparc.fu" ]
-               then
-                       mv "${clst_target_path}/boot/mkisofs.sparc.fu" /tmp
-                       echo "Running mkisofs.sparc.fu to create iso image...."
-                       echo "/tmp/mkisofs.sparc.fu ${mkisofs_zisofs_opts} -o 
${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf' 
-V \"${clst_iso_volume_id}\" ${clst_target_path}/"
-                       /tmp/mkisofs.sparc.fu ${mkisofs_zisofs_opts} -o "${1}" 
-D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf' -V 
"${clst_iso_volume_id}" "${clst_target_path}"/ || die "Cannot make ISO image"
-                       rm /tmp/mkisofs.sparc.fu
-               else
-                       echo "Running mkisofs to create iso image...."
-                       run_mkisofs -J -R -l ${mkisofs_zisofs_opts} -V 
"${clst_iso_volume_id}" -o "${1}" -G "${clst_target_path}/boot/isofs.b" -B ... 
"${clst_target_path}"/
-               fi
+       ppc*|powerpc*|sparc*)
+               case ${clst_hostarch}
+               sparc*) extra_opts="--sparc-boot" ;;
+               esac
 
+               echo ">> Running grub-mkrescue to create iso image...."
+               grub-mkrescue ${extra_opts} -o "${1}" "${clst_target_path}"
        ;;
        x86|amd64)
                # detect if an EFI bootloader is desired

Reply via email to