Replace "." with "source".
[catalyst.git] / targets / support / bootloader-setup.sh
old mode 100755 (executable)
new mode 100644 (file)
index 2df6040..2832b9f
@@ -1,12 +1,11 @@
 #!/bin/bash
-. ${clst_sharedir}/targets/support/functions.sh
-. ${clst_sharedir}/targets/support/filesystem-functions.sh
+source ${clst_sharedir}/targets/support/functions.sh
+source ${clst_sharedir}/targets/support/filesystem-functions.sh
 
 # $1 is the destination root
 
 extract_cdtar $1
 extract_kernels $1/boot
-check_dev_manager
 check_bootargs
 check_filesystem_type
 
@@ -44,9 +43,16 @@ case ${clst_hostarch} in
                icfg=$1/boot/palo.conf
                kmsg=$1/boot/kernels.msg
                hmsg=$1/boot/help.msg
-               echo "--commandline=0/${first} initrd=${first}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts}" >> ${icfg}
+               # Make sure we strip the extension to the kernel to allow palo to choose
+               boot_kernel_common_name=${first/%32/}
+               boot_kernel_common_name=${boot_kernel_common_name/%64/}
+               echo "--commandline=0/${boot_kernel_common_name} initrd=${first}.igz root=/dev/ram0 init=/linuxrc cdroot ${cmdline_opts}" >> ${icfg}
                echo "--bootloader=boot/iplboot" >> ${icfg}
                echo "--ramdisk=boot/${first}.igz" >> ${icfg}
+               for x in ${clst_boot_kernel}
+               do
+                       echo "--recoverykernel=boot/${x}" >> ${icfg}
+               done
        ;;
        ppc*|powerpc*)
                # NO SOFTLEVEL SUPPORT YET
@@ -58,27 +64,27 @@ case ${clst_hostarch} in
                echo "fgcolor=white" >> ${icfg}
                echo "bgcolor=black" >> ${icfg}
                echo "message=/boot/boot.msg" >> ${icfg}
-               
+
                # Here is where I fix up the boot.msg file.
                sed -e 's/ARCH/PowerPC/' \
                        -e 's/HARDWARE/Apple and IBM hardware/' \
                        -i $kmsg
 
-               # Setup the IBM yaboot.conf     
+               # Setup the IBM yaboot.conf
                etc_icfg=$1/etc/yaboot.conf
-               mkdir -p $1/etc 
+               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}
-               
+
                for x in ${clst_boot_kernel}
-               do      
+               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" ]
                        then
@@ -141,7 +147,7 @@ case ${clst_hostarch} in
                                        echo "label=${x}" >> ${icfg}
                                        echo "read-write" >> ${icfg}
                                        echo "append=\"${default_append_line}\"" >> ${icfg}
-                                       
+
                                        for y in ${clst_kernel_console}
                                        do
                                                echo >> ${icfg}
@@ -173,7 +179,7 @@ case ${clst_hostarch} in
                done
 
                if [ "${IBM_YABOOT}" == "FALSE" ]
-               then 
+               then
                        rm ${etc_kmsg}
                        rmdir $1/etc
                        if [ -d $1/ppc ]
@@ -229,6 +235,11 @@ case ${clst_hostarch} in
                        echo "  initrd=/efi/boot/${x}.igz" >> ${iacfg}
                        echo >> ${iacfg}
                        echo "image=/efi/boot/${x}" >> ${iacfg}
+                       echo "  label=${x}-ilo">> ${iacfg}
+                       echo '  append="'initrd=${x}.igz ${default_append_line}' console=tty0 console=ttyS3,9600"' >> ${iacfg}
+                       echo "  initrd=/efi/boot/${x}.igz" >> ${iacfg}
+                       echo >> ${iacfg}
+                       echo "image=/efi/boot/${x}" >> ${iacfg}
                        echo "  label=${x}-sgi">> ${iacfg}
                        echo '  append="'initrd=${x}.igz ${default_append_line}' console=tty0 console=ttySG0,115200"' >> ${iacfg}
                        echo "  initrd=/efi/boot/${x}.igz" >> ${iacfg}
@@ -246,6 +257,7 @@ case ${clst_hostarch} in
                        kmsg=$1/isolinux/kernels.msg
                        echo "default ${first}" > ${icfg}
                        echo "timeout 150" >> ${icfg}
+                       echo "ontimeout localhost" >> ${icfg}
                        echo "prompt 1" >> ${icfg}
                        echo "display boot.msg" >> ${icfg}
                        echo "F1 kernels.msg" >> ${icfg}
@@ -268,7 +280,7 @@ case ${clst_hostarch} in
                                eval custom_kopts=\$${x}_kernelopts
                                echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}"
                                echo >> ${icfg}
-                               
+
                                eval "clst_kernel_softlevel=\$clst_boot_kernel_${x}_softlevel"
 
                                if [ -n "${clst_kernel_softlevel}" ]
@@ -308,6 +320,10 @@ case ${clst_hostarch} in
                                echo "label memtest86" >> $icfg
                                echo "  kernel memtest86" >> $icfg
                        fi
+                       echo >> $icfg
+                       echo "label localhost" >> $icfg
+                       echo "  localboot -1" >> $icfg
+                       echo "  MENU HIDE" >> $icfg
                fi
 
                if [ -e $1/boot/efi/elilo.efi ]
@@ -359,9 +375,9 @@ case ${clst_hostarch} in
                                eval custom_kopts=\$${x}_kernelopts
                                echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}"
                                echo >> ${icfg}
-                               
+
                                eval "clst_kernel_softlevel=\$clst_boot_kernel_${x}_softlevel"
-                               
+
                                if [ -n "${clst_kernel_softlevel}" ]
                                then
                                        for y in ${clst_kernel_softlevel}