[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/yaboot/devel yaboot-1.3.13-amigaparts.patch, NONE, 1.1 yaboot-1.3.13-gcc34.patch, NONE, 1.1 yaboot-1.3.13-manpage.patch, NONE, 1.1 yaboot-1.3.13-nobootx.patch, NONE, 1.1 yaboot-1.3.13-swraid1.patch, NONE, 1.1 yaboot-1.3.13-swraid2.patch, NONE, 1.1 yaboot-1.3.13-yabootconfig.patch, NONE, 1.1 yaboot.spec, 1.11, 1.12



Author: pnasrat

Update of /cvs/dist/rpms/yaboot/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv2356

Modified Files:
	yaboot.spec 
Added Files:
	yaboot-1.3.13-amigaparts.patch yaboot-1.3.13-gcc34.patch 
	yaboot-1.3.13-manpage.patch yaboot-1.3.13-nobootx.patch 
	yaboot-1.3.13-swraid1.patch yaboot-1.3.13-swraid2.patch 
	yaboot-1.3.13-yabootconfig.patch 
Log Message:
check in rebase work so far

yaboot-1.3.13-amigaparts.patch:
 ChangeLog          |   16 +++++++
 second/partition.c |  110 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 126 insertions(+)

--- NEW FILE yaboot-1.3.13-amigaparts.patch ---
* added files

    include/.arch-ids/amiga-part.h.id
    include/amiga-part.h
    {arch}/yaboot/yaboot--devel/yaboot--devel--1.3/erbenson alaska net--public/patch-log/patch-80

* modified files



--- orig/ChangeLog
+++ mod/ChangeLog
@@ -2,6 +2,22 @@
 # arch-tag: automatic-ChangeLog--erbenson alaska net--public/yaboot--devel--1.3
 #
 
+2005-05-20 03:10:03 GMT	Ethan Benson <erbenson alaska net>	patch-80
+
+    Summary:
+      amiga partition table support.
+    Revision:
+      yaboot--devel--1.3--patch-80
+
+    * Support for amiga partition tables.  (Sven Luther)
+
+    new files:
+     include/.arch-ids/amiga-part.h.id include/amiga-part.h
+
+    modified files:
+     0arch-timestamps0 ChangeLog second/partition.c
+
+
 2005-05-19 04:26:37 GMT	Ethan Benson <erbenson alaska net>	patch-79
 
     Summary:


--- orig/second/partition.c
+++ mod/second/partition.c
@@ -1,6 +1,8 @@
 /*
  *  partition.c - partition table support
  *
+ *  Copyright (C) 2004 Sven Luther
+ *
  *  Copyright (C) 2001, 2002 Ethan Benson
  *
  *  Copyright (C) 1999 Benjamin Herrenschmidt
@@ -31,6 +33,7 @@
 #include "stdlib.h"
 #include "mac-part.h"
 #include "fdisk-part.h"
+#include "amiga-part.h"
 #include "partition.h"
 #include "prom.h"
 #include "string.h"
@@ -213,6 +216,110 @@
      return 0;
 }
 
+/* 
+ * Detects and read amiga partition tables.
+ */
+
+static int
+_amiga_checksum (unsigned int blk_size)
+{
+	unsigned int sum;
+	int i, end;
+	unsigned int *amiga_block = (unsigned int *) block_buffer;
+
+	sum = amiga_block[0];
+	end = amiga_block[AMIGA_LENGTH];
+
+	if (end > blk_size) end = blk_size;
+
+	for (i = 1; i < end; i++) sum += amiga_block[i];
+
+	return sum;
+}
+
+static int
+_amiga_find_rdb (const char *dev_name, prom_handle disk, unsigned int prom_blksize)
+{
+	int i;
+	unsigned int *amiga_block = (unsigned int *) block_buffer;
+
+	for (i = 0; i<AMIGA_RDB_MAX; i++) {
+		if (i != 0) {
+			if (prom_readblocks(disk, i, 1, block_buffer) != 1) {
+	  			prom_printf("Can't read boot block %d\n", i);
+	  			break;
+			}	
+		}
+		if ((amiga_block[AMIGA_ID] == AMIGA_ID_RDB) && (_amiga_checksum (prom_blksize) == 0))
+			return 1;
+	}
+	/* Amiga partition table not found, let's reread block 0 */
+	if (prom_readblocks(disk, 0, 1, block_buffer) != 1) {
+  		prom_printf("Can't read boot blocks\n");
+  		return 0; /* TODO: something bad happened, should fail more verbosely */
+	}	
+	return 0;
+}
+
+static void
+partition_amiga_lookup( const char *dev_name, prom_handle disk,
+                        unsigned int prom_blksize, struct partition_t** list )
+{
+	int partition, part;
+	unsigned int blockspercyl;
+	unsigned int *amiga_block = (unsigned int *) block_buffer;
+	unsigned int *used = NULL;
+	unsigned int possible;
+	int checksum;
+	int i;
+
+	blockspercyl = amiga_block[AMIGA_SECT] * amiga_block[AMIGA_HEADS];
+	possible = amiga_block[AMIGA_RDBLIMIT]/32 +1;
+
+	used = (unsigned int *) malloc (sizeof (unsigned int) * (possible + 1));
+
+	for (i=0; i < possible; i++) used[i] = 0;
+
+
+	for (part = amiga_block[AMIGA_PARTITIONS], partition = 0;
+		part != AMIGA_END;
+		part = amiga_block[AMIGA_PART_NEXT], partition++)
+	{
+		if (prom_readblocks(disk, part, 1, block_buffer) != 1) {
+	  		prom_printf("Can't read partition block %d\n", part);
+	  		break;
+		}	
+		checksum = _amiga_checksum (prom_blksize);
+		if ((amiga_block[AMIGA_ID] == AMIGA_ID_PART) &&
+			(checksum == 0) &&
+			((used[part/32] & (0x1 << (part % 32))) == 0))
+		{
+			used[part/32] |= (0x1 << (part % 32));
+		} else {
+	  		prom_printf("Amiga partition table corrupted at block %d\n", part);
+			if (amiga_block[AMIGA_ID] != AMIGA_ID_PART)
+				prom_printf ("block type is not partition but %08x\n", amiga_block[AMIGA_ID]);
+			if (checksum != 0)
+				prom_printf ("block checsum is bad : %d\n", checksum);
+			if ((used[part/32] & (0x1 << (part % 32))) != 0)
+				prom_printf ("partition table is looping, block %d already traveled\n", part);
+			break;
+		}
+
+	       /* We use the partition block size from the partition table.
+		* The filesystem implmentations are responsible for mapping
+		* to their own fs blocksize */
+	       add_new_partition(
+		    list, /* partition list */
+		    partition, /* partition number */
+		    "Linux", /* type */
+		    '\0', /* name */
+		    blockspercyl * amiga_block[AMIGA_PART_LOWCYL], /* start */
+		    blockspercyl * (amiga_block[AMIGA_PART_HIGHCYL] - amiga_block[AMIGA_PART_LOWCYL] + 1), /* size */
+		    prom_blksize );
+	}
+}
+
 struct partition_t*
 partitions_lookup(const char *device)
 {
@@ -260,6 +367,9 @@
 			    0,
 			    prom_blksize);
 	  prom_printf("ISO9660 disk\n");
+     } else if (_amiga_find_rdb(device, disk, prom_blksize) != -1) {
+	  /* amiga partition format */
+	  partition_amiga_lookup(device, disk, prom_blksize, &list);
      } else {
 	  prom_printf("No supported partition table detected\n");
 	  goto bail;




yaboot-1.3.13-gcc34.patch:
 ChangeLog    |   13 +++++++++++++
 lib/strstr.c |    3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)

