From 9e0e5744216e70ca6291c71ebef16110e785cb09 Mon Sep 17 00:00:00 2001 From: Joseph Jezak Date: Thu, 6 Sep 2007 21:18:04 +0000 Subject: Added latest version. Removed old versions and obsolete patches. Fixed nopiessp patch. (Portage version: 2.1.3.7) --- sys-boot/yaboot/ChangeLog | 16 +- sys-boot/yaboot/files/digest-yaboot-1.3.11-r1 | 3 - sys-boot/yaboot/files/digest-yaboot-1.3.12-r1 | 3 - sys-boot/yaboot/files/digest-yaboot-1.3.13 | 3 - sys-boot/yaboot/files/digest-yaboot-1.3.13-r1 | 3 - sys-boot/yaboot/files/digest-yaboot-1.3.14 | 3 + .../yaboot/files/yaboot-1.3.11-ofpath-fix.patch | 56 -- .../yaboot/files/yaboot-1.3.12-k2sata-ofpath.patch | 17 - sys-boot/yaboot/files/yaboot-1.3.13-ofpath.patch | 66 -- sys-boot/yaboot/files/yaboot-3.4.patch | 13 - sys-boot/yaboot/files/yaboot-nopiessp.patch | 2 +- .../yaboot/files/yaboot-ofpath-device-tree.patch | 31 - sys-boot/yaboot/files/yabootconfig | 697 --------------------- sys-boot/yaboot/files/yabootconfig-1.3.10.patch | 78 --- sys-boot/yaboot/files/yabootconfig-1.3.11.patch | 78 --- sys-boot/yaboot/files/yabootconfig-1.3.12.patch | 78 --- sys-boot/yaboot/yaboot-1.3.11-r1.ebuild | 40 -- sys-boot/yaboot/yaboot-1.3.12-r1.ebuild | 45 -- sys-boot/yaboot/yaboot-1.3.13-r1.ebuild | 47 -- sys-boot/yaboot/yaboot-1.3.13.ebuild | 46 -- sys-boot/yaboot/yaboot-1.3.14.ebuild | 37 ++ 21 files changed, 56 insertions(+), 1306 deletions(-) delete mode 100644 sys-boot/yaboot/files/digest-yaboot-1.3.11-r1 delete mode 100644 sys-boot/yaboot/files/digest-yaboot-1.3.12-r1 delete mode 100644 sys-boot/yaboot/files/digest-yaboot-1.3.13 delete mode 100644 sys-boot/yaboot/files/digest-yaboot-1.3.13-r1 create mode 100644 sys-boot/yaboot/files/digest-yaboot-1.3.14 delete mode 100644 sys-boot/yaboot/files/yaboot-1.3.11-ofpath-fix.patch delete mode 100644 sys-boot/yaboot/files/yaboot-1.3.12-k2sata-ofpath.patch delete mode 100644 sys-boot/yaboot/files/yaboot-1.3.13-ofpath.patch delete mode 100644 sys-boot/yaboot/files/yaboot-3.4.patch delete mode 100644 sys-boot/yaboot/files/yaboot-ofpath-device-tree.patch delete mode 100644 sys-boot/yaboot/files/yabootconfig delete mode 100644 sys-boot/yaboot/files/yabootconfig-1.3.10.patch delete mode 100644 sys-boot/yaboot/files/yabootconfig-1.3.11.patch delete mode 100644 sys-boot/yaboot/files/yabootconfig-1.3.12.patch delete mode 100644 sys-boot/yaboot/yaboot-1.3.11-r1.ebuild delete mode 100644 sys-boot/yaboot/yaboot-1.3.12-r1.ebuild delete mode 100644 sys-boot/yaboot/yaboot-1.3.13-r1.ebuild delete mode 100644 sys-boot/yaboot/yaboot-1.3.13.ebuild create mode 100644 sys-boot/yaboot/yaboot-1.3.14.ebuild diff --git a/sys-boot/yaboot/ChangeLog b/sys-boot/yaboot/ChangeLog index f382f0620316..e1e0aada0173 100644 --- a/sys-boot/yaboot/ChangeLog +++ b/sys-boot/yaboot/ChangeLog @@ -1,6 +1,20 @@ # ChangeLog for sys-boot/yaboot # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/ChangeLog,v 1.25 2007/03/15 23:35:54 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/ChangeLog,v 1.26 2007/09/06 21:18:04 josejx Exp $ + +*yaboot-1.3.14 (06 Sep 2007) + + 06 Sep 2007; Joseph Jezak + -files/yabootconfig-1.3.10.patch, -files/yaboot-1.3.11-ofpath-fix.patch, + -files/yabootconfig-1.3.11.patch, + -files/yaboot-1.3.12-k2sata-ofpath.patch, + -files/yabootconfig-1.3.12.patch, -files/yaboot-1.3.13-ofpath.patch, + -files/yaboot-3.4.patch, files/yaboot-nopiessp.patch, + -files/yaboot-ofpath-device-tree.patch, -files/yabootconfig, + -yaboot-1.3.11-r1.ebuild, -yaboot-1.3.12-r1.ebuild, -yaboot-1.3.13.ebuild, + -yaboot-1.3.13-r1.ebuild, +yaboot-1.3.14.ebuild: + Added latest version. Removed old versions and obsolete patches. Fixed + nopiessp patch. 15 Mar 2007; Joseph Jezak yaboot-1.3.14_pre1.ebuild: Marked ppc stable. diff --git a/sys-boot/yaboot/files/digest-yaboot-1.3.11-r1 b/sys-boot/yaboot/files/digest-yaboot-1.3.11-r1 deleted file mode 100644 index c1248c6127e8..000000000000 --- a/sys-boot/yaboot/files/digest-yaboot-1.3.11-r1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 338be176b2767498fd42e9e9c2f4f3da yaboot-1.3.11.tar.gz 272953 -RMD160 24c4c44c3b9f7699691af13b1c7b6eb17aab7bce yaboot-1.3.11.tar.gz 272953 -SHA256 ddd9bf9d06ea081e4c555223edbff6fb72dfbf4e17349230f9fd450811ae962e yaboot-1.3.11.tar.gz 272953 diff --git a/sys-boot/yaboot/files/digest-yaboot-1.3.12-r1 b/sys-boot/yaboot/files/digest-yaboot-1.3.12-r1 deleted file mode 100644 index a833aae7ce5c..000000000000 --- a/sys-boot/yaboot/files/digest-yaboot-1.3.12-r1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 85cf685c1dc5873c2a5124ba4524b2d2 yaboot-1.3.12.tar.gz 274353 -RMD160 050fa3c65e3b14778d9101699b2be4679779c393 yaboot-1.3.12.tar.gz 274353 -SHA256 f01bd4b0d13532e9724c21627b8093c416c89f8a54f9f120f6e2fcc34bd7f0c5 yaboot-1.3.12.tar.gz 274353 diff --git a/sys-boot/yaboot/files/digest-yaboot-1.3.13 b/sys-boot/yaboot/files/digest-yaboot-1.3.13 deleted file mode 100644 index 78ff1a3c645b..000000000000 --- a/sys-boot/yaboot/files/digest-yaboot-1.3.13 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 f12798d1b2063f21d07e0ae7f602ccaf yaboot-1.3.13.tar.gz 275886 -RMD160 ee60a0937884cf9c206f7cf75a57711b3a2d5589 yaboot-1.3.13.tar.gz 275886 -SHA256 2684a8eb8d9bdc09fcc75db451da26eac4cff255735777214eeb49610ea28eff yaboot-1.3.13.tar.gz 275886 diff --git a/sys-boot/yaboot/files/digest-yaboot-1.3.13-r1 b/sys-boot/yaboot/files/digest-yaboot-1.3.13-r1 deleted file mode 100644 index 78ff1a3c645b..000000000000 --- a/sys-boot/yaboot/files/digest-yaboot-1.3.13-r1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 f12798d1b2063f21d07e0ae7f602ccaf yaboot-1.3.13.tar.gz 275886 -RMD160 ee60a0937884cf9c206f7cf75a57711b3a2d5589 yaboot-1.3.13.tar.gz 275886 -SHA256 2684a8eb8d9bdc09fcc75db451da26eac4cff255735777214eeb49610ea28eff yaboot-1.3.13.tar.gz 275886 diff --git a/sys-boot/yaboot/files/digest-yaboot-1.3.14 b/sys-boot/yaboot/files/digest-yaboot-1.3.14 new file mode 100644 index 000000000000..da81a1857da4 --- /dev/null +++ b/sys-boot/yaboot/files/digest-yaboot-1.3.14 @@ -0,0 +1,3 @@ +MD5 9b1246c474eeb37f61081ad762563b35 yaboot-1.3.14.tar.gz 219089 +RMD160 dd46fc044732c5bdf3dc23b3faa1dd746895cdd5 yaboot-1.3.14.tar.gz 219089 +SHA256 b1b0ddc798e332dc03065bac871b05f700b6f8383951a05dee68a7438f644933 yaboot-1.3.14.tar.gz 219089 diff --git a/sys-boot/yaboot/files/yaboot-1.3.11-ofpath-fix.patch b/sys-boot/yaboot/files/yaboot-1.3.11-ofpath-fix.patch deleted file mode 100644 index 9e2d0ccb2cf6..000000000000 --- a/sys-boot/yaboot/files/yaboot-1.3.11-ofpath-fix.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -ruN yaboot-1.3.11.orig/ybin/ofpath yaboot-1.3.11/ybin/ofpath ---- yaboot-1.3.11.orig/ybin/ofpath 2004-03-31 01:53:42.429814600 +0200 -+++ yaboot-1.3.11/ybin/ofpath 2004-03-28 06:58:21.000000000 +0200 -@@ -27,7 +27,7 @@ - - PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" - PRG="${0##*/}" --VERSION=1.0.5 -+VERSION=1.0.6-pre2 - DEBUG=0 - export LC_COLLATE=C - -@@ -297,7 +297,7 @@ - DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)" - echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION" - ;; -- ata_k2) -+ ata_k2|sata_svw) - HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do - lgrep "$i" "k2-s-ata" ; done)" - DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)" -@@ -323,11 +323,32 @@ - echo 1>&2 "$PRG: BUG: IDEBUS == NULL" - return 1 - fi -- local OF1275IDE="/proc/ide/$IDEBUS/devspec" -+ -+ case "$(uname -r)" in -+ 2.5.*|2.6.0*|2.6.1|2.6.1-*|2.6.2|2.6.2-*) -+ echo "$PRG: Linux kernel `uname -r` is not supported" -+ return 1 -+ ;; -+ 2.6.*|2.7.*) -+ if ! (grep -q '.* .* sysfs ' /proc/mounts 2> /dev/null) ; then -+ echo 1>&2 "$PRG: sysfs must be mounted for ofpath to support this system" -+ return 1 -+ fi -+ local SYS="$(m=`grep '.* .* sysfs ' /proc/mounts | head -n 1` ; echo `d=${m#* };echo ${d%% *}`)" -+ if [ -z "$SYS" -o ! -d "$SYS" ] ; then -+ echo 2>&1 "$PRG: Unable to determine sysfs mountpoint" -+ return 1 -+ fi -+ local OF1275IDE="${SYS}/block/${DEVNODE}/device/../../devspec" -+ ;; -+ *) -+ local OF1275IDE="/proc/ide/$IDEBUS/devspec" -+ ;; -+ esac - - if [ ! -f "$OF1275IDE" ] ; then - case "$(cat /proc/device-tree/model)" in -- "PowerMac3,6") -+ PowerMac3*|PowerMac4*|PowerMac5*|PowerMac6*|PowerMac7*|X*) - local CDROM="$(grep "^drive name:" /proc/sys/dev/cdrom/info 2> /dev/null | grep $DEVNODE)" - if [ -z "$CDROM" ] ; then - echo 1>&2 "$PRG: WARNING: Your kernel is too old for proper support, device may be innaccurate." diff --git a/sys-boot/yaboot/files/yaboot-1.3.12-k2sata-ofpath.patch b/sys-boot/yaboot/files/yaboot-1.3.12-k2sata-ofpath.patch deleted file mode 100644 index 64fd28a36fc2..000000000000 --- a/sys-boot/yaboot/files/yaboot-1.3.12-k2sata-ofpath.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- yaboot-1.3.12.orig/ybin/ofpath 2004-05-23 17:20:56.382633120 -0400 -+++ yaboot-1.3.12/ybin/ofpath 2004-05-23 17:20:26.013249968 -0400 -@@ -301,7 +301,13 @@ - HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do - lgrep "$i" "k2-s-ata" ; done)" - DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)" -- echo "${DEVICE_PATH##*device-tree}/k2-sata@$DEVICE_ID/disk@0:$PARTITION" -+ K2_DEVICE_ID=0 -+ while [ "$DEVICE_PATH" = "" ] ; do -+ SCSI_HOSTNUMBER=`expr $SCSI_HOSTNUMBER - 1` -+ let "K2_DEVICE_ID += 1" -+ DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)" -+ done -+ echo "${DEVICE_PATH##*device-tree}/k2-sata@$K2_DEVICE_ID/disk@0:$PARTITION" - ;; - *) - echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported" diff --git a/sys-boot/yaboot/files/yaboot-1.3.13-ofpath.patch b/sys-boot/yaboot/files/yaboot-1.3.13-ofpath.patch deleted file mode 100644 index 33461266feac..000000000000 --- a/sys-boot/yaboot/files/yaboot-1.3.13-ofpath.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- yaboot-1.3.13.orig/ybin/ofpath 2004-11-04 21:57:17.000000000 -0500 -+++ yaboot-1.3.13/ybin/ofpath 2004-11-04 22:36:41.234195024 -0500 -@@ -8,6 +8,9 @@ - ## Portions based on show_of_path.sh: - ## - ## Copyright (C) 2000 Olaf Hering -+## -+## sbp2 patch: -+## Copyright (C) 2004 Christiaan Welvaart - ## - ## This program is free software; you can redistribute it and/or - ## modify it under the terms of the GNU General Public License -@@ -301,7 +304,52 @@ - HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do - lgrep "$i" "k2-s-ata" ; done)" - DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)" -- echo "${DEVICE_PATH##*device-tree}/k2-sata@$DEVICE_ID/disk@0:$PARTITION" -+ K2_DEVICE_ID=0 -+ while [ "$DEVICE_PATH" = "" ] ; do -+ SCSI_HOSTNUMBER=`expr $SCSI_HOSTNUMBER - 1` -+ let "K2_DEVICE_ID += 1" -+ DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)" -+ done -+ echo "${DEVICE_PATH##*device-tree}/k2-sata@$K2_DEVICE_ID/disk@0:$PARTITION" -+ ;; -+ usb-storage) -+ if [ ! -d /sys/devices ] -+ then -+ echo 1>&2 "sysfs must be mounted on /sys for usb-storage support" -+ return 1 -+ fi -+ local USBDEV=`readlink /sys/block/$DEVNODE/device` -+ local PCIADDR=`echo ${USBDEV#../../devices/} |sed -re 's#(pci[^/]*/[^/]*)/.*#\1#'` -+ local USBPATH=`echo ${USBDEV} |sed -re 's#.*/[0-9]*-([0-9\.]*):[0-9\.]*/host[0-9]*/[^/]*#\1#'` -+ local DEVSPEC=`cat /sys/devices/$PCIADDR/devspec` -+ local DISKPATH=`echo $USBPATH |sed -re 's#((.*\.)*)([0-9]*)$#\1disk@\3#' |sed -re 's#([0-9]*)\.#hub@\1/#'` -+ if [ `cat /proc/device-tree${DEVSPEC}/device_type` = ehci ] -+ then -+ local USB2PORT=`echo ${DEVSPEC} |sed -re 's#^.*,([0-9]+)#\1#'` -+ local USB1PORT=`echo ${DISKPATH} |sed -re 's#^[^@]+@([0-9]+).*#\1#'` -+ USB1PORT=`expr $USB1PORT - 1` -+ DISKPATH=`echo ${DISKPATH} |sed -re "s/^([^@]+)@${USB2PORT}(.*)/\1@1\2/"` -+ DEVSPEC=`echo ${DEVSPEC} |sed -re "s/^(.*),${USB2PORT}\$/\1,${USB1PORT}/"` -+ fi -+ echo "${DEVSPEC#,0}/${DISKPATH}:${PARTITION}" -+ ;; -+ "") -+ # sbp-2 driver does not have a dir in /proc/scsi -+ if [ -d /sys/devices ] -+ then -+ local SYSFSDEV=`readlink /sys/block/$DEVNODE/device` -+ local FWNODE=`echo ${SYSFSDEV} |sed -re 's#^.*/fw-host[0-9]+/([^/]+)/.*#\1#'` -+ local PCIADDR=`echo ${SYSFSDEV#../../devices/} |sed -re 's#(pci[^/]*/[^/]*)/.*#\1#'` -+ local DEVSPEC=`cat /sys/devices/$PCIADDR/devspec` -+ local OFNODE="${DEVSPEC}/node@${FWNODE}/sbp-2/disk@0" -+ if [ -f /proc/device-tree${OFNODE}/device_type ] -+ then -+ echo "${OFNODE}:${PARTITION}" -+ return 0 -+ fi -+ fi -+ echo 1>&2 "$PRG: cannot find SCSI driver for ${DEVNODE}" -+ return 1 - ;; - *) - echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported" diff --git a/sys-boot/yaboot/files/yaboot-3.4.patch b/sys-boot/yaboot/files/yaboot-3.4.patch deleted file mode 100644 index 57964d8a911c..000000000000 --- a/sys-boot/yaboot/files/yaboot-3.4.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- ./lib/strstr.c.orig 2004-05-12 16:16:44.249220125 +0000 -+++ ./lib/strstr.c 2004-05-12 16:14:47.245465904 +0000 -@@ -76,7 +76,9 @@ - a = *++haystack; - if (a == '\0') - goto ret0; --shloop: } -+shloop: -+ a = a; -+ } - while (a != b); - - jin: a = *++haystack; diff --git a/sys-boot/yaboot/files/yaboot-nopiessp.patch b/sys-boot/yaboot/files/yaboot-nopiessp.patch index 1fd8ea42e6d0..32e64392b730 100644 --- a/sys-boot/yaboot/files/yaboot-nopiessp.patch +++ b/sys-boot/yaboot/files/yaboot-nopiessp.patch @@ -6,7 +6,7 @@ diff -Nrup yaboot-1.3.13.orig/Config.gentoo yaboot-1.3.13/Config.gentoo + then echo "$(1)"; else echo "$(2)"; fi) + +CFLAGS += $(call check_gcc, -fno-stack-protector) -+CFLAGS += $(call check_gcc, -nopie) ++CFLAGS += $(call check_gcc, --nopie) + diff -Nrup yaboot-1.3.13.orig/Makefile yaboot-1.3.13/Makefile --- yaboot-1.3.13.orig/Makefile 2004-07-11 20:12:03.000000000 +0000 diff --git a/sys-boot/yaboot/files/yaboot-ofpath-device-tree.patch b/sys-boot/yaboot/files/yaboot-ofpath-device-tree.patch deleted file mode 100644 index 042221965d37..000000000000 --- a/sys-boot/yaboot/files/yaboot-ofpath-device-tree.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- yaboot-1.3.13.orig/ybin/ofpath 2005-10-08 20:16:46.000000000 -0400 -+++ yaboot-1.3.13/ybin/ofpath 2005-10-08 20:17:59.000000000 -0400 -@@ -473,14 +473,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 - -@@ -715,13 +707,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." -- return 1 -- fi -- - ## use common scsiinfo function to get info we need. - scsiinfo || return 1 - diff --git a/sys-boot/yaboot/files/yabootconfig b/sys-boot/yaboot/files/yabootconfig deleted file mode 100644 index 5efc4a5cf5da..000000000000 --- a/sys-boot/yaboot/files/yabootconfig +++ /dev/null @@ -1,697 +0,0 @@ -#! /bin/sh - -############################################################################### -## -## yabootconfig generates a simple /etc/yaboot.conf -## Copyright (C) 2001 Ethan Benson -## Patched for Gentoo and dual boot - Mark Guertin -## -## This program is free software; you can redistribute it and/or -## modify it under the terms of the GNU General Public License -## as published by the Free Software Foundation; either version 2 -## of the License, or (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## -############################################################################### - -PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" -## allow to run out of /target in boot-floppies -if [ -n "$PATH_PREFIX" ] ; then - 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##*/}" -VERSION=1.0.5 -CHROOT=/ -## $CONFIG is relative to $CHROOT -CONFIG=etc/yaboot.conf -NOINSTALL=0 -QUIET=0 -DEBUG=0 -SIGINT="$PRG: Interrupt caught ... exiting" -export LC_COLLATE=C - -## catch signals, clean up temporary file -trap "cleanup" 0 -trap "exit 129" 1 -trap "echo 1>&2 $SIGINT ; exit 130" 2 -trap "exit 131" 3 -trap "exit 143" 15 - -## check for printf, use it if possible otherwise fall back on -## unreliable echo -e -n ("SUS" says echo shall support no switches) -if [ "$(printf printf_test 2>/dev/null)" = printf_test ] ; then - PRINTF=printf -else - PRINTF="echo -e -n" -fi - -## make sure echo is not lame if we must use it. -if [ "$PRINTF" != printf ] ; then - if [ "$(echo -e -n echo_test)" != "echo_test" ] ; then - echo 1>&2 "$PRG: printf unavailable and echo is broken, sorry." - exit 1 - fi -fi - -## make fake `id' if its missing, outputs 0 since if its missing we -## are probably running on boot floppies and thus are root. -if (command -v id > /dev/null 2>&1) ; then - true -else - id() - { - echo 0 - } -fi - -## --version output -version() -{ -echo \ -"$PRG $VERSION -Written by Ethan Benson - -Copyright (C) 2001 Ethan Benson -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -} - -## --help output. -usage() -{ -echo \ -"Usage: $PRG [OPTION]... -Generate a working /etc/yaboot.conf. - - -t, --chroot set root directory $PRG should work from - -r, --root set root partition, Example: /dev/hda3 - default: determined from {chroot}/etc/fstab - -b, --boot set bootstrap partition, Example: /dev/hda2 - default: first type: Apple_Bootstrap partition - --kernel-args add an append= line with specified arguments - -q, --quiet don't ask any questions/confirmation - --noinstall don't automatically run mkofboot - -h, --help display this help and exit - -V, --version output version information and exit" -} - -debug() -{ - [ "$DEBUG" = 0 ] && return 0 - $PRINTF 1>&2 "$PRG: DEBUG: $1" -} - -confirm() -{ - $PRINTF \ -"yaboot is the Linux Loader for PowerPC. $PRG sets up your system to boot directly -from your hard disk, without the need for a boot CD, floppy or a network boot.\n" -[ "$NOINSTALL" = 0 ] && $PRINTF "Install yaboot bootstrap on $BOOT to boot Linux from $ROOT? [Yes] " -[ "$NOINSTALL" = 1 ] && $PRINTF "Create simple ${CHROOT}${CONFIG} to boot Linux from $ROOT? [Yes] " - read ans - case "$ans" in - Y|y|Yes|yes|YES|"") - echo "Creating a simple ${CHROOT}${CONFIG}..." - return 0 - ;; - *) - if [ "$NOINSTALL" = 0 ] ; then - $PRINTF "Create simple ${CHROOT}${CONFIG} without installing the bootstrap? [Yes] " - read ans - case "$ans" in - Y|y|Yes|yes|YES|"") - NOINSTALL=1 - echo 1>&2 "Creating a simple ${CHROOT}${CONFIG}..." - return 0 - ;; - *) - echo "OK, quitting" - return 1 - ;; - esac - else - echo "OK, quitting" - return 1 - fi - ;; - esac -} - -## find out whether we have mac-fdisk or pdisk (they work the same) -ckmacfdisk() -{ - if (command -v mac-fdisk > /dev/null 2>&1) ; then - FDISK=mac-fdisk - elif (command -v pdisk > /dev/null 2>&1) ; then - FDISK=pdisk - else - echo 1>&2 "$PRG: Unable to locate mac-fdisk" - return 1 - fi - - if [ ! -x `command -v $FDISK` 2> /dev/null ] ; then - echo 1>&2 "$PRG: `command -v $FDISK`: Permission denied" - return 1 - fi - debug "mac-fdisk is: $FDISK\n" - return 0 -} - -## find out if we have ddisk or fdisk (fdisk for dos labels) debian -## uses both names -ckfdisk() -{ - if (command -v ddisk > /dev/null 2>&1) ; then - FDISK=ddisk - elif (command -v fdisk > /dev/null 2>&1) ; then - FDISK=fdisk - else - echo 1>&2 "$PRG: Unable to locate fdisk" - return 1 - fi - - if [ ! -x `command -v $FDISK` 2> /dev/null ] ; then - echo 1>&2 "$PRG: `command -v $FDISK`: Permission denied" - return 1 - fi - debug "fdisk is: $FDISK\n" - return 0 -} - -## find bootstrap partition, supports IBM CHRP with msdos disklabels -findbootblock() -{ - ## mac partition table magic == ER - if [ "$(dd if="$DISK" bs=2 count=1 2> /dev/null)" = ER ] ; then - ckmacfdisk || return 1 - if [ "$FDISK" = pdisk ] ; then - ## handle braindamaged pdisk - debug "dealing with pdisk deficiency...\n" - BOOT="$(v=`$FDISK -l "$DISK" 2>/dev/null | grep '\'` ; echo ${v%%:*})" - debug "BOOT before fixup: $BOOT\n" - if [ -n "$BOOT" ] ; then - BOOT="${DISK}${BOOT}" - fi - debug "BOOT after fixup: $BOOT\n" - else - BOOT="$(v=`$FDISK -l "$DISK" 2>/dev/null | grep '\'` ; echo ${v%%[ ]*})" - debug "BOOT=$BOOT\n" - fi - if [ -z "$BOOT" ] ; then - echo 1>&2 "$PRG: Unable to locate bootstrap partition on $DISK..." - echo 1>&2 "$PRG: You must create an 800K type: Apple_Bootstrap partition to make the disk bootable" - return 1 - fi - else - ckfdisk || return 1 - BOOT="$(v=`$FDISK -l "$DISK" 2>/dev/null | grep '\'` ; echo ${v%%[ ]*})" - debug "BOOT=$BOOT\n" - if [ -z "$BOOT" ] ; then - echo 1>&2 "$PRG: Unable to locate bootstrap partition on $DISK..." - echo 1>&2 "$PRG: You must create an 800K type: 0x41 PPC PReP Boot partition to make the disk bootable" - return 1 - fi - fi - return 0 -} - -## if readlink is missing use a kludge -if (command -v readlink > /dev/null 2>&1) ; then - true -else - readlink() - { - SYMTARGET="$(v=`ls -l "$2" 2>/dev/null` ; echo ${v##*> })" - if [ -n "$SYMTARGET" ] ; then - echo "$SYMTARGET" - return 0 - else - return 1 - fi - } -fi - -## we have to do some things differently with a retarded devfs name. -ckdevfs() -{ - case "$1" in - /dev/ide/*|/dev/scsi/*|/dev/discs/*) - return 0 - ;; - *) - return 1 - ;; - esac -} - -cleanup() -{ - if [ -n "$TMPCONF" ] ; then rm -f "$TMPCONF" ; fi - return 0 -} - -dualboot() -{ - DRIVELIST=`ls -d /dev/?d?* | grep "[sh]d[abcdefghijkl]" | cut -b 6-8 | sort -u` - - for i in $DRIVELIST - do - HFS=`mac-fdisk -l "/dev/$i" | grep '\' | grep -v "CDROM" | cut -d" " -f1` - for h in $HFS - do - if [ !-x `hpmount -r $h` > /dev/null 2>&1 ] ; then - if [ `hpls mach_kernel 2>/dev/null` ] ; then - [ "$QUIET" = 0 ] && echo "Found possible OS X partition at $h" - OSX=$h - fi - if [ "`hpls "System Folder" 2>/dev/null`" ] ; then - [ "$QUIET" = 0 ] && echo "Found possible Mac OS partition at $h" - MACOS=$h - fi - hpumount $h > /dev/null 2>&1 - fi - done - done -} - -########## -## Main ## -########## - -if [ $# != 0 ] ; then - while true ; do - case "$1" in - -V|--version) - version - exit 0 - ;; - -h|--help) - usage - exit 0 - ;; - -t|--chroot) - if [ -n "$2" ] ; then - CHROOT="$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 - ;; - -b|--boot) - if [ -n "$2" ] ; then - BOOT="$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 - ;; - -r|--root) - if [ -n "$2" ] ; then - ROOT="$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" - shift 2 - else - echo 1>&2 "$PRG: option requires an argument $1" - echo 1>&2 "Try \`$PRG --help' for more information." - exit 1 - fi - ;; - -q|--quiet) - QUIET=1 - shift 1 - ;; - --noinstall) - NOINSTALL=1 - shift 1 - ;; - --debug) - DEBUG=1 - shift 1 - ;; - "") - break - ;; - *) - echo 1>&2 "$PRG: unrecognized option \`$1'" - echo 1>&2 "Try \`$PRG --help' for more information." - exit 1 - ;; - esac - done -fi - -if [ `id -u` != 0 ] ; then - echo 1>&2 "$PRG: You are not root, go away" - exit 1 -fi - -## we need /proc because df does -if [ ! -f /proc/uptime ] ; then - echo 1>&2 "$PRG: This utility requires the /proc filesystem" - exit 1 -fi - -## check that chroot exists -if [ -d "$CHROOT" ] ; then - ## HACK: add trailing / to chroot, otherwise are paths later get b0rked. - case "$CHROOT" in - */) - true - ;; - *) - CHROOT="${CHROOT}/" - ;; - esac -elif [ ! -e "$CHROOT" ] ; then - echo 1>&2 "$PRG: $CHROOT: No such file or directory" - exit 1 -elif [ ! -d "$CHROOT" ] ; then - echo 1>&2 "$PRG: $CHROOT: Not a directory" - exit 1 -fi - -## make sure the chroot is an actual root filesystem -if [ ! -f "${CHROOT}etc/fstab" ] ; then - echo 1>&2 "$PRG: $CHROOT does not appear to be a valid root filesystem" - exit 1 -fi - -## find / device -if [ -z "$ROOT" ] ; then - ## IMPORTANT! that last substitution is [] thats all ash will grok - ROOT="$(v=`grep '[[:blank:]]/[[:blank:]]' ${CHROOT}etc/fstab` ; echo ${v%%[ ]*})" - debug "ROOT=$ROOT\n" - if [ -z "$ROOT" ] ; then - echo 1>&2 "$PRG: Could not determine root partition, aborting..." - exit 1 - fi -fi - -## make sure root device exists -if [ ! -e "$ROOT" ] ; then - echo 1>&2 "$PRG: $ROOT: No such file or directory" - exit 1 -fi - -## find root disk. -if ckdevfs "$ROOT" ; then - DISK="${ROOT%/*}/disc" -else - DISK="${ROOT%%[0-9]*}" -fi -if [ -z "$DISK" ] ; then - echo 1>&2 "$PRG: Could not determine root disk, aborting..." - exit 1 -fi - -## make sure main disk exists -if [ ! -e "$DISK" ] ; then - echo 1>&2 "$PRG: $DISK: No such file or directory" - exit 1 -fi - -## find bootstrap partition -if [ -z "$BOOT" ] ; then - findbootblock || exit 1 -fi - -## make sure bootstrap device exists -if [ ! -e "$BOOT" ] ; then - echo 1>&2 "$PRG: $BOOT: No such file or directory" - exit 1 -fi - -## sanity check -for i in "$DISK" "$ROOT" "$BOOT" ; do - if [ ! -b "$i" ] ; then - echo 1>&2 "$PRG: $i: Not a block device" - exit 1 - fi -done - - -## unless --quiet ask permission to proceed -if [ "$QUIET" = 0 ] ; then - confirm || exit 2 -fi - -## find the kernel in the usual places and (if not --quiet) ask the -## user if we cannot find one. -if [ -f "${CHROOT}vmlinux" ] ; then - KERNEL="${CHROOT}vmlinux" -elif [ -f "${CHROOT}boot/vmlinux" ] ; then - KERNEL="${CHROOT}boot/vmlinux" -elif [ -f "${CHROOT}boot/vmlinux-`uname -r`" ] ; then - KERNEL="${CHROOT}boot/vmlinux-`uname -r`" -elif [ -f "${CHROOT}vmlinux-`uname -r`" ] ; then - KERNEL="${CHROOT}vmlinux-`uname -r`" -elif [ "$QUIET" = 0 ] ; then - echo 1>&2 "$PRG: Cannot find a kernel, please locate one" - while true ; do - $PRINTF 1>&2 "Enter path to a kernel image: " - read KERN - if [ -f "$KERN" ] ; then - KERNEL="$KERN" - break - elif [ ! -e "$KERN" ] ; then - echo 1>&2 "$PRG: $KERN: No such file or directory" - elif [ -d "$KERN" ] ; then - echo 1>&2 "$PRG: $KERN: Is a directory" - else - echo 1>&2 "$PRG: $KERN: Is not a regular file" - fi - done -else - echo 1>&2 "$PRG: Cannot find a kernel, aborting..." - exit 1 -fi - -debug "KERNEL=$KERNEL\n" - -## get partition number the kernel lives on, and the OF device= name -## of the whole disk. -KERNDEV="$(v=`df "$KERNEL" 2> /dev/null | grep ^/dev/` ; echo ${v%%[ ]*})" -KERNDIR="$(v=`df "$KERNEL" 2> /dev/null | grep ^/dev/` ; echo ${v##*[ ]})" -LINKDEV="$(v=`df "${KERNEL%/*}/" 2>/dev/null | grep ^/dev/` ; echo ${v%%[ ]*})" -PARTITION="${KERNDEV##*[a-z]}" - -if ckdevfs "$KERNDEV" ; then - KERNELDISK="${KERNDEV%/*}/disc" -else - KERNELDISK="${KERNDEV%%[0-9]*}" -fi - -debug "KERNEL=$KERNEL\nKERNDEV=$KERNDEV\nKERNDIR=$KERNDIR\nLINKDEV=$LINKDEV\nPARTITION=$PARTITION\nKERNELDISK=$KERNELDISK\n" - -## sanity check -for i in "$KERNDEV" "$KERNDIR" "$LINKDEV" "$PARTITION" "$KERNELDISK" ; do - if [ -z "$i" ] ; then - echo 1>&2 "$PRG: Could not determine necessary information, aborting..." - echo 1>&2 "$PRG: Are you using chroot $PRG instead of $PRG --chroot ?" - exit 1 - fi -done - -## check for cross device symlink -if [ -L "$KERNEL" ] ; then - if [ "$KERNDEV" != "$LINKDEV" ] ; then - echo 1>&2 "$PRG: Warning: Cross device symlink $KERNEL, using it's target instead" - KERNEL="$(readlink -f "$KERNEL" 2>/dev/null)" - if [ ! -f "$KERNEL" ] ; then - echo 1>&2 "$PRG: Unable to canonicalize symlink's target. Do not create cross device symlinks." - exit 1 - fi - fi -fi - -## only powermacs appear to need device= -if (cat /proc/cpuinfo 2>/dev/null | grep -q pmac-generation 2> /dev/null) ; then - DEVICE="\ndevice=$(ofpath $KERNELDISK)" - if [ $? != 0 ] ; then - echo 1>&2 "$PRG: Unable to determine OpenFirmware device name to $KERNELDISK, aborting..." - exit 1 - fi -fi - -## 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 - IMAGE="${KERNEL##*$KERNDIR}" -else - IMAGE="$KERNEL" -fi - -## fix chrooted path -if [ "$CHROOT" != / ] ; then - IMAGE="${IMAGE##*$CHROOT}" -fi - -## fix relative path (caused by chroot path fix) -case "$IMAGE" in - /*) - true - ;; - *) - IMAGE="/${IMAGE}" - ;; -esac - -## figure out if yaboot is installed in /usr/local or not -if [ -f /usr/local/lib/yaboot/yaboot ] ; then - INSTALL=/usr/local/lib/yaboot/yaboot -elif [ -f /usr/lib/yaboot/yaboot ] ; then - INSTALL=/usr/lib/yaboot/yaboot -else - echo 1>&2 "$PRG: yaboot is not installed correctly" - exit 1 -fi - -## newworld powermacs need the ofboot first stage loader -if [ "$(v=`cat /proc/cpuinfo 2>/dev/null | grep pmac-generation` ; echo ${v##*:})" = NewWorld ] ; then - if [ -f /usr/local/lib/yaboot/ofboot ] ; then - OFBOOT="\nmagicboot=/usr/local/lib/yaboot/ofboot" - elif [ -f /usr/lib/yaboot/ofboot ] ; then - OFBOOT="\nmagicboot=/usr/lib/yaboot/ofboot" - else - echo 1>&2 "$PRG: yaboot is not installed correctly" - exit 1 - fi -fi - -## check for properly (read debian) packaged yaboot. -if [ -d ${CHROOT}usr/share/doc/yaboot/examples ] ; then - HEADER="## see also: /usr/share/doc/yaboot/examples for example configurations.\n" -fi - -## setup append line -if [ -n "$KERNARGS" ] ; then - APPEND="\tappend=\"${KERNARGS}\"\n" -fi - -## setup any Mac OS/OS X partitions -dualboot -if [ -n "$MACOS" ] ; then - MACOSBOOT="macos=${MACOS}\n" -fi -if [ -n "OSX" ] ; then - OSXBOOT="macosx=${OSX}\n" -fi - - -## 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:-} -partition=$PARTITION -root=$ROOT -timeout=30 -delay=5 -install=${INSTALL}${OFBOOT:-}\n" - -## generate image= section -IMAGES=" -image=$IMAGE -\tlabel=Linux -\tread-only\n${APPEND:-}\n${OSXBOOT:-}\n${MACOSBOOT:-}" - -## safely create a tmp file then move it into place after we are sure -## it was written. -TMPCONF=`mktemp -q "${CHROOT}${CONFIG}.XXXXXX"` -if [ $? != 0 ] ; then - echo 1>&2 "$PRG: Unable to write to ${CHROOT}${CONFIG%/*}" - exit 1 -fi - -$PRINTF "${GLOBAL}${IMAGES}" > "$TMPCONF" -if [ $? != 0 ] ; then - echo 1>&2 "$PRG: Unable to write temporary file ${TMPCONF}, aborting..." - exit 1 -fi - -## rotate backups of /etc/yaboot.conf, 3 backups are kept -if [ -f "${CHROOT}${CONFIG}.old" ] ; then - for i in 1 0 ; do - if [ -f "${CHROOT}${CONFIG}.old.${i}" ] ; then - mv -f "${CHROOT}${CONFIG}.old.$i" "${CHROOT}${CONFIG}.old.$(($i + 1))" - if [ $? != 0 ] ; then - echo 1>&2 "$PRG: Unable to make backup of existing ${CHROOT}${CONFIG}.old.$i, aborting..." - exit 1 - fi - fi - done - - mv -f "${CHROOT}${CONFIG}.old" "${CHROOT}${CONFIG}.old.0" - if [ $? != 0 ] ; then - echo 1>&2 "$PRG: Unable to make backup of existing ${CHROOT}${CONFIG}.old, aborting..." - exit 1 - fi -fi - -## backup /etc/yaboot.conf -if [ -f "${CHROOT}${CONFIG}" ] ; then - mv -f "${CHROOT}${CONFIG}" "${CHROOT}${CONFIG}.old" - if [ $? != 0 ] ; then - echo 1>&2 "$PRG: Unable to make backup of existing ${CHROOT}${CONFIG}, aborting..." - exit 1 - fi -fi - -## move new config into place -mv -f "${TMPCONF}" "${CHROOT}${CONFIG}" -if [ $? != 0 ] ; then - echo "$PRG: Unable to write file ${CHROOT}${CONFIG}" - exit 1 -else - ## nothing sensitive in generated config, comply with debian policy - chmod 644 "${CHROOT}${CONFIG}" -fi - -## tell mkofboot where to find the config file if necessary -if [ "${CHROOT}${CONFIG}" != /etc/yaboot.conf ] ; then - YBINARGS="-C ${CHROOT}${CONFIG}" -fi - -## run mkofboot to install the bootstrap, unless --noinstall -if [ "$NOINSTALL" = 0 ] ; then - if (command -v mkofboot 2>&1 > /dev/null) ; then - [ "$QUIET" = 0 ] && echo "Running mkofboot to make the disk bootable..." - mkofboot -f $YBINARGS || exit 1 - [ "$QUIET" = 0 ] && echo "Done" - else - echo 1>&2 "$PRG: yaboot is not installed correctly, not running mkofboot" - exit 1 - fi -fi - -## Give user a warning about possible b0rkage - -[ "$QUIET" = 0 ] && echo -e "\nConfiguration complete. If there are no errors above you should -have a working configuration. see "man yaboot.conf" if you run into -any errors." - -exit 0 diff --git a/sys-boot/yaboot/files/yabootconfig-1.3.10.patch b/sys-boot/yaboot/files/yabootconfig-1.3.10.patch deleted file mode 100644 index a6824f524517..000000000000 --- a/sys-boot/yaboot/files/yabootconfig-1.3.10.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- ybin/yabootconfig.orig 2003-02-08 23:53:46.000000000 -0500 -+++ ybin/yabootconfig 2003-02-26 15:07:50.000000000 -0500 -@@ -4,6 +4,7 @@ - ## - ## yabootconfig generates a simple /etc/yaboot.conf - ## Copyright (C) 2001, 2002, 2003 Ethan Benson -+## Patched for Gentoo and dual boot - Mark Guertin - ## - ## This program is free software; you can redistribute it and/or - ## modify it under the terms of the GNU General Public License -@@ -264,6 +265,31 @@ - return 0 - } - -+dualboot() -+{ -+ DRIVELIST=`ls -d /dev/?d?* | grep "[sh]d[abcdefghijkl]" | cut -b 6-8 | sort -u` -+ -+ for i in $DRIVELIST -+ do -+ HFS=`mac-fdisk -l "/dev/$i" | grep '\' | grep -v "CDROM" | cut -d" " -f1` -+ for h in $HFS -+ do -+ if [ !-x `hpmount -r $h` > /dev/null 2>&1 ] ; then -+ if [ `hpls mach_kernel 2>/dev/null` ] ; then -+ [ "$QUIET" = 0 ] && echo "Found possible OS X/Darwin partition at $h" -+ OSX=$h -+ fi -+ if [ "`hpls "System Folder" 2>/dev/null`" ] ; then -+ [ "$QUIET" = 0 ] && echo "Found possible Mac OS partition at $h" -+ MACOS=$h -+ fi -+ hpumount $h > /dev/null 2>&1 -+ fi -+ done -+ done -+} -+ -+ - ########## - ## Main ## - ########## -@@ -579,6 +605,15 @@ - fi - fi - -+## setup any Mac OS/OS X partitions -+dualboot -+if [ -n "$MACOS" ] ; then -+ MACOSBOOT="macos=${MACOS}\n" -+fi -+if [ -n "$OSX" ] ; then -+ OSXBOOT="macosx=${OSX}\n" -+fi -+ - ## generate global section of yaboot.conf - GLOBAL="## yaboot.conf generated by $PRG $VERSION - ## -@@ -596,7 +631,7 @@ - IMAGES=" - image=$IMAGE - \tlabel=Linux --\tread-only\n${APPEND:-}" -+\tread-only\n${APPEND:-}\n${OSXBOOT:-}\n${MACOSBOOT:-}" - - ## safely create a tmp file then move it into place after we are sure - ## it was written. -@@ -667,4 +702,10 @@ - fi - fi - -+## Give user a warning about possible b0rkage -+ -+[ "$QUIET" = 0 ] && echo -e "\nConfiguration complete. If there are no errors above you should -+have a working configuration. see man yaboot.conf if you run into -+any errors." -+ - exit 0 diff --git a/sys-boot/yaboot/files/yabootconfig-1.3.11.patch b/sys-boot/yaboot/files/yabootconfig-1.3.11.patch deleted file mode 100644 index a6824f524517..000000000000 --- a/sys-boot/yaboot/files/yabootconfig-1.3.11.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- ybin/yabootconfig.orig 2003-02-08 23:53:46.000000000 -0500 -+++ ybin/yabootconfig 2003-02-26 15:07:50.000000000 -0500 -@@ -4,6 +4,7 @@ - ## - ## yabootconfig generates a simple /etc/yaboot.conf - ## Copyright (C) 2001, 2002, 2003 Ethan Benson -+## Patched for Gentoo and dual boot - Mark Guertin - ## - ## This program is free software; you can redistribute it and/or - ## modify it under the terms of the GNU General Public License -@@ -264,6 +265,31 @@ - return 0 - } - -+dualboot() -+{ -+ DRIVELIST=`ls -d /dev/?d?* | grep "[sh]d[abcdefghijkl]" | cut -b 6-8 | sort -u` -+ -+ for i in $DRIVELIST -+ do -+ HFS=`mac-fdisk -l "/dev/$i" | grep '\' | grep -v "CDROM" | cut -d" " -f1` -+ for h in $HFS -+ do -+ if [ !-x `hpmount -r $h` > /dev/null 2>&1 ] ; then -+ if [ `hpls mach_kernel 2>/dev/null` ] ; then -+ [ "$QUIET" = 0 ] && echo "Found possible OS X/Darwin partition at $h" -+ OSX=$h -+ fi -+ if [ "`hpls "System Folder" 2>/dev/null`" ] ; then -+ [ "$QUIET" = 0 ] && echo "Found possible Mac OS partition at $h" -+ MACOS=$h -+ fi -+ hpumount $h > /dev/null 2>&1 -+ fi -+ done -+ done -+} -+ -+ - ########## - ## Main ## - ########## -@@ -579,6 +605,15 @@ - fi - fi - -+## setup any Mac OS/OS X partitions -+dualboot -+if [ -n "$MACOS" ] ; then -+ MACOSBOOT="macos=${MACOS}\n" -+fi -+if [ -n "$OSX" ] ; then -+ OSXBOOT="macosx=${OSX}\n" -+fi -+ - ## generate global section of yaboot.conf - GLOBAL="## yaboot.conf generated by $PRG $VERSION - ## -@@ -596,7 +631,7 @@ - IMAGES=" - image=$IMAGE - \tlabel=Linux --\tread-only\n${APPEND:-}" -+\tread-only\n${APPEND:-}\n${OSXBOOT:-}\n${MACOSBOOT:-}" - - ## safely create a tmp file then move it into place after we are sure - ## it was written. -@@ -667,4 +702,10 @@ - fi - fi - -+## Give user a warning about possible b0rkage -+ -+[ "$QUIET" = 0 ] && echo -e "\nConfiguration complete. If there are no errors above you should -+have a working configuration. see man yaboot.conf if you run into -+any errors." -+ - exit 0 diff --git a/sys-boot/yaboot/files/yabootconfig-1.3.12.patch b/sys-boot/yaboot/files/yabootconfig-1.3.12.patch deleted file mode 100644 index a6824f524517..000000000000 --- a/sys-boot/yaboot/files/yabootconfig-1.3.12.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- ybin/yabootconfig.orig 2003-02-08 23:53:46.000000000 -0500 -+++ ybin/yabootconfig 2003-02-26 15:07:50.000000000 -0500 -@@ -4,6 +4,7 @@ - ## - ## yabootconfig generates a simple /etc/yaboot.conf - ## Copyright (C) 2001, 2002, 2003 Ethan Benson -+## Patched for Gentoo and dual boot - Mark Guertin - ## - ## This program is free software; you can redistribute it and/or - ## modify it under the terms of the GNU General Public License -@@ -264,6 +265,31 @@ - return 0 - } - -+dualboot() -+{ -+ DRIVELIST=`ls -d /dev/?d?* | grep "[sh]d[abcdefghijkl]" | cut -b 6-8 | sort -u` -+ -+ for i in $DRIVELIST -+ do -+ HFS=`mac-fdisk -l "/dev/$i" | grep '\' | grep -v "CDROM" | cut -d" " -f1` -+ for h in $HFS -+ do -+ if [ !-x `hpmount -r $h` > /dev/null 2>&1 ] ; then -+ if [ `hpls mach_kernel 2>/dev/null` ] ; then -+ [ "$QUIET" = 0 ] && echo "Found possible OS X/Darwin partition at $h" -+ OSX=$h -+ fi -+ if [ "`hpls "System Folder" 2>/dev/null`" ] ; then -+ [ "$QUIET" = 0 ] && echo "Found possible Mac OS partition at $h" -+ MACOS=$h -+ fi -+ hpumount $h > /dev/null 2>&1 -+ fi -+ done -+ done -+} -+ -+ - ########## - ## Main ## - ########## -@@ -579,6 +605,15 @@ - fi - fi - -+## setup any Mac OS/OS X partitions -+dualboot -+if [ -n "$MACOS" ] ; then -+ MACOSBOOT="macos=${MACOS}\n" -+fi -+if [ -n "$OSX" ] ; then -+ OSXBOOT="macosx=${OSX}\n" -+fi -+ - ## generate global section of yaboot.conf - GLOBAL="## yaboot.conf generated by $PRG $VERSION - ## -@@ -596,7 +631,7 @@ - IMAGES=" - image=$IMAGE - \tlabel=Linux --\tread-only\n${APPEND:-}" -+\tread-only\n${APPEND:-}\n${OSXBOOT:-}\n${MACOSBOOT:-}" - - ## safely create a tmp file then move it into place after we are sure - ## it was written. -@@ -667,4 +702,10 @@ - fi - fi - -+## Give user a warning about possible b0rkage -+ -+[ "$QUIET" = 0 ] && echo -e "\nConfiguration complete. If there are no errors above you should -+have a working configuration. see man yaboot.conf if you run into -+any errors." -+ - exit 0 diff --git a/sys-boot/yaboot/yaboot-1.3.11-r1.ebuild b/sys-boot/yaboot/yaboot-1.3.11-r1.ebuild deleted file mode 100644 index 8f24e512aee6..000000000000 --- a/sys-boot/yaboot/yaboot-1.3.11-r1.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/yaboot-1.3.11-r1.ebuild,v 1.9 2006/04/14 17:57:53 wormo Exp $ - -inherit eutils toolchain-funcs - -DESCRIPTION="PPC Bootloader" -SRC_URI="http://penguinppc.org/bootloaders/archived/yaboot/${P}.tar.gz" -HOMEPAGE="http://penguinppc.org/projects/yaboot/" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="-* ppc ppc64" -IUSE="" - -DEPEND="sys-apps/powerpc-utils - sys-fs/hfsutils - sys-fs/hfsplusutils" - -PROVIDE="virtual/bootloader" - -src_compile() { - export -n CFLAGS - export -n CXXFLAGS - [ -n "$(tc-getCC)" ] || CC="gcc" - # dual boot patch - epatch ${FILESDIR}/yabootconfig-${PV}.patch - epatch ${FILESDIR}/chrpfix.patch - #took from http://penguinppc.org/~eb/files/ofpath - epatch ${FILESDIR}/${P}-ofpath-fix.patch - emake PREFIX=/usr MANDIR=share/man CC="$(tc-getCC)" || die - -} - -src_install() { - cp etc/yaboot.conf etc/yaboot.conf.bak - sed -e 's/\/local//' etc/yaboot.conf >| etc/yaboot.conf.edit - mv -f etc/yaboot.conf.edit etc/yaboot.conf - make ROOT=${D} PREFIX=/usr MANDIR=share/man install || die -} diff --git a/sys-boot/yaboot/yaboot-1.3.12-r1.ebuild b/sys-boot/yaboot/yaboot-1.3.12-r1.ebuild deleted file mode 100644 index 3f83a12512f1..000000000000 --- a/sys-boot/yaboot/yaboot-1.3.12-r1.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/yaboot-1.3.12-r1.ebuild,v 1.12 2006/04/14 17:57:53 wormo Exp $ - -inherit eutils toolchain-funcs - -DESCRIPTION="PPC Bootloader" -SRC_URI="http://penguinppc.org/bootloaders/archived/yaboot/${P}.tar.gz" -HOMEPAGE="http://penguinppc.org/projects/yaboot/" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="-* ppc ppc64" -IUSE="" - -DEPEND="sys-apps/powerpc-utils - sys-fs/hfsutils - sys-fs/hfsplusutils" - -PROVIDE="virtual/bootloader" - -src_compile() { - export -n CFLAGS - export -n CXXFLAGS - [ -n "$(tc-getCC)" ] || CC="gcc" - # dual boot patch - epatch ${FILESDIR}/yabootconfig-${PV}.patch - epatch ${FILESDIR}/chrpfix.patch - epatch ${FILESDIR}/yaboot-3.4.patch - epatch ${FILESDIR}/yaboot-1.3.12-k2sata-ofpath.patch - emake PREFIX=/usr MANDIR=share/man CC="$(tc-getCC)" || die -} - -src_install() { - cp etc/yaboot.conf etc/yaboot.conf.bak - sed -e 's/\/local//' etc/yaboot.conf >| etc/yaboot.conf.edit - mv -f etc/yaboot.conf.edit etc/yaboot.conf - make ROOT=${D} PREFIX=/usr MANDIR=share/man install || die -} - -pkg_postinst() { - ewarn "Please note if you are running a 2.6 kernel the version" - ewarn "of ofpath included in this revision of yaboot requires" - ewarn "that you run a kernel >= 2.6.3 Prior versions are unsupported." -} diff --git a/sys-boot/yaboot/yaboot-1.3.13-r1.ebuild b/sys-boot/yaboot/yaboot-1.3.13-r1.ebuild deleted file mode 100644 index cdec644c3eed..000000000000 --- a/sys-boot/yaboot/yaboot-1.3.13-r1.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/yaboot-1.3.13-r1.ebuild,v 1.3 2006/04/14 17:57:53 wormo Exp $ - -inherit eutils toolchain-funcs - -DESCRIPTION="PPC Bootloader" -SRC_URI="http://penguinppc.org/bootloaders/yaboot/${P}.tar.gz" -HOMEPAGE="http://penguinppc.org/projects/yaboot/" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="-* ppc -ppc64" -IUSE="ibm" - -DEPEND="sys-apps/powerpc-utils" -RDEPEND="!ibm? ( sys-fs/hfsutils ) - !ibm? ( sys-fs/hfsplusutils )" - -PROVIDE="virtual/bootloader" - -src_compile() { - export -n CFLAGS - export -n CXXFLAGS - [ -n "$(tc-getCC)" ] || CC="gcc" - # dual boot patch - epatch ${FILESDIR}/yabootconfig-${PV}.patch - epatch ${FILESDIR}/chrpfix.patch - epatch ${FILESDIR}/yaboot-3.4.patch - epatch ${FILESDIR}/yaboot-${PV}-ofpath.patch - epatch ${FILESDIR}/yaboot-nopiessp.patch - epatch ${FILESDIR}/yaboot-ofpath-device-tree.patch - emake PREFIX=/usr MANDIR=share/man CC="$(tc-getCC)" || die -} - -src_install() { - cp etc/yaboot.conf etc/yaboot.conf.bak - sed -e 's/\/local//' etc/yaboot.conf >| etc/yaboot.conf.edit - mv -f etc/yaboot.conf.edit etc/yaboot.conf - make ROOT=${D} PREFIX=/usr MANDIR=share/man install || die -} - -pkg_postinst() { - ewarn "Please note if you are running a 2.6 kernel the version" - ewarn "of ofpath included in this revision of yaboot requires" - ewarn "that you run a kernel >= 2.6.3, prior versions are unsupported." -} diff --git a/sys-boot/yaboot/yaboot-1.3.13.ebuild b/sys-boot/yaboot/yaboot-1.3.13.ebuild deleted file mode 100644 index 1fc910700cd8..000000000000 --- a/sys-boot/yaboot/yaboot-1.3.13.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/yaboot-1.3.13.ebuild,v 1.9 2006/04/14 17:57:53 wormo Exp $ - -inherit eutils toolchain-funcs - -DESCRIPTION="PPC Bootloader" -SRC_URI="http://penguinppc.org/bootloaders/yaboot/${P}.tar.gz" -HOMEPAGE="http://penguinppc.org/projects/yaboot/" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="-* ppc -ppc64" -IUSE="ibm" - -DEPEND="sys-apps/powerpc-utils" -RDEPEND="!ibm? ( sys-fs/hfsutils ) - !ibm? ( sys-fs/hfsplusutils )" - -PROVIDE="virtual/bootloader" - -src_compile() { - export -n CFLAGS - export -n CXXFLAGS - [ -n "$(tc-getCC)" ] || CC="gcc" - # dual boot patch - epatch ${FILESDIR}/yabootconfig-${PV}.patch - epatch ${FILESDIR}/chrpfix.patch - epatch ${FILESDIR}/yaboot-3.4.patch - epatch ${FILESDIR}/yaboot-${PV}-ofpath.patch - epatch ${FILESDIR}/yaboot-nopiessp.patch - emake PREFIX=/usr MANDIR=share/man CC="$(tc-getCC)" || die -} - -src_install() { - cp etc/yaboot.conf etc/yaboot.conf.bak - sed -e 's/\/local//' etc/yaboot.conf >| etc/yaboot.conf.edit - mv -f etc/yaboot.conf.edit etc/yaboot.conf - make ROOT=${D} PREFIX=/usr MANDIR=share/man install || die -} - -pkg_postinst() { - ewarn "Please note if you are running a 2.6 kernel the version" - ewarn "of ofpath included in this revision of yaboot requires" - ewarn "that you run a kernel >= 2.6.3, prior versions are unsupported." -} diff --git a/sys-boot/yaboot/yaboot-1.3.14.ebuild b/sys-boot/yaboot/yaboot-1.3.14.ebuild new file mode 100644 index 000000000000..70217e6f7eb9 --- /dev/null +++ b/sys-boot/yaboot/yaboot-1.3.14.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/yaboot-1.3.14.ebuild,v 1.1 2007/09/06 21:18:04 josejx Exp $ + +inherit eutils toolchain-funcs + +DESCRIPTION="PPC Bootloader" +SRC_URI="http://yaboot.ozlabs.org/releases/${P}.tar.gz" +HOMEPAGE="http://yaboot.ozlabs.org" +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="-* ~ppc -ppc64" +IUSE="ibm" + +DEPEND="sys-apps/powerpc-utils" +RDEPEND="!ibm? ( sys-fs/hfsutils ) + !ibm? ( sys-fs/hfsplusutils )" + +PROVIDE="virtual/bootloader" + +src_compile() { + export -n CFLAGS + export -n CXXFLAGS + [ -n "$(tc-getCC)" ] || CC="gcc" + # dual boot patch + epatch "${FILESDIR}/yabootconfig-1.3.13.patch" + epatch "${FILESDIR}/chrpfix.patch" + epatch "${FILESDIR}/yaboot-nopiessp.patch" + emake PREFIX=/usr MANDIR=share/man CC="$(tc-getCC)" || die +} + +src_install() { + cp etc/yaboot.conf etc/yaboot.conf.bak + sed -e 's/\/local//' etc/yaboot.conf >| etc/yaboot.conf.edit + mv -f etc/yaboot.conf.edit etc/yaboot.conf + make ROOT=${D} PREFIX=/usr MANDIR=share/man install || die +} -- cgit v1.2.3-65-gdbad