From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 41F8D138334 for ; Fri, 14 Sep 2018 05:40:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 35AC7E0DBF; Fri, 14 Sep 2018 05:40:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EFC27E0DBF for ; Fri, 14 Sep 2018 05:40:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 763B0335D05 for ; Fri, 14 Sep 2018 05:40:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B150F3D8 for ; Fri, 14 Sep 2018 05:40:46 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1536903618.e9c0a0394d1516a03aba93ff673a0ff612c4d3c7.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/bootloader-setup.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: e9c0a0394d1516a03aba93ff673a0ff612c4d3c7 X-VCS-Branch: master Date: Fri, 14 Sep 2018 05:40:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8863569b-5696-49d4-bf70-e7d7256af3f3 X-Archives-Hash: da98729da9f54d513e1b491b9c52dc09 commit: e9c0a0394d1516a03aba93ff673a0ff612c4d3c7 Author: Luca Barbato gentoo org> AuthorDate: Sat Aug 18 07:56:55 2018 +0000 Commit: Matt Turner gentoo org> CommitDate: Fri Sep 14 05:40:18 2018 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e9c0a039 ppc: Generate Grub entries Tested-by: Matt Turner gentoo.org> targets/support/bootloader-setup.sh | 154 +++++++----------------------------- 1 file changed, 30 insertions(+), 124 deletions(-) diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index ecb1810b..b7e2d313 100755 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -81,139 +81,45 @@ case ${clst_hostarch} in done ;; ppc*|powerpc*) - # NO SOFTLEVEL SUPPORT YET - icfg=$1/boot/yaboot.conf - kmsg=$1/boot/boot.msg - - echo "device=cd:" >> ${icfg} - echo "root=/dev/ram" >> ${icfg} - echo "fgcolor=white" >> ${icfg} - echo "bgcolor=black" >> ${icfg} - echo "message=/boot/boot.msg" >> ${icfg} - - # Here is where I fix up the boot.msg file. - ${clst_sed} -e 's/ARCH/PowerPC/' \ - -e 's/HARDWARE/Apple and IBM hardware/' \ - -i $kmsg - - # Setup the IBM yaboot.conf - etc_icfg=$1/etc/yaboot.conf - mkdir -p $1/etc - IBM_YABOOT="FALSE" - echo "root=/dev/ram" >> ${etc_icfg} - echo "fgcolor=white" >> ${etc_icfg} - echo "bgcolor=black" >> ${etc_icfg} - echo "message=/boot/boot.msg" >> ${etc_icfg} - + # GRUB2 Openfirmware + kern_subdir=/boot + iacfg=$1/boot/grub/grub.cfg + mkdir -p $1/boot/grub + echo 'set default=0' > ${iacfg} + echo 'set gfxpayload=keep' >> ${iacfg} + echo 'set timeout=10' >> ${iacfg} + echo 'insmod all_video' >> ${iacfg} + echo '' >> ${iacfg} for x in ${clst_boot_kernel} do eval "clst_kernel_console=\$clst_boot_kernel_${x}_console" eval "clst_kernel_machine_type=\$clst_boot_kernel_${x}_machine_type" eval custom_kopts=\$${x}_kernelopts - echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}" - if [ "${clst_kernel_machine_type}" == "ibm" ] + echo "menuentry 'Boot LiveCD (kernel: ${x})' --class gnu-linux --class os {" >> ${iacfg} + echo " linux ${kern_subdir}/${x} ${default_append_line}" >> ${iacfg} + echo " initrd ${kern_subdir}/${x}.igz" >> ${iacfg} + echo "}" >> ${iacfg} + echo "" >> ${iacfg} + echo "menuentry 'Boot LiveCD (kernel: ${x}) (cached)' --class gnu-linux --class os {" >> ${iacfg} + echo " linux ${kern_subdir}/${x} ${default_append_line} docache" >> ${iacfg} + echo " initrd ${kern_subdir}/${x}.igz" >> ${iacfg} + echo "}" >> ${iacfg} + if [ -n "${clst_kernel_console}" ] then - IBM_YABOOT="true" - if [ -n "${clst_kernel_console}" ] - then - echo >> ${etc_icfg} - echo "image=/boot/${x}" >> ${etc_icfg} - - if [ -e "$1/boot/${x}.igz" ] - then - echo "initrd=/boot/${x}.igz" >> ${etc_icfg} - fi - - echo "label=${x}" >> ${etc_icfg} - echo "read-write" >> ${icfg} - echo "append=\"${default_append_line}\"" >> ${etc_icfg} - - for y in ${clst_kernel_console} - do - echo ${y} - echo >> ${etc_icfg} - echo "image=/boot/${x}" >> ${etc_icfg} - - if [ -e "$1/boot/${x}.igz" ] - then - echo "initrd=/boot/${x}.igz" >> ${etc_icfg} - fi - - echo "label=${x}-${y} " >> ${etc_icfg} - echo "read-write" >> ${icfg} - echo "append=\"${default_append_line} console=${y}\"" >> ${etc_icfg} - done - else - echo >> ${etc_icfg} - echo "image=/boot/${x}" >> ${etc_icfg} - - if [ -e "$1/boot/${x}.igz" ] - then - echo "initrd=/boot/${x}.igz" >> ${etc_icfg} - fi - - echo "label=${x}" >> ${etc_icfg} - echo "read-write" >> ${etc_icfg} - echo "append=\"${default_append_line}\"" >> ${etc_icfg} - fi - else - # Here we wipe out the /ppc directory, if it exists. - rm -rf $1/ppc - if [ -n "${clst_kernel_console}" ] - then - echo >> ${icfg} - echo "image=/boot/${x}" >> ${icfg} - - if [ -e "$1/boot/${x}.igz" ] - then - echo "initrd=/boot/${x}.igz" >> ${icfg} - fi - - echo "label=${x}" >> ${icfg} - echo "read-write" >> ${icfg} - echo "append=\"${default_append_line}\"" >> ${icfg} - - for y in ${clst_kernel_console} - do - echo >> ${icfg} - echo "image=/boot/${x}" >> ${icfg} - - if [ -e "$1/boot/${x}.igz" ] - then - echo "initrd=/boot/${x}.igz" >> ${icfg} - fi - - echo "label=${x}-${y} " >> ${icfg} - echo "read-write" >> ${icfg} - echo "append=\"${default_append_line} console=${y}\"" >> ${icfg} - done - else - echo >> ${icfg} - echo "image=/boot/${x}" >> ${icfg} - - if [ -e "$1/boot/${x}.igz" ] - then - echo "initrd=/boot/${x}.igz" >> ${icfg} - fi - - echo "label=${x}" >> ${icfg} - echo "read-write" >> ${icfg} - echo "append=\"${default_append_line}\"" >> ${icfg} - fi + echo "submenu 'Special console options (kernel: ${x})' --class gnu-linux --class os {" >> ${iacfg} + for y in ${clst_kernel_console} + do + echo "menuentry 'Boot LiveCD (kernel: ${x} console=${y})' --class gnu-linux --class os {" >> ${iacfg} + echo " linux ${kern_subdir}/${x} ${default_append_line} console=${y}" >> ${iacfg} + echo " initrd ${kern_subdir}/${x}.igz" >> ${iacfg} + echo "}" >> ${iacfg} + echo "" >> ${iacfg} + done + echo "}" >> ${iacfg} fi + echo "" >> ${iacfg} done - - if [ "${IBM_YABOOT}" == "FALSE" ] - then - rm ${etc_kmsg} - rmdir $1/etc - if [ -d $1/ppc ] - then - rm -r $1/ppc - fi - fi - ;; sparc*) # NO SOFTLEVEL SUPPORT YET