--- NEW FILE yaboot-1.3.13-gcc34.patch ---
* added files

    {arch}/yaboot/yaboot--devel/yaboot--devel--1.3/erbenson alaska net--public/patch-log/patch-79

* modified files



--- orig/ChangeLog
+++ mod/ChangeLog
@@ -2,6 +2,19 @@
 # arch-tag: automatic-ChangeLog--erbenson alaska net--public/yaboot--devel--1.3
 #
 
+2005-05-19 04:26:37 GMT	Ethan Benson <erbenson alaska net>	patch-79
+
+    Summary:
+      gcc-3.4 fix
+    Revision:
+      yaboot--devel--1.3--patch-79
+
+    * GCC 3.4 compilation fix.  (Paul Nasrat)
+
+    modified files:
+     0arch-timestamps0 ChangeLog lib/strstr.c
+
+
 2005-02-02 05:26:31 GMT	Ethan Benson <erbenson alaska net>	patch-78
 
     Summary:


--- orig/lib/strstr.c
+++ mod/lib/strstr.c
@@ -76,7 +76,8 @@
 	      a = *++haystack;
 	      if (a == '\0')
 		goto ret0;
-shloop:	    }
+shloop:	    ;
+            }
           while (a != b);
 
 jin:	  a = *++haystack;




yaboot-1.3.13-manpage.patch:
 ChangeLog    |   13 +++++++++++++
 man/yaboot.8 |   14 +++++++-------
 2 files changed, 20 insertions(+), 7 deletions(-)

--- NEW FILE yaboot-1.3.13-manpage.patch ---
* added files

    {arch}/yaboot/yaboot--devel/yaboot--devel--1.3/erbenson alaska net--public/patch-log/patch-76

* modified files



--- orig/ChangeLog
+++ mod/ChangeLog
@@ -2,6 +2,19 @@
 # arch-tag: automatic-ChangeLog--erbenson alaska net--public/yaboot--devel--1.3
 #
 
