[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
rpms/yaboot/devel yaboot-1.3.13-pegasos-claim.patch, NONE, 1.1 yaboot-1.3.13-pegasos-ext2.patch, NONE, 1.1 yaboot.spec, 1.13, 1.14
- From: fedora-cvs-commits redhat com
- To: fedora-cvs-commits redhat com
- Subject: rpms/yaboot/devel yaboot-1.3.13-pegasos-claim.patch, NONE, 1.1 yaboot-1.3.13-pegasos-ext2.patch, NONE, 1.1 yaboot.spec, 1.13, 1.14
- Date: Fri, 29 Jul 2005 11:04:49 -0400
Author: dwmw2
Update of /cvs/dist/rpms/yaboot/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv23148
Modified Files:
yaboot.spec
Added Files:
yaboot-1.3.13-pegasos-claim.patch
yaboot-1.3.13-pegasos-ext2.patch
Log Message:
Pegasos support
yaboot-1.3.13-pegasos-claim.patch:
prom.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
--- NEW FILE yaboot-1.3.13-pegasos-claim.patch ---
--- yaboot-1.3.13/second/prom.c~ 2003-11-04 09:13:17.000000000 +0000
+++ yaboot-1.3.13/second/prom.c 2005-07-29 13:19:35.000000000 +0100
@@ -547,7 +547,11 @@ prom_sleep (int seconds)
void *
prom_claim (void *virt, unsigned int size, unsigned int align)
{
- return call_prom ("claim", 3, 1, virt, size, align);
+ void *ret = call_prom ("claim", 3, 1, virt, size, align);
+ /* Pegasos II SmartFirmware returns zero for failure, usefully */
+ if (virt && !ret)
+ ret = (void *)-1;
+ return ret;
}
void
yaboot-1.3.13-pegasos-ext2.patch:
ybin | 37 +++++++++++++++++++++++++++++++------
1 files changed, 31 insertions(+), 6 deletions(-)
--- NEW FILE yaboot-1.3.13-pegasos-ext2.patch ---
--- yaboot-1.3.13/ybin/ybin.ext2 2005-07-29 13:22:40.000000000 +0100
+++ yaboot-1.3.13/ybin/ybin 2005-07-29 13:23:01.000000000 +0100
@@ -75,6 +75,8 @@ fi
usemount=no
if (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then
fstype=raw
+elif (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'Pegasos') ; then
+ fstype=ext2
else
fstype=hfs
fi
@@ -277,13 +279,13 @@ checkconf()
fi
case "$fstype" in
- hfs|msdos|raw)
+ hfs|msdos|raw|ext2)
;;
*)
if [ "$ARGFS" = 1 ] ; then
- echo 1>&2 "$PRG: --filesystem must be either \`hfs', \`msdos', or \`raw'"
+ echo 1>&2 "$PRG: --filesystem must be either \`hfs', \`msdos', \`ext2' or \`raw'"
else
- echo 1>&2 "$PRG:$ERR \`fstype' must be either \`hfs', \`msdos', or \`raw'"
+ echo 1>&2 "$PRG:$ERR \`fstype' must be either \`hfs', \`msdos', \`ext2' or \`raw'"
fi
local CONFERR=1
;;
@@ -942,12 +944,16 @@ util_install()
## used by mnt_install so mntpoint= can be supported in a cleaner way.
mnt()
{
+ local mountopts="rw"
+
## we can even create bootstrap filesystem images directly if you
## ever wanted too.
if [ -f "$boot" ] ; then
- local loop=",loop"
+ mountopts="$mountopts,loop"
+ fi
+ if [ "$fstype" = "msdos" ] ; then
+ mountopts="$mountopts,umask=077"
fi
-
if [ -e "$TMP/bootstrap.$$" ] ; then
echo 1>&2 "$PRG: $TMP/bootstrap.$$ exists, aborting."
return 1
@@ -966,7 +972,7 @@ mnt()
fi
[ "$VERBOSE" = 1 ] && echo "$PRG: Mounting $boot..."
- mount -t "$fstype" -o rw,umask=077$loop "$boot" "$TMP/bootstrap.$$"
+ mount -t "$fstype" -o rw,$mountopts$loop "$boot" "$TMP/bootstrap.$$"
if [ $? != 0 ] ; then
echo 1>&2 "$PRG: An error occured mounting $boot"
return 1
@@ -1252,6 +1258,25 @@ mkoffs()
fi
return 0
;;
+ ext2)
+ if (command -v mkfs.ext2 > /dev/null 2>&1) ; then
+ [ -x `command -v mkfs.ext2` ] || FAIL=1 ; else FAIL=1 ; fi
+ if [ "$FAIL" = 1 ] ; then
+ echo 1>&2 "$PRG: mkfs.ext2 is not installed or cannot be found"
+ return 1
+ fi
+
+ [ "$VERBOSE" = 1 ] && echo "$PRG: Creating ext2 filesystem on $boot..."
+ if (command -v dd > /dev/null 2>&1) ; then
+ dd if=/dev/zero of="$boot" bs=512 count=1600 > /dev/null 2>&1
+ fi
+ mkfs.ext2 -L bootstrap "$boot" > /dev/null
+ if [ $? != 0 ] ; then
+ echo 1>&2 "$PRG: ext2 filesystem creation failed!"
+ return 1
+ fi
+ return 0
+ ;;
esac
}
Index: yaboot.spec
===================================================================
RCS file: /cvs/dist/rpms/yaboot/devel/yaboot.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- yaboot.spec 25 Jul 2005 20:32:53 -0000 1.13
+++ yaboot.spec 29 Jul 2005 15:04:45 -0000 1.14
@@ -1,7 +1,7 @@
Summary: Linux bootloader for Power Macintosh "New World" computers.
Name: yaboot
Version: 1.3.13
-Release: 0.1
+Release: 0.2
License: GPL
Group: System Environment/Base
Source: http://penguinppc.org/bootloaders/yaboot/yaboot-%{version}.tar.gz
@@ -21,6 +21,8 @@
Patch14: yaboot-1.3.13-swraid1.patch
Patch15: yaboot-1.3.13-nobootx.patch
Patch16: yaboot-1.3.13-swraid2.patch
+Patch17: yaboot-1.3.13-pegasos-claim.patch
+Patch18: yaboot-1.3.13-pegasos-ext2.patch
URL: http://penguinppc.org/bootloaders/yaboot/
BuildRoot: %{_tmppath}/%{name}-root
@@ -52,6 +54,8 @@
%patch14 -p1 -b .swraid1
%patch15 -p1 -b .nobootx
%patch16 -p1 -b .swraid2
+%patch17 -p1 -b .pegasos
+%patch18 -p1 -b .ext2
%build
make
@@ -85,6 +89,10 @@
%ghost %config(noreplace) %{_sysconfdir}/yaboot.conf
%changelog
+* Fri Jul 22 2005 Paul Nasrat <pnasrat redhat com> - 1.3.13-0.2
+- Workaround claim bug in Pegasos SmartFirmware
+- Handle ext2 boot partition
+
* Fri Jul 22 2005 Paul Nasrat <pnasrat redhat com> - 1.3.13-0.1
- Upstream 1.3.13
- Add patches on yaboot-1.3.x tree
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]