Hello community,
here is the log from the commit of package lilo
checked in at Fri Dec 8 16:25:36 CET 2006.
--------
--- arch/ppc/lilo/lilo.changes 2006-11-28 00:59:03.000000000 +0100
+++ /mounts/work_src_done/STABLE/lilo/lilo.changes 2006-12-08 15:22:21.000000000 +0100
@@ -1,0 +2,21 @@
+Fri Dec 8 15:21:28 CET 2006 - olh@suse.de
+
+- recognize iscsi boots in yaboot (218773 - LTC28334)
+
+-------------------------------------------------------------------
+Fri Dec 8 15:04:07 CET 2006 - olh@suse.de
+
+- recognize iscsi volumes with static ipv4 settings in show_of_path.sh
+ (218773 - LTC28334)
+
+-------------------------------------------------------------------
+Tue Dec 5 12:50:11 CET 2006 - olh@suse.de
+
+- remove empty /etc/yaboot.conf (170338)
+
+-------------------------------------------------------------------
+Mon Dec 4 19:52:51 CET 2006 - olh@suse.de
+
+- add prom_getproplen_chosen to yaboot
+
+-------------------------------------------------------------------
Old:
----
lilo-10.1.21.tar.bz2
yaboot-10.1.21-r910.tar.bz2
New:
----
lilo-10.1.22.tar.bz2
yaboot-10.1.22-r918.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lilo.spec ++++++
--- /var/tmp/diff_new_pack.nA4BKG/_old 2006-12-08 16:25:23.000000000 +0100
+++ /var/tmp/diff_new_pack.nA4BKG/_new 2006-12-08 16:25:23.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package lilo (Version 10.1.21)
+# spec file for package lilo (Version 10.1.22)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,7 +11,7 @@
# norootforbuild
Name: lilo
-%define yaboot_vers 10.1.21-r910
+%define yaboot_vers 10.1.22-r918
Group: System/Boot
License: BSD License and BSD-like, Other License(s), see package
Summary: The Linux Loader, a Boot Menu
@@ -23,8 +23,8 @@
Requires: powerpc-utils
Requires: binutils
Requires: parted
-Version: 10.1.21
-Release: 10
+Version: 10.1.22
+Release: 1
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,15 @@
%doc %{_mandir}/*/*
%changelog -n lilo
+* Fri Dec 08 2006 - olh@suse.de
+- recognize iscsi boots in yaboot (218773 - LTC28334)
+* Fri Dec 08 2006 - olh@suse.de
+- recognize iscsi volumes with static ipv4 settings in show_of_path.sh
+ (218773 - LTC28334)
+* Tue Dec 05 2006 - olh@suse.de
+- remove empty /etc/yaboot.conf (170338)
+* Mon Dec 04 2006 - olh@suse.de
+- add prom_getproplen_chosen to yaboot
* Tue Nov 28 2006 - olh@suse.de
- reject Cell SLOF firmware, its not ready for primetime.
* Mon Nov 27 2006 - olh@suse.de
++++++ lilo-10.1.21.tar.bz2 -> lilo-10.1.22.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lilo-10.1.21/lilo-chrp.lib new/lilo-10.1.22/lilo-chrp.lib
--- old/lilo-10.1.21/lilo-chrp.lib 2006-11-14 17:11:42.000000000 +0100
+++ new/lilo-10.1.22/lilo-chrp.lib 2006-12-05 12:51:27.000000000 +0100
@@ -1,5 +1,5 @@
#! /bin/bash
-# $Id: lilo-chrp.lib 897 2006-11-14 16:11:42Z jplack $
+# $Id: lilo-chrp.lib 916 2006-12-05 11:51:27Z olh $
# vim: syntax=sh
#
# library for CHRP routines
@@ -706,6 +706,9 @@
echo "Converted /etc/lilo.conf to /etc/yaboot.conf"
fi
+ # remove empty yaboot.conf, created by get_of_path check above
+ if [ ! -s /etc/yaboot.conf ] ; then rm -v /etc/yaboot.conf ; fi
+
# TODO check whether this is neccessary
if [[ ${p_flags[$boot_partnr]} != *boot* ]]; then
parted_call $boot_device set $boot_partnr boot on >& $TEMP/parted.log || error 11
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lilo-10.1.21/lilo.new new/lilo-10.1.22/lilo.new
--- old/lilo-10.1.21/lilo.new 2006-11-28 00:59:03.000000000 +0100
+++ new/lilo-10.1.22/lilo.new 2006-11-28 00:59:03.000000000 +0100
@@ -66,7 +66,7 @@
function Usage() {
cat <,
# 2005 Joachim Plack
@@ -62,7 +62,7 @@
shopt -s extglob
-read d myversion d <<< "$Date: 2006-11-13 13:30:55 +0000 (Mon, 13 Nov 2006) $"
+read d myversion d <<< "$Date: 2006-12-08 14:06:28 +0000 (Fri, 08 Dec 2006) $"
function error() {
@@ -292,6 +292,15 @@
dbg_show of_disk_scsi_host of_disk_scsi_chan of_disk_scsi_id of_disk_scsi_lun
cd ../../../..
;;
+ */host+([0-9])/session+([0-9])/target+([0-9:])/+([0-9]):+([0-9]):+([0-9]):+([0-9]))
+ # iscsi 2.6.16.21 sles10 ga
+ declare spec="${file_full_sysfs_path##*/host+([0-9])\/session+([-0-9:])\/target+([0-9:])/}"
+
+ dbg_show spec
+ read of_disk_scsi_host of_disk_scsi_chan of_disk_scsi_id of_disk_scsi_lun <<< ${spec//:/ }
+ dbg_show of_disk_scsi_host of_disk_scsi_chan of_disk_scsi_id of_disk_scsi_lun
+ cd ../..
+ ;;
*)
# TODO check the rest of the (hardware) world
: file_full_sysfs_path $file_full_sysfs_path
@@ -300,6 +309,7 @@
# ieee1394_id
fi
+# iscsi has no devspec pointer into the OF device tree
if [ -f devspec ] ; then
read file_of_hw_devtype < devspec
file_of_hw_devtype=/proc/device-tree${file_of_hw_devtype}
@@ -524,6 +534,36 @@
;;
esac
else # no 'devspec' found
+ case "$file_full_sysfs_path" in
+ */host+([0-9])/session+([0-9])/*)
+ iscsi_session="${file_full_sysfs_path%/*}"
+ iscsi_session="${iscsi_session%/*}"
+ iscsi_session="${iscsi_session##*/}"
+ iscsi_connection="${iscsi_session#session*}"
+ # FIXME
+ iscsi_network_interface="` ip -o link show up | awk ' BEGIN { FS=":" ; foo="" } ; /link\/ether/ { if (foo == "") { foo=$2 } } ; END { print foo } ' `"
+ set -- $iscsi_network_interface
+ iscsi_network_interface=$1
+ iscsi_network_card="` cat /sys/class/net/$iscsi_network_interface/device/devspec `"
+ iscsi_itname="` awk ' BEGIN { FS="=" ; foo="" } ; /^InitiatorName=/{ if (foo == "") { foo=$2 } } ; END { print foo } ' /etc/initiatorname.iscsi `"
+ iscsi_ciaddr="` ip addr show dev $iscsi_network_interface | awk ' BEGIN { foo="" } ; / inet /{ if (foo == "") { foo=$2 } } ; END { print foo } ' `"
+ iscsi_giaddr="` ip route show dev $iscsi_network_interface | awk ' BEGIN { foo="" } ; /default via /{ if (foo == "") { foo=$3 } } ; END { print foo } ' `"
+ # FIXME
+ case "$iscsi_ciaddr" in
+ */8) iscsi_subnet_mask=255.0.0.0 ;;
+ */16) iscsi_subnet_mask=255.255.0.0 ;;
+ */24) iscsi_subnet_mask=255.255.255.0 ;;
+ *) iscsi_subnet_mask=0.0.0.0 ;;
+ esac
+ iscsi_ciaddr="${iscsi_ciaddr%/*}"
+ iscsi_siaddr="` cat connection$iscsi_connection:0/iscsi_connection:connection$iscsi_connection:0/persistent_address `"
+ iscsi_iname="` cat iscsi_session:$iscsi_session/targetname `"
+ iscsi_iport="` cat connection$iscsi_connection:0/iscsi_connection:connection$iscsi_connection:0/persistent_port `"
+ #FIXME
+ iscsi_ilun=0
+ file_of_hw_path="$iscsi_network_card:iscsi,itname=$iscsi_itname,ciaddr=$iscsi_ciaddr,giaddr=$iscsi_giaddr,subnet-mask=$iscsi_subnet_mask,siaddr=$iscsi_siaddr,iname=$iscsi_iname,iport=$iscsi_iport,ilun=$iscsi_ilun"
+ ;;
+ *)
echo >&2 "WARNING: No devspec file found for $file_full_sysfs_path"
dbg_show file_full_sysfs_path
@@ -624,7 +664,9 @@
file_of_hw_path=$(printf "%s/${dir}@%016x,%016x" "${of_device_path##/proc/device-tree}" $of_disk_scsi_id $of_disk_scsi_lun)
;;
esac
+ ;;
# no "devspec" available
+ esac
fi
#
++++++ yaboot-10.1.21-r910.tar.bz2 -> yaboot-10.1.22-r918.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r910/Changelog.SuSE new/yaboot-10.1.22-r918/Changelog.SuSE
--- old/yaboot-10.1.21-r910/Changelog.SuSE 2006-11-28 01:00:33.000000000 +0100
+++ new/yaboot-10.1.22-r918/Changelog.SuSE 2006-12-08 15:23:38.000000000 +0100
@@ -1,4 +1,35 @@
------------------------------------------------------------------------
+r918 | olh | 2006-12-08 14:22:21 +0000 (Fri, 08 Dec 2006) | 2 lines
+Changed paths:
+ M /trunk/lilo.changes
+ M /trunk/yaboot/second/parse_device_path.c
+
++- recognize iscsi boots in yaboot (218773 - LTC28334)
+
+------------------------------------------------------------------------
+r915 | olh | 2006-12-04 19:27:10 +0000 (Mon, 04 Dec 2006) | 1 line
+Changed paths:
+ M /trunk/yaboot/second/yaboot.c
+
+switch to prom_getproplen_chosen for bootpath and bootargs
+------------------------------------------------------------------------
+r914 | olh | 2006-12-04 18:53:08 +0000 (Mon, 04 Dec 2006) | 2 lines
+Changed paths:
+ M /trunk/lilo.changes
+ M /trunk/yaboot/include/prom.h
+ M /trunk/yaboot/second/prom.c
+
++- add prom_getproplen_chosen to yaboot
+
+------------------------------------------------------------------------
+r913 | olh | 2006-12-04 18:27:42 +0000 (Mon, 04 Dec 2006) | 1 line
+Changed paths:
+ M /trunk/yaboot/include/cmdline.h
+ M /trunk/yaboot/second/cmdline.c
+ M /trunk/yaboot/second/yaboot.c
+
+remove newline handling from print_boot, only one user
+------------------------------------------------------------------------
r910 | olh | 2006-11-27 22:57:16 +0000 (Mon, 27 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-r910/Makefile new/yaboot-10.1.22-r918/Makefile
--- old/yaboot-10.1.21-r910/Makefile 2006-11-28 01:00:33.000000000 +0100
+++ new/yaboot-10.1.22-r918/Makefile 2006-12-08 15:23:38.000000000 +0100
@@ -6,7 +6,7 @@
include Config
-VERSION = 10.1.21-r910
+VERSION = 10.1.22-r918
# Debug mode (spam/verbose)
DEBUG = 0
# make install vars
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r910/include/cmdline.h new/yaboot-10.1.22-r918/include/cmdline.h
--- old/yaboot-10.1.21-r910/include/cmdline.h 2006-11-13 13:24:01.000000000 +0100
+++ new/yaboot-10.1.22-r918/include/cmdline.h 2006-12-04 19:27:42.000000000 +0100
@@ -26,7 +26,7 @@
#include
extern char *cmdlineinit(void);
-extern char *cmdlineedit(char *buf, void (*func) (const char *p, const int nl));
+extern char *cmdlineedit(char *buf, void (*func) (const char *p));
extern char *passwdinit(void);
extern char *passwordedit(char *buf);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r910/include/prom.h new/yaboot-10.1.22-r918/include/prom.h
--- old/yaboot-10.1.21-r910/include/prom.h 2006-11-14 14:25:21.000000000 +0100
+++ new/yaboot-10.1.22-r918/include/prom.h 2006-12-04 19:53:08.000000000 +0100
@@ -104,6 +104,7 @@
int prom_interpret(const char *forth);
+int prom_getproplen_chosen(const char *name);
int prom_get_chosen(const char *name, void *mem, int len);
int prom_set_chosen(const char *name, const void *mem, int len);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r910/second/cmdline.c new/yaboot-10.1.22-r918/second/cmdline.c
--- old/yaboot-10.1.21-r910/second/cmdline.c 2006-11-14 21:50:57.000000000 +0100
+++ new/yaboot-10.1.22-r918/second/cmdline.c 2006-12-04 19:27:42.000000000 +0100
@@ -54,12 +54,12 @@
return cmdbuff;
}
-static int tabfunc(char *buf, const int len, void (*func) (const char *p, const int nl))
+static int tabfunc(char *buf, const int len, void (*func) (const char *p))
{
int label_len, print_label, c;
- int ret_len, pb, nl;
+ int ret_len, pb;
char *p;
- ret_len = nl = 0;
+ ret_len = 0;
pb = 1;
if (len > 0) {
print_label = 0;
@@ -81,15 +81,15 @@
if (ret_len && buf[len + ret_len - 1] == ' ')
pb = 0;
} else
- nl = 1;
+ prom_printf("\n");
} else
cfg_print_images(NULL, 0, 0);
if (pb)
- (*func) (buf, nl);
+ (*func) (buf);
return ret_len + len;
}
-static char *buffer_edit(char *buf, void (*func) (const char *p, const int nl))
+static char *buffer_edit(char *buf, void (*func) (const char *p))
{
int len, c;
len = strlen(buf);
@@ -137,7 +137,7 @@
return buffer_edit(buf, NULL);
}
-char *cmdlineedit(char *buf, void (*func) (const char *p, const int nl))
+char *cmdlineedit(char *buf, void (*func) (const char *p))
{
return buffer_edit(buf, func);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r910/second/parse_device_path.c new/yaboot-10.1.22-r918/second/parse_device_path.c
--- old/yaboot-10.1.21-r910/second/parse_device_path.c 2006-11-27 23:57:16.000000000 +0100
+++ new/yaboot-10.1.22-r918/second/parse_device_path.c 2006-12-08 15:22:21.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: parse_device_path.c 910 2006-11-27 22:57:16Z olh $ */
+/* $Id: parse_device_path.c 918 2006-12-08 14:22:21Z olh $ */
#ifndef DEVPATH_TEST
#include
#include
@@ -109,12 +109,38 @@
return;
}
+/**
+ * reset_bootdevice_to_iscsi
+ * When the bootpath contains the string "iscsi", the
+ * firmware needs to be passed the contents of the
+ * "nas-bootdevice" property.
+ */
+static int reset_bootdevice_to_iscsi(const char *imagepath, struct path_description *result)
+{
+ int size = prom_getproplen_chosen("nas-bootdevice");
+
+ if (size > 0) {
+ result->device = malloc(size + 2);
+ if (result->device) {
+ prom_get_chosen("nas-bootdevice", result->device, size);
+ DEBUG_F("nas-bootdevice: <%s>\n", result->device);
+ return 1;
+ }
+ }
+ return 0;
+}
+
int parse_device_path(const char *imagepath, struct path_description *result)
{
DEBUG_F("imagepath '%s'\n", imagepath);
if (!imagepath)
return 0;
+ /* FIXME */
+ if (strstr(imagepath, "iscsi")) {
+ if (!reset_bootdevice_to_iscsi(imagepath, result))
+ return 0;
+ } else {
result->device = malloc(strlen(imagepath) + 2);
if (!result->device)
return 0;
@@ -122,6 +148,7 @@
result->u.d.s1 = strchr(result->device, ':');
if (result->u.d.s1)
*result->u.d.s1++ = '\0';
+ }
result->type = prom_get_devtype(result->device);
switch (result->type) {
case TYPE_BLOCK:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r910/second/prom.c new/yaboot-10.1.22-r918/second/prom.c
--- old/yaboot-10.1.21-r910/second/prom.c 2006-11-14 14:25:21.000000000 +0100
+++ new/yaboot-10.1.22-r918/second/prom.c 2006-12-04 19:53:08.000000000 +0100
@@ -194,6 +194,11 @@
walk_dev_tree(root, type, nodes);
}
+int prom_getproplen_chosen(const char *name)
+{
+ return prom_getproplen(prom_chosen, name);
+}
+
int prom_get_chosen(const char *name, void *mem, int len)
{
return prom_getprop(prom_chosen, name, mem, len);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yaboot-10.1.21-r910/second/yaboot.c new/yaboot-10.1.22-r918/second/yaboot.c
--- old/yaboot-10.1.21-r910/second/yaboot.c 2006-11-27 23:49:53.000000000 +0100
+++ new/yaboot-10.1.22-r918/second/yaboot.c 2006-12-04 20:27:10.000000000 +0100
@@ -54,19 +54,19 @@
#include
#include
-#if 0
-static void hard_coded_bootpath(char *buf)
+static char *hard_coded_bootpath(char *bootpath)
{
- prom_printf("original bootpath: '%s'\n using hardcoded bootpath: ", buf);
- sprintf(buf, "/pci@8000000f8000000/ide@4,1/disk@0");
- prom_printf("'%s'\n", buf);
-}
-#else
-#define hard_coded_bootpath(p) do { } while(0)
+#if 0
+ const char path[] = "/pci@8000000f8000000/ide@4,1/disk@0";
+ prom_printf("original bootpath: '%s'\n using hardcoded bootpath: '%s'\n", bootpath, path);
+ bootpath = malloc(strlen(path) + 1);
+ if (bootpath)
+ sprintf(bootpath, path);
#endif
+ return bootpath;
+}
#define CONFIG_FILE_MAX 0x8000 /* 32k */
-#define BOOTPATH_LEN 1024
#ifdef USE_MD5_PASSWORDS
#include
@@ -774,16 +774,16 @@
prom_interpret("reset-all");
}
-static void print_boot(const char *p, const int nl)
+static void print_boot(const char *p)
{
- prom_printf("%sboot: %s", nl ? "\n" : "", p ? p : "");
+ prom_printf("boot: %s", p ? p : "");
}
static void print_all_labels(void)
{
if (useconf) {
cfg_print_images(NULL, 0, 0);
- print_boot(NULL, 0);
+ print_boot(NULL);
}
}
enum get_params_result {
@@ -808,7 +808,7 @@
memset(params, 0, sizeof(*params));
params->args = "";
- print_boot(NULL, 0);
+ print_boot(NULL);
if (gpr == GET_PARAMS_OK && useconf && (p = cfg_get_strg(NULL, "timeout")) && *p) {
timeout = simple_strtol(p, NULL, 0);
@@ -1114,19 +1114,27 @@
static void yaboot_main(void)
{
- char *bootpath, *bootargs;
+ char *bootpath = NULL, *bootargs = NULL;
char *conf_file_buf, *configfile = NULL;
+ int bootpath_len, bootargs_len;
int sz;
if (prom_getprop(call_prom("instance-to-package", 1, 1, prom_stdout), "iso6429-1983-colors", NULL, 0) >= 0) {
stdout_is_screen = 1;
setup_display();
}
- bootpath = malloc(BOOTPATH_LEN);
+ bootpath_len = prom_getproplen_chosen("bootpath");
+ bootargs_len = prom_getproplen_chosen("bootargs");
+
+ if (bootpath_len > 0)
+ bootpath = malloc(bootpath_len + 1);
+ if (bootargs_len > 0)
+ bootargs = malloc(bootargs_len + 1);
+
if (bootpath) {
- memset(bootpath, 0, BOOTPATH_LEN);
- prom_get_chosen("bootpath", bootpath, BOOTPATH_LEN - 1);
- hard_coded_bootpath(bootpath);
+ memset(bootpath, 0, bootpath_len + 1);
+ prom_get_chosen("bootpath", bootpath, bootpath_len);
+ bootpath = hard_coded_bootpath(bootpath);
DEBUG_F("/chosen/bootpath = %s\n", bootpath);
if (bootpath[0] == 0) {
prom_printf("Couldn't determine boot device\n");
@@ -1140,13 +1148,12 @@
prom_set_chosen("yaboot,bootpath", bootpath, strlen(bootpath) + 1);
}
- bootargs = malloc(BOOTPATH_LEN);
if (bootargs) {
- memset(bootargs, 0, BOOTPATH_LEN);
- prom_get_chosen("bootargs", bootargs, BOOTPATH_LEN - 1);
+ memset(bootargs, 0, bootargs_len + 1);
+ prom_get_chosen("bootargs", bootargs, bootargs_len);
DEBUG_F("/chosen/bootargs = '%s'\n", bootargs);
if (bootargs[0]) {
- prom_set_chosen("yaboot,bootargs", bootargs, strlen(bootargs) + 1);
+ prom_set_chosen("yaboot,bootargs", bootargs, bootargs_len + 1);
configfile = check_manual_config_filepath(bootargs);
if (!imagepath_to_path_description(configfile, &default_device, &default_device))
configfile = NULL;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org