+2004-07-24 20:07:25 GMT	Ethan Benson <erbenson alaska net>	patch-76
+
+    Summary:
+      Fix typos in yaboot man page
+    Revision:
+      yaboot--devel--1.3--patch-76
+
+    man/yaboot.8: Fix various typos (thanks Helge Kreutzman).
+
+    modified files:
+     0arch-timestamps0 ChangeLog man/yaboot.8
+
+
 2004-07-11 20:14:40 GMT	Ethan Benson <erbenson alaska net>	patch-75
 
     Summary:


--- orig/man/yaboot.8
+++ mod/man/yaboot.8
@@ -16,12 +16,12 @@
 Fault. \fByaboot\fR is meant to be executed only by OpenFirmware.
 
 .B yaboot
-is executed from OpenFirmare in the following manner:
+is executed from OpenFirmware in the following manner:
 .I boot hd:2,yaboot
 where \fIhd:\fR is the OpenFirmware path for the hard disk, and the
 \fI2\fR is the partition number \fByaboot\fR is located on.  In this
 example, the hard disk path is actually an OpenFirmware alias which is
-present on all NewWorld powermacs.  It usually points to the internal
+present on all NewWorld PowerMacs.  It usually points to the internal
 ATA hard disk.  If you have a SCSI disk, then you might execute
 \fByaboot\fR with this command:
 .I boot /pci 80000000/pci-bridge d/ADPT,2930CU 2/@1:2,yaboot
@@ -29,7 +29,7 @@
 have. For a more detailed explanation of OpenFirmware's [disgusting]
 paths, see man \fBbootstrap\fR(8).  On IBM hardware \fByaboot\fR is
 directly copied to the \fBbootstrap\fR(8) partition raw, without any
-filesystem.  OpenFirmare will boot from a type 0x41 PReP Boot parition
+filesystem.  OpenFirmware will boot from a type 0x41 PReP Boot parition
 marked bootable, this must contain \fByaboot\fR.  On IBM hardware the
 config file is read directly from the root filesystem.  On PowerMac
 hardware it must be present on the \fBbootstrap\fR(8) partition but
@@ -60,7 +60,7 @@
 should preferably be installed on a dedicated \fBbootstrap\fR(8)
 partition (type Apple_Bootstrap for PowerMacs, type 0x41 PReP Boot for
 IBM hardware).  This allows the partition to be modified in such a way
-that OpenFirmare will load \fByaboot\fR or a boot menu automatically
+that OpenFirmware will load \fByaboot\fR or a boot menu automatically
 with a default OF configuration. If \fByaboot\fR cannot be installed
 on a \fBbootstrap\fR(8) partition it can be installed on the root of a
 MacOS boot partition instead.  \fByaboot\fR however should not be
@@ -70,7 +70,7 @@
 (\fBybin\fR(8) is a utility for installing \fByaboot\fR with minimal
 difficulty).
 
-The \fByaboot.conf\fR(5) file must be next to the yaboot executable on
+The \fByaboot.conf\fR(5) file must be next to the \fByaboot\fR executable on
 the \fBbootstrap\fR(8) partition.  \fBybin\fR(8) will take care of this.
 
 OpenFirmware may be accessed by holding down the \fIcommand, option,
@@ -81,13 +81,13 @@
 
 If you have G4 hardware then your OpenFirmware may already have a
 graphical boot selector built in.  This selector can be accessed by
-holding down the option key when booting the machine.  You should see
+holding down the \fIoption\fR key when booting the machine.  You should see
 a screen with buttons for each bootable partition.  The current
 version (included with \fBybin\fR(8) 0.13) of ofboot includes a
 badge icon, the button with a penguin icon is your \fBbootstrap\fR(8)
 partition.  Thanks to Nicholas Humfrey for creating the Badge icon.
 
-The \fBbootstrap\fR(8) need not and
+The \fBbootstrap\fR(8) partition need not and
 .B should not
 be mounted anywhere on your filesystem, especially not on top of /boot.  \fBYaboot\fR is able
 to load the kernels from the ext2fs root partition so that is where




yaboot-1.3.13-nobootx.patch:
 ChangeLog   |   15 +++++++++++++++
 ybin/ofpath |    8 --------
 2 files changed, 15 insertions(+), 8 deletions(-)

--- NEW FILE yaboot-1.3.13-nobootx.patch ---
* added files

    {arch}/yaboot/yaboot--devel/yaboot--devel--1.3/erbenson alaska net--public/patch-log/patch-82

* modified files



--- orig/ChangeLog
+++ mod/ChangeLog
@@ -2,6 +2,21 @@
 # arch-tag: automatic-ChangeLog--erbenson alaska net--public/yaboot--devel--1.3
 #
 
+2005-07-04 03:42:18 GMT	Ethan Benson <erbenson alaska net>	patch-82
+
+    Summary:
+      Remove check for BootX broken device-trees
+    Revision:
+      yaboot--devel--1.3--patch-82
+
+    * ybin/ofpath: Remove check for broken-by-BootX device-tree, it no
+      longer works under current 2.6 kernels and nobody attempts to use
+      BootX anymore.
+
+    modified files:
+     0arch-timestamps0 ChangeLog ybin/ofpath
+
+
 2005-07-04 03:34:00 GMT	Ethan Benson <erbenson alaska net>	patch-81
 
     Summary:


