Hello community, here is the log from the commit of package lilo checked in at Sat Nov 18 12:05:15 CET 2006. -------- --- arch/ppc/lilo/lilo.changes 2006-11-13 14:30:55.000000000 +0100 +++ /mounts/work_src_done/STABLE/lilo/lilo.changes 2006-11-14 22:21:29.000000000 +0100 @@ -1,0 +2,26 @@ +Tue Nov 14 22:20:49 CET 2006 - olh@suse.de + +- update the yaboot 'help' text + +------------------------------------------------------------------- +Tue Nov 14 21:57:09 CET 2006 - olh@suse.de + +- handle load errors in yaboot, stop after the first error + ramdisk loading is not fatal. + +------------------------------------------------------------------- +Tue Nov 14 20:08:37 CET 2006 - olh@suse.de + +- correct newline printing in yaboots label tab completion + +------------------------------------------------------------------- +Tue Nov 14 16:16:32 CET 2006 - jplack@suse.de + +- do hformat HFS partition if mount fails (#118023) +- use &device; instead of full of path in os-chooser (#194118) +- make timeout to select macos/linux boot configurable (#118776) +- copy global 'initrd=/boot/initrd' to boot device for pmac_old and + pmac_new (#177481) +- bump version to 10.1.21 + +------------------------------------------------------------------- Old: ---- yaboot-10.1.21-r892.tar.bz2 New: ---- yaboot-10.1.21-r904.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lilo.spec ++++++ --- /var/tmp/diff_new_pack.CFezTD/_old 2006-11-18 12:05:06.000000000 +0100 +++ /var/tmp/diff_new_pack.CFezTD/_new 2006-11-18 12:05:06.000000000 +0100 @@ -11,7 +11,7 @@ # norootforbuild Name: lilo -%define yaboot_vers 10.1.21-r892 +%define yaboot_vers 10.1.21-r904 Group: System/Boot License: BSD License and BSD-like, Other License(s), see package Summary: The Linux Loader, a Boot Menu @@ -24,7 +24,7 @@ Requires: binutils Requires: parted Version: 10.1.21 -Release: 1 +Release: 4 Source0: lilo-%{version}.tar.bz2 Source1: http://penguinppc.org/projects/yaboot/yaboot-%{yaboot_vers}.tar.bz2 # $Id: lilo.spec 870 2006-11-07 12:31:45Z olh $ @@ -157,6 +157,20 @@ %doc %{_mandir}/*/* %changelog -n lilo +* Tue Nov 14 2006 - olh@suse.de +- update the yaboot 'help' text +* Tue Nov 14 2006 - olh@suse.de +- handle load errors in yaboot, stop after the first error + ramdisk loading is not fatal. +* Tue Nov 14 2006 - olh@suse.de +- correct newline printing in yaboots label tab completion +* Tue Nov 14 2006 - jplack@suse.de +- do hformat HFS partition if mount fails (#118023) +- use &device; instead of full of path in os-chooser (#194118) +- make timeout to select macos/linux boot configurable (#118776) +- copy global 'initrd=/boot/initrd' to boot device for pmac_old and + pmac_new (#177481) +- bump version to 10.1.21 * Mon Nov 13 2006 - olh@suse.de - handle second ide port and cdrom device paths on pegasos (218692) * Mon Nov 13 2006 - olh@suse.de ++++++ lilo-10.1.21.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lilo-10.1.21/lilo-chrp.lib new/lilo-10.1.21/lilo-chrp.lib --- old/lilo-10.1.21/lilo-chrp.lib 2006-10-23 13:32:43.000000000 +0200 +++ new/lilo-10.1.21/lilo-chrp.lib 2006-11-14 17:11:42.000000000 +0100 @@ -1,5 +1,5 @@ #! /bin/bash -# $Id: lilo-chrp.lib 832 2006-10-23 11:32:43Z olh $ +# $Id: lilo-chrp.lib 897 2006-11-14 16:11:42Z jplack $ # vim: syntax=sh # # library for CHRP routines @@ -7,7 +7,7 @@ unset firmware_status unset running_on_chrp unset running_on_prep -unset running_on_pegaos +unset running_on_pegasos FW_STATUS_FILE=/lib/lilo/chrp/firmware_status.chrp diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lilo-10.1.21/lilo-pmac.lib new/lilo-10.1.21/lilo-pmac.lib --- old/lilo-10.1.21/lilo-pmac.lib 2006-11-07 13:06:07.000000000 +0100 +++ new/lilo-10.1.21/lilo-pmac.lib 2006-11-14 17:11:42.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: lilo-pmac.lib 867 2006-11-07 12:06:07Z olh $ +# $Id: lilo-pmac.lib 897 2006-11-14 16:11:42Z jplack $ # vim: syntax=sh # # library for PowerMac routings @@ -28,16 +28,16 @@ test -z "$OPTION_DEFAULT" || echo "default = $OPTION_DEFAULT" test -z "$OPTION_ROOT" || echo "root = $OPTION_ROOT" test -z "$OPTION_APPEND" || echo "append = \"$OPTION_APPEND\"" - test -z "$OPTION_INITRD" || echo "initrd = ${HFS_BOOTFOLDER}:`basename ${OPTION_INITRD}`" + test -z "$OPTION_INITRD" || echo "initrd = ${HFS_BOOTFOLDER}:initrd.def" echo for (( i=1; i<=CONFIG_IMAGE_COUNT; i++ )); do test -z "${CONFIG_IMAGE_OTHER[$i]}" || continue test "${CONFIG_IMAGE_OPTIONAL[$i]}" = "skip" && continue - echo "image = ${HFS_BOOTFOLDER}:`basename ${CONFIG_IMAGE_FILE[$i]}`" + echo "image = ${HFS_BOOTFOLDER}:" $(printf "vmlinux.%03d" $i) test -z "${CONFIG_IMAGE_LABEL[$i]}" || echo " label = ${CONFIG_IMAGE_LABEL[$i]}" test -z "${CONFIG_IMAGE_ROOT[$i]}" || echo " root = ${CONFIG_IMAGE_ROOT[$i]}" test -z "${CONFIG_IMAGE_APPEND[$i]}" || echo " append = \"${CONFIG_IMAGE_APPEND[$i]}\"" - test -z "${CONFIG_IMAGE_INITRD[$i]}" || echo " initrd = ${HFS_BOOTFOLDER}:`basename ${CONFIG_IMAGE_INITRD[$i]}`" + test -z "${CONFIG_IMAGE_INITRD[$i]}" || echo " initrd = ${HFS_BOOTFOLDER}:"$(printf "initrd.%03d" $i) echo done echo @@ -51,7 +51,11 @@ humount $OPTION_BOOT 2>/dev/null humount $OPTION_BOOT 2>/dev/null - hmount $OPTION_BOOT || exit 1 + hmount $OPTION_BOOT || { + echo "Mounting of $OPTION_BOOT failed, trying again after formatting" + hformat -l "Linux boot partition" $OPTION_BOOT + hmount $OPTION_BOOT || exit 1 + } echo using bootfolder \'$HFS_BOOTFOLDER\' on volume `hpwd` on $OPTION_BOOT hmkdir $HFS_BOOTFOLDER 2>/dev/null hattrib -b $HFS_BOOTFOLDER @@ -62,13 +66,14 @@ hattrib -t TEXT -c "R*ch" :miboot.conf hattrib -t FNDR -c MACS Finder hattrib -t zsys -c MACS System + [ "$OPTION_INITRD" ] && hcopy $OPTION_INITRD :initrd.def for (( i=1; i<=CONFIG_IMAGE_COUNT; i++ )); do test -z "${CONFIG_IMAGE_OTHER[$i]}" || continue test "${CONFIG_IMAGE_OPTIONAL[$i]}" = "skip" && continue - hcopy ${CONFIG_IMAGE_FILE[$i]} :`basename ${CONFIG_IMAGE_FILE[$i]}` + hcopy ${CONFIG_IMAGE_FILE[$i]} :$(printf "vmlinux.%03d" $i) if [ "${CONFIG_IMAGE_INITRD[$i]}" ]; then - hcopy ${CONFIG_IMAGE_INITRD[$i]} :`basename ${CONFIG_IMAGE_INITRD[$i]}` + hcopy ${CONFIG_IMAGE_INITRD[$i]} :$(printf "initrd.%03d" $i) fi done hpwd @@ -129,12 +134,13 @@ test -z "$OPTION_ROOT" || echo "root = $OPTION_ROOT" test -z "$OPTION_APPEND" || echo "append = \"$OPTION_APPEND\"" test -z "$OPTION_INITRD" || echo "initrd = $OPTION_INITRD" + test -z "$OPTION_INITRD" || echo "initrd = initrd.def" for (( i=1; i<=CONFIG_IMAGE_COUNT; i++ )); do [ "${CONFIG_IMAGE_OTHER[$i]}" ] && continue test "${CONFIG_IMAGE_OPTIONAL[$i]}" = "skip" && continue if [ "${CONFIG_IMAGE_PATH[$i]}" = "copy" ] ; then - echo "image = `basename ${CONFIG_IMAGE_FILE[$i]}`" + echo "image = "$(printf "vmlinux.%03d" $i) else echo "image = ${CONFIG_IMAGE_PATH[$i]}" fi @@ -145,7 +151,7 @@ if [ "${CONFIG_IMAGE_INITRD[$i]}" ]; then if [ "${CONFIG_IMAGE_INITRDPATH[$i]}" = "copy" ] ; then - echo " initrd = `basename ${CONFIG_IMAGE_INITRD[$i]}`" + echo " initrd = $(printf "initrd.%03d" $i)" else echo " initrd = ${CONFIG_IMAGE_INITRDPATH[$i]}" fi @@ -153,11 +159,13 @@ done } > $TEMP/yaboot.conf - BOOT_DEVICEPATH=$(get_of_path $OPTION_BOOT) + # BOOT_DEVICEPATH=$(get_of_path $OPTION_BOOT) + BOOT_DEVICEPATH="&device;:&partition;" OTHER_DEVICEPATH=$(get_of_path $OPTION_OTHER) + TIMEOUT=${OPTION_MACOSTIMEOUT:-5} - echo "BOOT_DEVICEPATH = $BOOT_DEVICEPATH" - echo "OTHER_DEVICEPATH = $OTHER_DEVICEPATH" + echo "BOOT_DEVICEPATH = $BOOT_DEVICEPATH" + echo "OTHER_DEVICEPATH = $OTHER_DEVICEPATH" { cat <<-EOF <CHRP-BOOT> @@ -242,7 +250,7 @@ " "(0d 0a)" fb8-write drop " "(0d 0a)" fb8-write drop " "(09) press space to boot $SPACE_BAR_HINT ... " fb8-write drop - get-msecs d# 5 3E8 * + + get-msecs d# $TIMEOUT 3E8 * + begin key? if key case @@ -280,7 +288,11 @@ humount $OPTION_BOOT 2>/dev/null humount $OPTION_BOOT 2>/dev/null - hmount $OPTION_BOOT || exit 1 + hmount $OPTION_BOOT || { + echo "Mounting of $OPTION_BOOT failed, trying again after formatting" + hformat -l "Linux boot partition" $OPTION_BOOT + hmount $OPTION_BOOT || exit 1 + } HFS_BOOTFOLDER="${OPTION_BOOTFOLDER:-$DEFAULT_BOOTFOLDER}" hmkdir $HFS_BOOTFOLDER 2>/dev/null @@ -298,16 +310,17 @@ hcopy $TEMP/os-chooser :os-chooser hattrib -t BINA -c UNIX yaboot hattrib -t tbxi -c chrp os-chooser - + [ "$OPTION_INITRD" ] && hcopy $OPTION_INITRD :initrd.def + for (( i=1; i<=CONFIG_IMAGE_COUNT; i++ )); do test -z "${CONFIG_IMAGE_OTHER[$i]}" || continue test "${CONFIG_IMAGE_OPTIONAL[$i]}" = "skip" && continue if [ "${CONFIG_IMAGE_PATH[$i]}" = "copy" ] ; then - hcopy ${CONFIG_IMAGE_FILE[$i]} :`basename ${CONFIG_IMAGE_FILE[$i]}` + hcopy ${CONFIG_IMAGE_FILE[$i]} :$(printf "vmlinux.%03d" $i) fi test -z "${CONFIG_IMAGE_INITRD[$i]}" || ( if [ "${CONFIG_IMAGE_INITRDPATH[$i]}" = "copy" ] ; then - hcopy ${CONFIG_IMAGE_INITRD[$i]} :`basename ${CONFIG_IMAGE_INITRD[$i]}` + hcopy ${CONFIG_IMAGE_INITRD[$i]} :$(printf "initrd.%03d" $i) fi ) done hpwd diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lilo-10.1.21/lilo.new new/lilo-10.1.21/lilo.new --- old/lilo-10.1.21/lilo.new 2006-10-30 14:07:26.000000000 +0100 +++ new/lilo-10.1.21/lilo.new 2006-11-14 17:11:42.000000000 +0100 @@ -1,5 +1,5 @@ #! /bin/bash -# $Id: lilo.new 846 2006-10-30 13:07:26Z olh $ +# $Id: lilo.new 897 2006-11-14 16:11:42Z jplack $ # # a simple lilo to store the boot loader and the kernel images # in bash2 ... Think different [tm] @@ -528,6 +528,7 @@ # OPTION_ACTIVATE is a flag whether or not the boot partition must be set active in OF # OPTION_USE_OS_CHOOSER is a flag whether or not the Forth script used as bootfile will open the screen # OPTION_TIMEOUT contains the timeout variable in seconds + # OPTION_MACOSTIMEOUT contains the timeout between linux/macos in seconds # OPTION_DEFAULT contains the default label # OPTION_ROOT contains the global or local root= device # OPTION_APPEND contains the global or local append= strings @@ -611,6 +612,10 @@ [ "$CONFIG_PARSE_HASIMAGE" ] && error 7 OPTION_TIMEOUT=$value ;; + macos_timeout) + [ "$CONFIG_PARSE_HASIMAGE" ] && error 7 + OPTION_MACOSTIMEOUT=$value + ;; default) [ "$CONFIG_PARSE_HASIMAGE" ] && error 7 OPTION_DEFAULT=$value ++++++ yaboot-10.1.21-r892.tar.bz2 -> yaboot-10.1.21-r904.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r892/Changelog.SuSE new/yaboot-10.1.21-r904/Changelog.SuSE --- old/yaboot-10.1.21-r892/Changelog.SuSE 2006-11-13 14:36:31.000000000 +0100 +++ new/yaboot-10.1.21-r904/Changelog.SuSE 2006-11-18 00:29:53.000000000 +0100 @@ -1,4 +1,62 @@ ------------------------------------------------------------------------ +r904 | olh | 2006-11-14 21:21:29 +0000 (Tue, 14 Nov 2006) | 2 lines +Changed paths: + M /trunk/lilo.changes + M /trunk/yaboot/second/yaboot.c + ++- update the yaboot 'help' text + +------------------------------------------------------------------------ +r903 | olh | 2006-11-14 21:02:28 +0000 (Tue, 14 Nov 2006) | 1 line +Changed paths: + M /trunk/yaboot/second/fs_reiserfs.c + M /trunk/yaboot/second/yaboot.c + +run indent +------------------------------------------------------------------------ +r902 | olh | 2006-11-14 21:01:02 +0000 (Tue, 14 Nov 2006) | 3 lines +Changed paths: + M /trunk/lilo.changes + M /trunk/yaboot/second/yaboot.c + ++- handle load errors in yaboot, stop after the first error ++ ramdisk loading is not fatal. + +------------------------------------------------------------------------ +r901 | olh | 2006-11-14 20:50:57 +0000 (Tue, 14 Nov 2006) | 1 line +Changed paths: + M /trunk/yaboot/second/cfg.c + M /trunk/yaboot/second/cmdline.c + +more newline fixes for tabcompletion +------------------------------------------------------------------------ +r900 | olh | 2006-11-14 19:09:48 +0000 (Tue, 14 Nov 2006) | 2 lines +Changed paths: + M /trunk/lilo.changes + M /trunk/yaboot/second/cfg.c + ++- correct newline printing in yaboots label tab completion + +------------------------------------------------------------------------ +r899 | olh | 2006-11-14 19:06:46 +0000 (Tue, 14 Nov 2006) | 1 line +Changed paths: + M /trunk/yaboot/second/cfg.c + +in printlabel, do not print trailing blanks after the third label +------------------------------------------------------------------------ +r898 | olh | 2006-11-14 19:05:30 +0000 (Tue, 14 Nov 2006) | 1 line +Changed paths: + M /trunk/yaboot/second/cfg.c + +in cfg_print_images, do not overwrite parts of tab_completion_buf when buf is larger than the longest label +------------------------------------------------------------------------ +r896 | olh | 2006-11-14 13:25:21 +0000 (Tue, 14 Nov 2006) | 1 line +Changed paths: + M /trunk/yaboot/include/prom.h + M /trunk/yaboot/second/prom.c + + remove the dead code again which reads /openprom/built-on +------------------------------------------------------------------------ r892 | olh | 2006-11-13 12:24:01 +0000 (Mon, 13 Nov 2006) | 2 lines Changed paths: M /trunk/lilo.changes diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r892/Makefile new/yaboot-10.1.21-r904/Makefile --- old/yaboot-10.1.21-r892/Makefile 2006-11-13 14:36:31.000000000 +0100 +++ new/yaboot-10.1.21-r904/Makefile 2006-11-18 00:29:53.000000000 +0100 @@ -6,7 +6,7 @@ include Config -VERSION = 10.1.21-r892 +VERSION = 10.1.21-r904 # Debug mode (spam/verbose) DEBUG = 0 # make install vars diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r892/include/prom.h new/yaboot-10.1.21-r904/include/prom.h --- old/yaboot-10.1.21-r892/include/prom.h 2006-10-30 16:53:10.000000000 +0100 +++ new/yaboot-10.1.21-r904/include/prom.h 2006-11-14 14:25:21.000000000 +0100 @@ -47,7 +47,6 @@ extern prom_handle prom_stdin; extern prom_handle prom_stdout; extern int stdout_is_screen; -extern unsigned int of_built_on; prom_handle prom_open(const char *spec); int prom_read(prom_handle file, void *buf, int len); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r892/second/cfg.c new/yaboot-10.1.21-r904/second/cfg.c --- old/yaboot-10.1.21-r892/second/cfg.c 2006-11-13 13:24:01.000000000 +0100 +++ new/yaboot-10.1.21-r904/second/cfg.c 2006-11-14 21:50:57.000000000 +0100 @@ -414,14 +414,19 @@ { int len = strlen(label); - if (!printl_count) + if (!printl_count) { + printl_count++; prom_printf("\n"); + } prom_printf("%s %s", defflag ? "*" : " ", label); - while (len++ < 25) - prom_putchar(' '); + if (printl_count < 4) + while (len++ < 25) + prom_putchar(' '); printl_count++; - if (printl_count == 3) - printl_count = 0; + if (printl_count == 4) { + prom_printf("\n"); + printl_count = 1; + } } int cfg_print_images(char *buf, int len, int remaining) @@ -429,7 +434,10 @@ struct IMAGES *p; char *label, *alias, *image, *last_match; char *def; - int label_match_count, curlen, following_char, print_matching_labels; + int label_match_count, curlen, following_char, print_matching_labels, added; + + if (len > tab_completion_len) + return 0; printl_count = print_matching_labels = 0; following_char = -1; @@ -530,11 +538,12 @@ } while (label_match_count || print_matching_labels == 1); - if (print_matching_labels > 1 && printl_count) + added = strlen(tab_completion_buf) - len; + if (printl_count == 2 || printl_count == 3) prom_printf("\n"); if (len) memcpy(buf, tab_completion_buf, strlen(tab_completion_buf) + 1); - return strlen(tab_completion_buf) - len; + return added; } char *cfg_get_default(void) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r892/second/cmdline.c new/yaboot-10.1.21-r904/second/cmdline.c --- old/yaboot-10.1.21-r892/second/cmdline.c 2006-11-13 13:24:01.000000000 +0100 +++ new/yaboot-10.1.21-r904/second/cmdline.c 2006-11-14 21:50:57.000000000 +0100 @@ -59,8 +59,8 @@ int label_len, print_label, c; int ret_len, pb, nl; char *p; - ret_len = 0; - pb = nl = 1; + ret_len = nl = 0; + pb = 1; if (len > 0) { print_label = 0; p = buf; @@ -78,13 +78,10 @@ if (print_label) { label_len = len - (int)(p - buf); ret_len = cfg_print_images(p, label_len, CMD_LENG - len - 1); - if (ret_len) { - if (buf[len + ret_len - 1] != ' ') - nl = 0; - else - pb = 0; - } - } + if (ret_len && buf[len + ret_len - 1] == ' ') + pb = 0; + } else + nl = 1; } else cfg_print_images(NULL, 0, 0); if (pb) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r892/second/fs_reiserfs.c new/yaboot-10.1.21-r904/second/fs_reiserfs.c --- old/yaboot-10.1.21-r892/second/fs_reiserfs.c 2006-09-22 23:38:46.000000000 +0200 +++ new/yaboot-10.1.21-r904/second/fs_reiserfs.c 2006-11-14 22:02:28.000000000 +0100 @@ -658,7 +658,7 @@ while (offset < blocksize) { u32 blocknr = le32_to_cpu(((u32 *) - INFO->current_item)[offset >> INFO->blocksize_shift]); + INFO->current_item)[offset >> INFO->blocksize_shift]); int blk_offset = offset & (INFO->blocksize - 1); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r892/second/prom.c new/yaboot-10.1.21-r904/second/prom.c --- old/yaboot-10.1.21-r892/second/prom.c 2006-11-07 13:06:07.000000000 +0100 +++ new/yaboot-10.1.21-r904/second/prom.c 2006-11-14 14:25:21.000000000 +0100 @@ -43,8 +43,6 @@ static ihandle prom_mmu; static ihandle prom_chosen; -static ihandle prom_openprom; -unsigned int of_built_on; struct prom_args { const char *service; @@ -234,16 +232,6 @@ } } -static void get_openprom_build_date(void) -{ - unsigned int built_on; - if (prom_getprop(prom_openprom, "built-on", &built_on, sizeof(built_on)) == 4) { - if (built_on > 20040101 && built_on < 20991231) { - of_built_on = built_on; - } - } -} - /* G5 with nvidia card crash when no monitor is connected */ static void open_output_device(void) { @@ -306,9 +294,6 @@ open_output_device(); } - prom_openprom = prom_finddevice("/openprom"); - if (prom_openprom != (void *)-1) - get_openprom_build_date(); if (prom_get_chosen("stdout", &prom_stdout, sizeof(prom_stdout)) <= 0) prom_exit(); if (prom_get_chosen("stdin", &prom_stdin, sizeof(prom_stdin)) <= 0) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r892/second/yaboot.c new/yaboot-10.1.21-r904/second/yaboot.c --- old/yaboot-10.1.21-r892/second/yaboot.c 2006-11-13 13:24:01.000000000 +0100 +++ new/yaboot-10.1.21-r904/second/yaboot.c 2006-11-14 22:21:29.000000000 +0100 @@ -105,7 +105,6 @@ static struct path_description default_device; static int _cpu; - extern char __bss_start[]; extern char _start[]; extern char _end[]; @@ -775,9 +774,9 @@ prom_interpret("reset-all"); } -static void print_boot(const char *p, const int nl) +static void print_boot(const char *p, const int nl) { - prom_printf("%sboot: %s", nl ? "\n": "", p ? p : ""); + prom_printf("%sboot: %s", nl ? "\n" : "", p ? p : ""); } static void print_all_labels(void) @@ -787,8 +786,13 @@ print_boot(NULL, 0); } } +enum get_params_result { + GET_PARAMS_FATAL, + GET_PARAMS_OK, + GET_PARAMS_STOP, +}; -static int get_params(struct boot_param_t *params) +static enum get_params_result get_params(struct boot_param_t *params, enum get_params_result gpr) { struct path_description img_def_device; char *p, *q, *cmdbuff, *imagename, *label; @@ -796,7 +800,7 @@ cmdbuff = cmdlineinit(); if (!cmdbuff) - return 1; + return GET_PARAMS_FATAL; imagename = label = NULL; restricted = c = 0; @@ -806,7 +810,7 @@ print_boot(NULL, 0); - if (useconf && (p = cfg_get_strg(NULL, "timeout")) && *p) { + if (gpr == GET_PARAMS_OK && useconf && (p = cfg_get_strg(NULL, "timeout")) && *p) { timeout = simple_strtol(p, NULL, 0); if (timeout > 0) { timeout = prom_getms() + 100 * timeout; @@ -866,35 +870,38 @@ } if (imagename == NULL) - return 0; + return GET_PARAMS_STOP; if (!strcmp(imagename, "help")) { - prom_printf("\nPress the tab key for a list of defined images.\n" - "The label marked with a \"*\" is is the default image, " - "press <return> to boot it.\n\n" - "To boot any other label simply type its name and press <return>.\n\n" - "To boot a kernel image which is not defined in the yaboot configuration \n" - "file, enter the kernel image name as [[device:][partno],]/path, where \n" - "\"device:\" is the OpenFirmware device path to the disk the image \n" - "resides on, and \"partno\" is the partition number the image resides on.\n" - "Note that the comma (,) is only required if you specify an OpenFirmware\n" - "device, if you only specify a filename you should not start it with a \",\"\n\n" - "If you omit \"device:\" and \"partno\" yaboot will use the values of \n" - "\"device=\" and \"partition=\" in yaboot.conf, right now those are set to: \n" - "device=%s\n" "partition=%d\n\n", default_device.device, default_device.part); - return 0; + prom_printf(" Press the tab key for a list of defined images.\n" + " The label marked with a \"*\" is is the default image, press <return> to boot it.\n\n" + " To boot any other label simply type its name and press <return>.\n" + " It is also possible to expand a label with the tab key.\n\n" + " To boot a kernel image which is not defined in the yaboot configuration \n" + " file, enter the kernel image name as [[device:[partno]],]/path, where \n" + " \"device:\" is the OpenFirmware device path to the disk the image \n" + " resides on, and \"partno\" is the partition number the image resides on.\n" + " Note that the comma (,) is only required if you specify an OpenFirmware\n" + " device, if you only specify a filename you should not start it with a \",\"\n" + " The shortcut '&device;' can be used to specify the OpenFirmware device path\n" + " where yaboot was loaded from.\n\n" + " To load an initrd, specify its path as initrd=[[device:[partno]],]/path\n\n" + " If you omit \"device:\" and \"partno\" yaboot will use the values of \n" + " \"device=\" and \"partition=\" in yaboot.conf, right now those are set to: \n" + " device=%s\n partition=%d\n\n", default_device.device, default_device.part); + return GET_PARAMS_STOP; } if (!strcmp(imagename, "halt")) { if (password) check_password("Restricted command."); prom_pause(); - return 0; + return GET_PARAMS_FATAL; } if (!strcmp(imagename, "bye")) { if (password) check_password("Restricted command."); - return 1; + return GET_PARAMS_FATAL; } if (imagename[0] == '$') { @@ -902,7 +909,7 @@ if (password) check_password("OpenFirmware commands are restricted."); prom_interpret(imagename + 1); - return 0; + return GET_PARAMS_STOP; } if (!label && password) @@ -910,7 +917,7 @@ if (!imagepath_to_path_description(imagename, ¶ms->kernel, &img_def_device)) { prom_printf("%s: Unable to parse\n", imagename); - return 0; + return GET_PARAMS_STOP; } p = strstr(params->args, "initrd="); @@ -929,7 +936,7 @@ if (!imagepath_to_path_description(p, ¶ms->rd, &img_def_device)) prom_printf("%s: Unable to parse\n", p); } - return 0; + return GET_PARAMS_OK; } /* This is derived from quik core. To be changed to first parse the headers @@ -942,6 +949,7 @@ struct boot_file_t file; int result; + enum get_params_result gpr; struct boot_param_t params; void *claim_base; void *initrd_base; @@ -956,13 +964,17 @@ if (!make_params_buffer) return; loadinfo.load_loc = 0; + gpr = GET_PARAMS_OK; for (;;) { initrd_size = 0; initrd_base = NULL; - if (get_params(¶ms)) + gpr = get_params(¶ms, gpr); + if (gpr == GET_PARAMS_FATAL) return; + if (gpr == GET_PARAMS_STOP) + continue; prom_printf("Please wait, loading kernel...\n"); @@ -973,6 +985,7 @@ prom_perror(result, msg); free(msg); } + gpr = GET_PARAMS_STOP; continue; } @@ -982,24 +995,28 @@ if (file.fs->read(&file, sizeof(Elf_Ident), &loadinfo.elf) < sizeof(Elf_Ident)) { prom_printf("\nCan't read Elf e_ident/e_type/e_machine info\n"); file.fs->close(&file); + gpr = GET_PARAMS_STOP; continue; } if (is_elf32(&loadinfo)) { if (!load_elf32(&file, &loadinfo)) { file.fs->close(&file); + gpr = GET_PARAMS_STOP; continue; } prom_printf(" Elf32 kernel loaded...\n"); } else if (is_elf64(&loadinfo)) { if (!load_elf64(&file, &loadinfo)) { file.fs->close(&file); + gpr = GET_PARAMS_STOP; continue; } prom_printf(" Elf64 kernel loaded...\n"); } else { prom_printf("%s: Not a valid ELF image\n", params.kernel.filename); file.fs->close(&file); + gpr = GET_PARAMS_STOP; continue; } file.fs->close(&file); @@ -1021,6 +1038,7 @@ prom_perror(result, msg); free(msg); } + gpr = GET_PARAMS_STOP; } else { #define INITRD_CHUNKSIZE 0x400000 /* put initrd after the kernels final location */ @@ -1067,10 +1085,10 @@ free(msg); } prom_printf("ramdisk loaded %08lx @ %p\n", initrd_size, initrd_base); - } else { prom_printf("ramdisk load failed !\n"); - prom_pause(); + gpr = GET_PARAMS_STOP; + continue; } } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org