--- orig/ybin/ofpath
+++ mod/ybin/ofpath
@@ -425,14 +425,6 @@
 {
     case "$DEVNODE" in
 	sd*)
-	    if ls -l /proc/device-tree | grep -q ^lr ; then
-		true
-	    else
-		echo 1>&2 "$PRG: /proc/device-tree is broken.  Do not use BootX to boot, use yaboot."
-		echo 1>&2 "$PRG: The yaboot HOWTO can be found here: http://www.alaska.net/~erbenson/doc";
-		return 1
-	    fi
-
 	    ## use common scsiinfo function to get info we need.
 	    scsiinfo || return 1
 




yaboot-1.3.13-swraid1.patch:
 ChangeLog |   14 ++++++++++++++
 ybin/ybin |   40 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 53 insertions(+), 1 deletion(-)

--- NEW FILE yaboot-1.3.13-swraid1.patch ---
* added files

    {arch}/yaboot/yaboot--devel/yaboot--devel--1.3/erbenson alaska net--public/patch-log/patch-81

* modified files



--- orig/ChangeLog
+++ mod/ChangeLog
@@ -2,6 +2,20 @@
 # arch-tag: automatic-ChangeLog--erbenson alaska net--public/yaboot--devel--1.3
 #
 
+2005-07-04 03:34:00 GMT	Ethan Benson <erbenson alaska net>	patch-81
+
+    Summary:
+      Merge Dustin's RAID patch
+    Revision:
+      yaboot--devel--1.3--patch-81
+
+    * ybin/ybin: Allow for multiple bootstrap partitions.  Patch by Dustin
+      Kirkland.  May not fully work on PMAC hardware.
+
+    modified files:
+     0arch-timestamps0 ChangeLog ybin/ybin
+
+
 2005-05-20 03:10:03 GMT	Ethan Benson <erbenson alaska net>	patch-80
 
     Summary:


--- orig/ybin/ybin
+++ mod/ybin/ybin
@@ -27,6 +27,7 @@
     PATH="${PATH}:${PATH_PREFIX}/sbin:${PATH_PREFIX}/bin:${PATH_PREFIX}/usr/sbin:${PATH_PREFIX}/usr/bin:${PATH_PREFIX}/usr/local/sbin:${PATH_PREFIX}/usr/local/bin"
 fi
 PRG="${0##*/}"
+ABSPRG="$0"
 SIGINT="$PRG: Interrupt caught ... exiting"
 VERSION=1.3.13
 DEBUG=0
@@ -1336,19 +1337,26 @@
 		;;
 	    --debug)
 		DEBUG=1
+		ARGS="$ARGS $1"
 		shift
 		;;
 	    -v|--verbose)
 		VERBOSE=1
+		ARGS="$ARGS $1"
 		shift
 		;;
 	    -f|--force)
 		FORCE=yes
+		ARGS="$ARGS $1"
 		shift
 		;;
 	    -b|--boot)
 		if [ -n "$2" ] ; then
-		    boot="$2"
+		    if [ "$boot" = "unconfigured" ]; then
+			boot="$2"
+		    else
+			boot="$boot $2"
+		    fi
 		    ARGBT=1
 		    shift 2
 		else
@@ -1361,6 +1369,7 @@
 		if [ -n "$2" ] ; then
 		    ofboot="$2"
 		    ARGOB=1
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1372,6 +1381,7 @@
 		if [ -n "$2" ] ; then
 		    install="$2"
 		    ARGBF=1
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1384,6 +1394,7 @@
 		    CONF="$2"
 		    bootconf="$2"
 		    ERR=" Error in $CONF:"
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1395,6 +1406,7 @@
 		if [ -n "$2" ] ; then
 		    magicboot="$2"
 		    ARGWP=1
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1406,6 +1418,7 @@
 		if [ -n "$2" ] ; then
 		    fstype="$2"
 		    ARGFS=1
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1416,26 +1429,31 @@
 	    --nobless)
 		bless=no
 		ARGBS=1
+		ARGS="$ARGS $1"
 		shift
 		;;
 	    -M|--mount)
 		usemount=yes
 		ARGMT=1
+		ARGS="$ARGS $1"
 		shift
 		;;
 	    --protect)
 		protect=yes
 		ARGPT=1
+		ARGS="$ARGS $1"
 		shift
 		;;
 	    --hide)
 		hide=yes
 		ARGHD=1
+		ARGS="$ARGS $1"
 		shift
 		;;
 	    --nonvram)
 		nonvram=1
 		ARGNV=1
+		ARGS="$ARGS $1"
 		shift
 		;;
 	    --device)
@@ -1443,6 +1461,7 @@
 		    device="$2"
 		    bootconf=auto
 		    echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1455,6 +1474,7 @@
 		    timeout="$2"
 		    bootconf=auto
 		    echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1467,6 +1487,7 @@
 		    image="$2"
 		    bootconf=auto
 		    echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1479,6 +1500,7 @@
 		    label="$2"
 		    bootconf=auto
 		    echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1491,6 +1513,7 @@
 		    partition="$2"
 		    bootconf=auto
 		    echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1503,6 +1526,7 @@
 		    root="$2"
 		    bootconf=auto
 		    echo 1>&2 "$PRG: WARNING: Deprecated option --device"
+		    ARGS="$ARGS $1 $2"
 		    shift 2
 		else
 		    echo 1>&2 "$PRG: option requires an argument $1"
@@ -1582,6 +1606,20 @@
 [ $(parseconf flag enableofboot) = 0 ] && of=yes
 [ $(parseconf flag brokenosx) = 0 ] && brokenosx=yes
 
+bootparts=0
+for i in $boot; do
+    bootparts=$(($bootparts + 1))
+done
+if [ "$bootparts" -gt 1 ]; then
+    [ "$VERBOSE" = 1 ] && echo "$PRG: Iterating through list of boot partitions..."
+    rc=0
+    for i in $boot; do
+        [ "$VERBOSE" = 1 ] && echo "$ABSPRG $ARGS -b $i"
+        $ABSPRG $ARGS -b $i || rc=$?
+    done
+    exit $rc
+fi
+
 ## ffs!! rtfm! foad!
 if [ "$boot" = unconfigured ] ; then
     echo 1>&2 "$PRG: You must specify the device for the bootstrap partition. (ie: boot=/dev/hdaX)"




yaboot-1.3.13-swraid2.patch:
 ChangeLog            |   16 ++++++++++++++++
 include/fdisk-part.h |    1 +
 include/partition.h  |    1 +
 second/fs_of.c       |    8 ++++++++
 second/partition.c   |   17 +++++++++++------
 5 files changed, 37 insertions(+), 6 deletions(-)

--- NEW FILE yaboot-1.3.13-swraid2.patch ---
* added files

    {arch}/yaboot/yaboot--devel/yaboot--devel--1.3/erbenson alaska net--public/patch-log/patch-83

* modified files



--- orig/ChangeLog
+++ mod/ChangeLog
@@ -2,6 +2,22 @@
 # arch-tag: automatic-ChangeLog--erbenson alaska net--public/yaboot--devel--1.3
 #
 
+2005-07-09 23:51:20 GMT	Ethan Benson <erbenson alaska net>	patch-83
+
+    Summary:
+      handle RAID partitions on x86 partition tables
+    Revision:
+      yaboot--devel--1.3--patch-83
+
+    * Support reading of type RAID partitions, except from fs_of.
+      This only works on x86 partition tables, Pmac partition tables will
+      need alternate methods.  (Patch from Dustin Kirkland).
+
+    modified files:
+     0arch-timestamps0 ChangeLog include/fdisk-part.h
+     include/partition.h second/fs_of.c second/partition.c
+
+
 2005-07-04 03:42:18 GMT	Ethan Benson <erbenson alaska net>	patch-82
 
     Summary:


--- orig/include/fdisk-part.h
+++ mod/include/fdisk-part.h
@@ -27,6 +27,7 @@
 #define LINUX_SWAP      0x82
 #define LINUX_NATIVE    0x83
 #define LINUX_EXTENDED  0x85
+#define LINUX_RAID      0xfd
 
 struct fdisk_partition {
 	unsigned char boot_ind;         /* 0x80 - active */


--- orig/include/partition.h
+++ mod/include/partition.h
@@ -40,6 +40,7 @@
 	unsigned long  		part_start; /* In blocks */
 	unsigned long  		part_size; /* In blocks */
 	unsigned short		blocksize;
+	int			sys_ind; /* fs type */
 };
 
 extern struct partition_t*	partitions_lookup(const char *device);


--- orig/second/fs_of.c
+++ mod/second/fs_of.c
@@ -39,6 +39,7 @@
 #include "prom.h"
 #include "string.h"
 #include "partition.h"
+#include "fdisk-part.h"
 #include "fs.h"
 #include "errors.h"
 #include "debug.h"
@@ -89,6 +90,13 @@
      DEBUG_ENTER;
      DEBUG_OPEN;
 
+     if (part->sys_ind == LINUX_RAID)
+     {
+	  DEBUG_F("skipping because partition is marked LINUX_RAID\n");
+ 	  DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
+	  return FILE_ERR_BAD_FSYS;
+     }
+
      strncpy(buffer, dev_name, 768);
      strcat(buffer, ":");
      if (part) {


--- orig/second/partition.c
+++ mod/second/partition.c
@@ -67,7 +67,7 @@
 static void
 add_new_partition(struct partition_t**	list, int part_number, const char *part_type,
 		  const char *part_name, unsigned long part_start, unsigned long part_size,
-		  unsigned short part_blocksize)
+		  unsigned short part_blocksize, int sys_ind)
 {
      struct partition_t*	part;
      part = (struct partition_t*)malloc(sizeof(struct partition_t));
@@ -78,6 +78,7 @@
      part->part_start = part_start;
      part->part_size = part_size;
      part->blocksize = part_blocksize;
+     part->sys_ind = sys_ind;
 
      /* Tack this entry onto the list */
      part->next = *list;
@@ -149,7 +150,8 @@
 		    part->name, /* name */
 		    part->start_block + part->data_start, /* start */
 		    part->data_count, /* size */
-		    ptable_block_size );
+		    ptable_block_size,
+		    0);
      }
 }
 
@@ -170,14 +172,15 @@
 	  (struct fdisk_partition *) (block_buffer + 0x1be);
 
      for (partition=1; partition <= 4 ;partition++, part++) {
-	  if (part->sys_ind == LINUX_NATIVE) {
+	  if (part->sys_ind == LINUX_NATIVE || part->sys_ind == LINUX_RAID) {
 	       add_new_partition(  list,
 				   partition,
 				   "Linux", /* type */
 				   '\0', /* name */
 				   swab32(*(unsigned int *)(part->start4)),
 				   swab32(*(unsigned int *)(part->size4)),
-				   512 /*blksize*/ );
+				   512 /*blksize*/,
+				   part->sys_ind /* partition type */ );
 	  }
      }
 }
@@ -316,7 +319,8 @@
 		    '\0', /* name */
 		    blockspercyl * amiga_block[AMIGA_PART_LOWCYL], /* start */
 		    blockspercyl * (amiga_block[AMIGA_PART_HIGHCYL] - amiga_block[AMIGA_PART_LOWCYL] + 1), /* size */
-		    prom_blksize );
+		    prom_blksize,
+		    0 );
 	}
 }
 
@@ -365,7 +369,8 @@
 			    '\0',
 			    iso_root_block,
 			    0,
-			    prom_blksize);
+			    prom_blksize,
+			    0);
 	  prom_printf("ISO9660 disk\n");
      } else if (_amiga_find_rdb(device, disk, prom_blksize) != -1) {
 	  /* amiga partition format */




yaboot-1.3.13-yabootconfig.patch:
 yabootconfig |  189 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 176 insertions(+), 13 deletions(-)

--- NEW FILE yaboot-1.3.13-yabootconfig.patch ---
--- yaboot-1.3.10/ybin/yabootconfig.yabootconfig	2003-02-08 23:53:46.000000000 -0500
+++ yaboot-1.3.10/ybin/yabootconfig	2003-04-28 18:13:16.000000000 -0400
@@ -34,6 +34,7 @@
 NOINSTALL=0
 QUIET=0
 DEBUG=0
+LABEL="Linux"
 SIGINT="$PRG: Interrupt caught ... exiting"
 export LC_COLLATE=C
 
@@ -309,6 +310,16 @@
                     exit 1
                 fi
 		;;
+	    --kernel)
+                if [ -n "$2" ] ; then
+                    KERNELIMAGE="$2"
+                    shift 2
+                else
+                    echo 1>&2 "$PRG: option requires an argument $1"
+                    echo 1>&2 "Try \`$PRG --help' for more information."
+                    exit 1
+                fi
+		;;
 	    --kernel-args)
                 if [ -n "$2" ] ; then
                     KERNARGS="$2"
@@ -327,10 +338,88 @@
 		NOINSTALL=1
 		shift 1
 		;;
+	    --enablecdboot)
+		CDBOOT=1
+		shift 1
+		;;
+	    --enablenetboot)
+		NETBOOT=1
+		shift 1
+		;;
 	    --debug)
 		DEBUG=1
 		shift 1
 		;;
+	    --delay)
+		if [ -n "$2" ] ; then
+		    DELAY=$2
+		    shift 2
+                else
+                    echo 1>&2 "$PRG: option requires an argument $1"
+                    echo 1>&2 "Try \`$PRG --help' for more information."
+                    exit 1
+                fi
+		;;
+	    --label)
+		if [ -n "$2" ] ; then
+		    LABEL=$2
+		    shift 2
+                else
+                    echo 1>&2 "$PRG: option requires an argument $1"
+                    echo 1>&2 "Try \`$PRG --help' for more information."
+                    exit 1
+                fi
+		;;
+	    --initrd)
+		if [ -n "$2" ] ; then
+		    INITRDPATH=$2
+		    shift 2
+                else
+                    echo 1>&2 "$PRG: option requires an argument $1"
+                    echo 1>&2 "Try \`$PRG --help' for more information."
+                    exit 1
+                fi
+		;;
+	    --macosx)
+		if [ -n "$2" ] ; then
+		    MACOSXDEV=$2
+		    shift 2
+                else
+                    echo 1>&2 "$PRG: option requires an argument $1"
+                    echo 1>&2 "Try \`$PRG --help' for more information."
+                    exit 1
+                fi
+		;;
+	    --macos)
+		if [ -n "$2" ] ; then
+		    MACOSDEV=$2
+		    shift 2
+                else
+                    echo 1>&2 "$PRG: option requires an argument $1"
+                    echo 1>&2 "Try \`$PRG --help' for more information."
+                    exit 1
+                fi
+		;;
+	    --darwin)
+		if [ -n "$2" ] ; then
+		    DARWINDEV=$2
+		    shift 2
+                else
+                    echo 1>&2 "$PRG: option requires an argument $1"
+                    echo 1>&2 "Try \`$PRG --help' for more information."
+                    exit 1
+                fi
+		;;
+	    --defaultos)
+		if [ -n "$2" ] ; then
+		    DEFOS=$2
+		    shift 2
+                else
+                    echo 1>&2 "$PRG: option requires an argument $1"
+                    echo 1>&2 "Try \`$PRG --help' for more information."
+                    exit 1
+                fi
+		;;
             "")
                 break
                 ;;
@@ -439,7 +528,9 @@
 
 ## find the kernel in the usual places and (if not --quiet) ask the
 ## user if we cannot find one.
-if [ -f "${CHROOT}vmlinux" ] ; then
+if [ -f "${CHROOT}${KERNELIMAGE}" ] ; then
+    KERNEL="${CHROOT}${KERNELIMAGE}"
+elif [ -f "${CHROOT}vmlinux" ] ; then
     KERNEL="${CHROOT}vmlinux"
 elif [ -f "${CHROOT}boot/vmlinux" ] ; then
     KERNEL="${CHROOT}boot/vmlinux"
@@ -565,6 +656,36 @@
     HEADER="## see also: /usr/share/doc/yaboot/examples for example configurations.\n"
 fi
 
+## find the kernel in the usual places and (if not --quiet) ask the
+## user if we cannot find one.
+if [ -f "${CHROOT}${INITRDPATH}" ] ; then
+    REALINITRD="${CHROOT}${INITRDPATH}"
+
+    ## if there is a separate /boot partition we must strip off the /boot
+    ## mountpoint or else yaboot will not find the kernel.
+    if [ "$KERNDIR" != "$CHROOT" ] ; then
+        INITRD="${REALINITRD##*$KERNDIR}"
+    else
+        INITRD="$REALINITRD"
+    fi
+
+    ## fix chrooted path
+    if [ "$CHROOT" != / ] ; then
+       INITRD="${INITRD##*$CHROOT}"
+    fi
+
+    ## fix relative path (caused by chroot path fix)
+    case "$INITRD" in
+        /*)
+        true
+        ;;
+        *)
+        INITRD="/${INITRD}"
+        ;;
+    esac
+    INITRDLINE="\tinitrd=$INITRD\n"
+fi
+
 ## setup append line
 if [ -n "$KERNARGS" ] ; then
     APPEND="\tappend=\"${KERNARGS}\"\n"
@@ -579,24 +700,64 @@
     INITRDIMGS="\tinitrd=$INITRDIMG\n\tinitrd-size=8192\n"
 fi
 
+## setup default OS bits for ybin
+if [ -n "$DEFOS" ] ; then
+   if [ "$DEFOS" = "macosx" ] ; then
+       DEFAULTOS="defaultos=${DEFOS}\n"
+   elif [ "$DEFOS" = "macos" ] ; then
+	 DEFAULTOS="defaultos=${DEFOS}\n"
+   elif [ "$DEFOS" = "darwin" ] ; then
+         DEFAULTOS="defaultos=${DEFOS}\n"
+   else
+      DEFAULTOS="defaultos=linux\n"
+   fi
+else
+   DEFAULTOS="defaultos=linux\n"
+fi
+if [ -n "$DELAY" ] ; then
+    MENUDELAY="delay=${DELAY}\n"
+fi
+
+## setup enabling cd or network boot from OF
+if [ -n "$CDBOOT" ] ; then
+    ENABLECDBOOT="enablecdboot\n"
+fi
+if [ -n "$NETBOOT" ] ; then
+    ENABLENETBOOT="enablenetboot\n"
+fi
+
+MESG='"Welcome to Red Hat Linux!\\nHit <TAB> for boot options.\\n\\n"'
+
 ## generate global section of yaboot.conf
-GLOBAL="## yaboot.conf generated by $PRG $VERSION
-##
-## run: \"man yaboot.conf\" for details. Do not make changes until you have!!
-${HEADER}##
-## For a dual-boot menu, add one or more of: 
-## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ\n
-boot=${BOOT}${DEVICE:-}
+GLOBAL="boot=${BOOT}${DEVICE:-}
+init-message=$MESG
 partition=$PARTITION
-root=$ROOT
 timeout=30
-install=${INSTALL}${OFBOOT:-}\n"
+install=${INSTALL}${OFBOOT:-}
+default=$LABEL
+${DEFAULTOS:-}${MENUDELAY:-}${ENABLECDBOOT:-}${ENABLENETBOOT:-}"
 
 ## generate image= section
 IMAGES="
 image=$IMAGE
-\tlabel=Linux
-\tread-only\n${APPEND:-}"
+\tlabel=$LABEL
+\troot=$ROOT
+\tread-only
+${INITRDLINE-}${APPEND:-}"
+
+if [ -n "$MACOSXDEV" ] ; then
+    MACOSX="macosx=${MACOSXDEV}\n"
+fi
+
+if [ -n "$MACOSDEV" ] ; then
+    MACOS="macos=${MACOSDEV}\n"
+fi
+
+if [ -n "$DARWINDEV" ] ; then
+    DARWIN="darwin=${DARWINDEV}\n"
+fi
+
+OTHER="${MACOSX}${MACOS}${DARWIN}${BSD}"
 
 ## safely create a tmp file then move it into place after we are sure
 ## it was written.
@@ -606,7 +767,9 @@
     exit 1
 fi
 
-$PRINTF "${GLOBAL}${IMAGES}" > "$TMPCONF"
+printf "${GLOBAL}
+${IMAGES}
+${OTHER}" > "$TMPCONF"
 if [ $? != 0 ] ; then
     echo 1>&2 "$PRG: Unable to write temporary file ${TMPCONF}, aborting..."
     exit 1


Index: yaboot.spec
===================================================================
RCS file: /cvs/dist/rpms/yaboot/devel/yaboot.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- yaboot.spec	15 Mar 2005 17:34:45 -0000	1.11
+++ yaboot.spec	25 Jul 2005 15:50:54 -0000	1.12
@@ -1,25 +1,28 @@
 Summary: Linux bootloader for Power Macintosh "New World" computers.
 Name: yaboot
-Version: 1.3.12
-Release: 9
+Version: 1.3.13
+Release: 0.1
 License: GPL
 Group: System Environment/Base
-Source: http://penguinppc.org/projects/yaboot/yaboot-%{version}.tar.gz
-Patch1: yaboot-1.3.3-man.patch
+Source: http://penguinppc.org/bootloaders/yaboot/yaboot-%{version}.tar.gz
+#Patch1: yaboot-1.3.3-man.patch
 Patch2: yaboot-1.3.6-ofboot.patch
 Patch3: yaboot-1.3.6-rh.patch
-Patch4: yaboot-1.3.10-yabootconfig.patch
-Patch5: yaboot-1.3.8-ppc64-initrd.patch
+Patch4: yaboot-1.3.13-yabootconfig.patch
+#Patch5: yaboot-1.3.8-ppc64-initrd.patch
 Patch6: yaboot-1.3.10-proddiscover.patch
 Patch7: yaboot-1.3.10-ext3.patch
 Patch8: yaboot-1.3.10-sbindir.patch
 Patch9: yaboot-1.3.10-configfile.patch
 Patch10: yaboot-1.3.10-parted.patch
-Patch11: yaboot-1.3.12-gcc34.patch
-Patch12: yaboot-1.3.12-bigtftp.patch
-Patch13: yaboot-1.3.12-llan.patch
-Patch14: yaboot-1.3.12-addnote.patch
-URL: http://penguinppc.org/projects/yaboot/
+Patch11: yaboot-1.3.13-manpage.patch
+Patch12: yaboot-1.3.13-gcc34.patch
+Patch13: yaboot-1.3.13-amigaparts.patch
+Patch14: yaboot-1.3.13-swraid1.patch
+Patch15: yaboot-1.3.13-nobootx.patch
+Patch16: yaboot-1.3.13-swraid2.patch
+
+URL: http://penguinppc.org/bootloaders/yaboot/
 BuildRoot: %{_tmppath}/%{name}-root
 Obsoletes: ybin
 ExclusiveArch: ppc
@@ -33,20 +36,22 @@
 
 %prep
 %setup -q
-%patch1 -p0
+#patch1 -p0
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1 -b .yabootconfig
-%patch5 -p1 -b .ppc64initrd
+#patch5 -p1 -b .ppc64initrd
 %patch6 -p1 -b .proddisc
 %patch7 -p1 -b .ext3
 %patch8 -p1 -b .sbin
 %patch9 -p1 -b .config
 %patch10 -p1 -b .parted
-%patch11 -p1 -b .gcc34
-%patch12 -p1 -b .bigtftp
-%patch13 -p1 -b .llan
-%patch14 -p1 -b .addnote
+%patch11 -p1 -b .manpage
+%patch12 -p1 -b .gcc34
+%patch13 -p1 -b .amigaparts
+%patch14 -p1 -b .swraid1
+%patch15 -p1 -b .nobootx
+%patch16 -p1 -b .swraid2
 
 %build
 make
@@ -80,6 +85,10 @@
 %ghost %config(noreplace) %{_sysconfdir}/yaboot.conf
 
 %changelog
+* Fri Jul 22 2005 Paul Nasrat <pnasrat redhat com> - 1.3.13-0.1
+- Upstream 1.3.13
+- Add patches on development tree
+
 * Tue Mar 15 2005 Paul Nasrat <pnasrat redhat com> - 1.3.12-9
 - GCC 4 rebuild
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]