Compare commits

...
Sign in to create a new pull request.

46 commits

Author SHA1 Message Date
Till Maas
12fa183e80 2014-06-02: ppc32 package, ppc32 support is dropped in Fedora 21 2014-06-02 20:55:10 +02:00
Dennis Gilmore
54ff840af0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-04 04:25:45 -05:00
Dennis Gilmore
1038948f76 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-14 22:08:02 -06:00
Tony Breeds
d96847345f More e2fsprogs compatability.
The e2fsprogs in f18/rawhide is newer than f17 (duh!) so it needs more
stub functions to link.

This isn't in upstream yet but it will be "RSN".

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2012-09-05 15:10:59 +10:00
Tony Breeds
850985283e Merge branch 'f17'
Conflicts:
	yaboot.spec
2012-09-05 11:15:18 +10:00
Tony Breeds
b275d8e0b7 Update to link with newer e2fsprogs.
The good news is that e2fsprogs 1.43 (I think)  will have configure
options to remove the need for most of these.  Once 1.43 is available as
an RC we can look at how to integrate that in Fedora.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2012-09-05 11:10:08 +10:00
Dennis Gilmore
52acfa14b2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-22 02:30:12 -05:00
Dennis Gilmore
adb2d133d4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-14 03:23:07 -06:00
Tony Breeds
15ed53c8e0 Fix fs_swap to not break DVD boots.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2011-10-19 13:51:41 +11:00
Tony Breeds
6c095a99ca Disable Werror for the near future.
Do not use Werror, the compiler in F16/Rawhide is hitting warnings that
Upstream doesn't see.  Bypass them for now.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2011-10-18 17:22:02 +11:00
Tony Breeds
a55381a683 Update to new upstream release yaboot-1.3.17
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2011-10-18 16:19:58 +11:00
Jiri Skala
75645bf8d2 fixes #746408 - yaboot discards parameters after CAS reboot 2011-10-17 22:41:24 +02:00
Tony Breeds
56d90079a4 Add support for PowerVM and add no-strict-aliasing to YBCFLAGS
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2011-09-26 15:16:04 +10:00
Tony Breeds
934bf6ca3d Force the linker to use elf32
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2011-08-31 15:28:36 +10:00
Tony Breeds
fe26fbee33 Truncate memcpy() in extract_vendor_options()
Backport patch from 1.3.17-rc1 which will stop stack smash.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2011-08-11 10:48:02 +10:00
Karsten Hopp
f9545f5c3c Add fix from Tony Breeds for failing to link against posix_memalign() (closes 689415) 2011-04-12 16:46:13 +02:00
Dennis Gilmore
7c557ad735 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-08 01:15:01 -06:00
Tony Breeds
3bae39f0bd Add yaboot-1.3.16.tar.gz
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2010-08-02 11:01:09 +10:00
Fedora Release Engineering
c416dbbf7f dist-git conversion 2010-07-29 16:18:05 +00:00
Roman Rakus
3fefbde3e3 Update to 1.3.16 version 2010-07-19 11:57:07 +00:00
Roman Rakus
5388f83ed2 added dependency on e2fsprogs-static package 2010-06-03 15:14:05 +00:00
Roman Rakus
fbe565583d Allow yaboot to allocate up to 256MB of memory 2010-05-26 15:37:47 +00:00
Roman Rakus
be1a5059a9 Include missing pacthes 2010-05-26 15:31:33 +00:00
Roman Rakus
faf5395bdb SHA2 support 2010-01-22 15:48:28 +00:00
Bill Nottingham
76bc8b3f41 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:39:34 +00:00
Roman Rakus
09042cce68 When netbooting "clobber" the LOAD_BUFFER and move the kernel into it to
make room for RTAS (#530330) Adding better netboot support more work on
    (#458438)
2009-10-29 12:20:12 +00:00
Roman Rakus
87e5af631b Only require hfsutils on fedora and rhel <= 5 Explicitly build a DEBUG=1
version of yaboot to aid in debugging Calling of_open() on a
    LINUX_NATIVE parttions seesm to work but end up with a garbage file.
    Add check to of_open to skip these parttions (#526021).
2009-10-19 12:44:27 +00:00
Roman Rakus
8e34c7d231 Increase TFTP buffer to 32MB 2009-09-24 12:16:42 +00:00
Roman Rakus
43721b6e6a Fixed check for RHEL6 2009-09-09 17:45:06 +00:00
Roman Rakus
5197e942ff Do not require hfsutils on RHEL 6 2009-09-09 15:55:37 +00:00
Roman Rakus
33c2ea3b3e Use only yaboot-1.3.14 source tarball 2009-08-14 14:07:35 +00:00
Roman Rakus
f1b0f3ab06 ipv6 support, don't do debuginfo rpm 2009-08-14 13:55:37 +00:00
Bill Nottingham
46025e69e3 mkofboot is a symlink in the source tree. patching it does not do what we
want.
2009-08-07 20:27:51 +00:00
Roman Rakus
7ee6e263ab Fix bad return code in verbose mode (#515555) 2009-08-07 16:31:28 +00:00
Jesse Keating
828ada572e - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-27 08:50:50 +00:00
David Woodhouse
6c9e5ac4bc remove birecs 2009-06-07 08:04:45 +00:00
Tony Breeds
a0628ea14c Increase the LOAD_BUFFER size from 20MiB to 25MiB. This allows the
F-11-Beta to boot.
2009-04-06 05:51:50 +00:00
Tony Breeds
da55ca6aec - Adding better netboot support (#458438)
- Allocate more buffer space for larger kernels and initrds (#472225)
2009-03-13 00:32:03 +00:00
Jesse Keating
d1ea1773fa - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-25 18:00:01 +00:00
jwboyer
5b9fcec782 - Add patch to handle relocatable kernels 2009-01-22 18:33:36 +00:00
Roman Rakus
1113166e05 Release bump because of preupgrade. 2008-11-27 15:38:18 +00:00
David Woodhouse
02cc5413a7 fix bootonce, MAX_TOKEN 2008-11-21 17:08:23 +00:00
Roman Rakus
1887cffab2 Changed kernel load base address. Resolves: #468492 2008-11-05 12:46:07 +00:00
Roman Rakus
013cdb15fe Commiting fixed patches. 2008-08-11 09:45:29 +00:00
Roman Rakus
8b3a6c5f35 Cleared specfile cvs of unsused patches. Patches fixed for fuzz=0 2008-08-11 08:56:27 +00:00
Tom Callaway
08882edc9f fix license tag 2008-05-28 21:24:20 +00:00
44 changed files with 1 additions and 3687 deletions

View file

@ -1,3 +0,0 @@
yaboot-1.3.12.tar.gz
yaboot-1.3.13.tar.gz
yaboot-1.3.14.tar.gz

View file

@ -1,22 +0,0 @@
# Makefile for source rpm: yaboot
# $Id: Makefile,v 1.2 2004/09/18 08:21:27 pnasrat Exp $
NAME := yaboot
SPECFILE = $(firstword $(wildcard *.spec))
UPSTREAM_CHECKS = sig
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

1
dead.package Normal file
View file

@ -0,0 +1 @@
2014-06-02: ppc32 package, ppc32 support is dropped in Fedora 21

View file

@ -1,336 +0,0 @@
\ FORTH
." Efika 5200B Device Tree Supplement 20071114" cr
." (c) 2007 Genesi USA, Inc." cr
." http://www.powerdeveloper.org/ for support" cr cr
\ headerless
s" /openprom" find-device
d# 20071114 encode-int s" device-tree-version" property
device-end
s" /builtin/ata" find-device
s" mpc5200-ata" encode-string
s" mpc5200b-ata" encode-string encode+
s" compatible" property
device-end
s" /builtin/sound" find-device
s" mpc5200-psc-ac97" encode-string
s" mpc5200b-psc-ac97" encode-string encode+
s" compatible" property
0x2 encode-int
0x2 encode-int encode+
0x3 encode-int encode+
s" interrupts" property
\ Audio is on PSC2, just for informational purposes
1 encode-int s" cell-index" property
device-end
\ Quick test to see if AC97 is enabled
0xf0000b00 dup dup l@ 0x20 and
0= if
." Enabling AC97" cr
dup l@ 0x20 or
swap l!
else
drop
then
\ SRAM compatibles
s" /builtin/sram" find-device
s" mpc5200-sram" encode-string
s" mpc5200b-sram" encode-string encode+
s" compatible" property
s" sram" device-type \ this is a contentious one
device-end
\ PIC compatibles
s" /builtin/pic" find-device
s" mpc5200-pic" encode-string
s" mpc5200b-pic" encode-string encode+
s" compatible" property
device-end
\ Serial compatibles. Also fix cell-index and port-number as per bindings
s" /builtin/serial" find-device
s" mpc5200-psc-uart" encode-string
s" mpc5200b-psc-uart" encode-string encode+
s" compatible" property
\ Serial port is PSC1 for informational purposes, Linux 0-indexes it
0 encode-int s" cell-index" property
\ Since this is the main, always there, preferred serial port..
0 encode-int s" port-number" property
device-end
\ Ethernet compatibles
s" /builtin/ethernet" find-device
s" mpc5200-fec" encode-string
s" mpc5200b-fec" encode-string encode+
s" compatible" property
device-end
\ BestComm compatibles, interrupt mess
s" /builtin/bestcomm" find-device
s" mpc5200-bestcomm" encode-string
s" mpc5200b-bestcomm" encode-string
encode+
s" compatible" property
\ make 16 interrupt property in a batch. We have to do the first one by
\ hand simply because of the way encode+ works.
0x3 encode-int 0x0 encode-int 0x3 encode-int encode+ encode+
0x10 1 do
0x3 encode-int encode+ i encode-int encode+ 0x3 encode-int encode+
loop
\ now we can store the damn thing
s" interrupts" property
device-end
\ New USB binding - change one of the numbers here to disable it for older kernels
\ as this is a destructive change
0 1 = if
s" /builtin/usb" find-device
s" usb-ohci" device-type
s" " encode-string s" big-endian" property
s" mpc5200-ohci" encode-string
s" mpc5200-usb-ohci" encode-string encode+
s" compatible" property
device-end
then
\ Go into the root node and kill off any mention of CHRP
s" /" find-device
s" efika" device-type
s" Efika 5200B" encode-string s" CODEGEN,board" property
s" Efika 5200B PowerPC System" encode-string s" CODEGEN,description" property
device-end
\ Fix the /builtin device-type for Linux
s" /builtin" find-device
s" soc" device-type
device-end
\ ADDING NEW ENTRIES TO THE DEVICE TREE
\
\ Clock Distribution Module - need this to change baud rates etc. and turn off
\ clocks for power management. Useful little thing. Needs an entry to find the
\ address without guessing (in case they change it in the 512X)
\ Clock Distribution Module
." Adding Clock Distribution Module" cr
s" /builtin" find-device
new-device
" cdm" 2dup device-name device-type
" MPC52xx Clock Distribution Module" encode-string " .description" property
0xf0000200 0x38 reg
" mpc5200-cdm" encode-string
" mpc5200b-cdm" encode-string
encode+
" compatible" property
finish-device
\ GPIO (Simple) Module
." Adding Simple GPIO Module" cr
s" /builtin" find-device
new-device
s" gpio" 2dup device-name device-type
s" MPC52xx Simple GPIO" encode-string s" .description" property
0xf0000b00 0x40 reg
s" mpc5200-gpio" encode-string
s" mpc5200b-gpio" encode-string encode+
s" compatible" property
0x10000000 encode-int s" gpio-mask" property
0x1 encode-int
0x7 encode-int
0x3 encode-int
encode+ encode+
s" interrupts" property
finish-device
\ GPIO (Wakeup) Module
." Adding Wakeup GPIO Module" cr
s" /builtin" find-device
new-device
s" gpio-wkup" 2dup device-name device-type
s" MPC52xx Wakeup GPIO" encode-string s" .description" property
0xf0000c00 0x28 reg
s" mpc5200-gpio-wkup" encode-string
s" mpc5200b-gpio-wkup" encode-string
encode+
s" compatible" property
0x30000000 encode-int s" gpio-mask" property
0x1 encode-int
0x8 encode-int encode+
0x3 encode-int encode+
0x1 encode-int encode+
0x3 encode-int encode+
0x3 encode-int encode+
s" interrupts" property
finish-device
\
\ High resolution (General Purpose and Slice) Timers
\
\ We ignore slice timer 0 since critical interrupt handling in Linux
\ is curiously missing
." Adding Slice Timer 1" cr
s" /builtin" find-device
new-device
s" slt" 2dup device-name device-type
s" MPC52xx Slice Timer 1" encode-string " .description" property
0xf0000710 0x10 reg
s" mpc5200-slt" encode-string
s" mpc5200b-slt" encode-string
encode+
s" compatible" property
1 encode-int " cell-index" property
\ The interrupt listed here is probably wrong
0x1 encode-int
0x0 encode-int encode+
0x3 encode-int encode+
s" interrupts" property
finish-device
\ Add all the GPTs to the device-tree
\ : gpt-add ( gpt-id -- )
\ depth
\ 1 > if
8 0 do i
dup 7 <= if
dup
0x9 +
swap dup
0x10 *
0xf0000600 +
swap dup
." Adding General Purpose Timer " .d cr
s" /builtin" find-device
new-device
s" gpt" 2dup device-name device-type
swap 0x10 reg
encode-int s" cell-index" property
s" MPC52xx General Purpose Timer X"
2dup + 1 - \ get the character position of the X
0x30 i + swap c! \ store ascii character of timer number
encode-string s" .description" property
s" mpc5200-gpt" encode-string
s" mpc5200b-gpt" encode-string encode+
s" fsl,mpc5200-gpt" encode-string encode+
s" fsl,mpc5200b-gpt" encode-string encode+
s" compatible" property
0x1 encode-int
2 pick encode-int encode+
0x3 encode-int encode+
s" interrupts" property
finish-device
then
loop
\ then
\ ;
\ Add watchdog marker to GPT0
s" /builtin/gpt@f0000600" find-device
s" " encode-string s" has-wdt" property
s" " encode-string s" fsl,has-wdt" property
device-end
\ PHY for ethernet. Thanks to Domen Puncer for this.
." Adding Ethernet PHY" cr
s" /builtin" find-device
new-device
1 encode-int s" #address-cells" property
0 encode-int s" #size-cells" property
s" mdio" 2dup device-name device-type
s" mpc5200b-fec-phy" encode-string s" compatible" property
0xf0003000 0x400 reg
0x2 encode-int
0x5 encode-int encode+
0x3 encode-int encode+
s" interrupts" property
new-device
s" ethernet-phy" 2dup device-name device-type
0x10 encode-int s" reg" property
my-self \ save our phandle to stack
ihandle>phandle
finish-device
finish-device
s" /builtin/ethernet" find-device
encode-int \ phy's phandle
s" phy-handle" property
device-end
\
\ HERE BE DRAGONS
\ SDRAM Controller (needed to enter deep sleep and turn off RAM clocks)
." Adding SDRAM Controller" cr
s" /builtin" find-device
new-device
s" sdram" device-name
s" memory-controller" device-type
0xf0000100 0x10 reg
s" MPC52xx SDRAM Memory Controller" encode-string s" .description" property
s" mpc5200b-sdram" encode-string
s" mpc5200-sdram" encode-string encode+
s" compatible" property
finish-device
\ XLB Arbiter (pipeline/bestcomm stuff enabled here)
." Adding XLB Arbiter" cr
s" /builtin" find-device
new-device
s" xlb" 2dup device-name device-type
0xf0001f00 0x100 reg
s" MPC52xx XLB Arbiter" encode-string s" .description" property
s" mpc5200-xlb" encode-string
s" mpc5200b-xlb" encode-string encode+
s" compatible" property
finish-device
\ Optionally uncomment and boot your Linux
\ s" hd:0 vmlinuz console= blah=" $boot

View file

@ -1,3 +0,0 @@
http://penguinppc.org/projects/yaboot/
http://penguinppc.org/~eb/yaboot-archived/
http://penguinppc.org/~eb/yaboot-archived/yaboot.old/

View file

@ -1,3 +0,0 @@
85cf685c1dc5873c2a5124ba4524b2d2 yaboot-1.3.12.tar.gz
f12798d1b2063f21d07e0ae7f602ccaf yaboot-1.3.13.tar.gz
dd346812667ab3818248c9784fe8e38e yaboot-1.3.14.tar.gz

View file

@ -1 +0,0 @@
yaboot-1.3.12.tar.gz

View file

@ -1,37 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.4 (GNU/Linux)
mQGiBDidlFMRBADZNm3oi7R/lCOxxi5+n1O8A3CXrDKWpkYY0F1TL9dxCLg8q/Lm
uxl0up5i8PjSPBh+h8wQTSB6Yzyv0TMOobXqhKWqD9RauUZW9e3DuMcePldjgHNt
IojqREtcPrLlVzb0yA/BdNFH0JbapzvwR+LWqu6X3ybsIRs/fmy3sanLCwCgoiTg
RvVlbnwyYkJ8cgfFSso1pS0D/iAQqt44GNL+TRSMantYEWQKsBeeYe/9SmJRs+4x
OQlr5Gm8uqaSqjepytfoS435bG7ITJTjquwnKy4eR046KltSsW8vtXwuV8JhZpmm
dXsNrXFalIkToTuTWXEXSuJ/A0ZPnKlGbaVUowKQZlLXCfqBNEWMb+rtpVrosBZr
Odp2A/9ZXOAYP3uC07X8LjX9K6a6EBIlHC/Y65r48RCDLY2N3Surk1PfvpWjKyU+
ZgI7r3QbIQMMZJkC+Ijw0MSLlP5NnZ4HJb90B6I2X0Qv8dLIEBltYlpgGk6/6Na9
r5N6xT87BBfIopab/QJEIGihgJnuo/fRiG1rCGUGztpjgkRsu7QjRXRoYW4gUi4g
QmVuc29uIDxlYkBwZW5ndWlucHBjLm9yZz6IYwQTEQIAGwIXgAUCQBSuywYLCQgH
AwIDFQIDAxYCAQIeAQASB2VHUEcAAQEJECSsexosRHr8/4kAn2FFW2AeANPsSPYZ
JzWgu7MGcc06AKCVKhUz/xlf4x5QpCJZyNJBYIExc7QlRXRoYW4gUi4gQmVuc29u
IDxlcmJlbnNvbkBhbGFza2EubmV0PohmBBMRAgAeAheABgsJCAcDAgMVAgMDFgIB
Ah4BBQJAFK7gAhkBABIHZUdQRwABAQkQJKx7GixEevxFWwCgnxGwZ5JWyAGE7oWo
S4KmYGeErFEAn3Re5SCCw8rpfZaqsSON6QQ5Qf8viEYEEBECAAYFAjkHScMACgkQ
v+EgZWshSJoU4gCfVe42kGRNpXfrVJ9l3yvvtS7wfasAoLMdZqVwnxphz6b4iHK+
KM3fCvfYiEYEEBECAAYFAjm5+d4ACgkQ6yQBygtWtRjpgwCfUEsZm2SKBrPiAltJ
tdFTVEaUrr8An0MmUqN3v6YyfrhVJdr0Oiu/pJApiEYEEBECAAYFAjmZNY8ACgkQ
TCUti147Jd+a7QCfQwK6OMe8b9XOH7O8Vk2CZVIYTogAn3+ABor7DStEYbf+Sfu5
jzllBpq9uQINBDidlZsQCACStwLYiAutk+4HJ3sID4tgdD225V2Hj7dQkiz+Pb55
lk1I3M2CEXkEBDKATRhlGXGDBvriskIRLfD0wmk6fW82Hyp2JfJ/I239L6emZB11
1LYU9BLeXdInntJeSGVpIbcf0cWwhFV15w0aoogVlUV1nDra3VBHYnxEU/vKAQfr
Htc1AFfD+UCRxu8OOvmro/7V1dwUyx0wF+3w475MK9rfXzVINLuwMxSGO2HgorU2
ZfpszTP+XEdoH6DTuQbj4b4mshWUIcwx3e8UznXFy8yfXsN1WhsDmDYBBEfxyiMs
H6zXBzwTBmCIztsKSQQaWk8MPmpaDkq7X0n66hqu0cznAAMFCACMpBzDzTV1ohRk
F9XbQ7TJqBI/5FpiKrzOabBkiRmXvFV1LKSVQ2J1VO27Cbrk0QGGwCT3Xp64vtzL
VR1r0h63FUkiatIAtRqkVsMovIW4tCqJfMz14/P2zIaaCv3y5hxqt1i3oOKFvZQX
SYOjZ07ic3SyowjNbI41s6YxBkzrzuhicSIyyoFL6tjR5GAJiL/yFmqsVgid6NVG
TVKX4HTG8lrwTcdVUWt/kO+VSJSM8Vc6uXD1XxQ7UEGF+GTwyTnyT5BgvjzQc7ER
KAT/z/aN0f368I9v+qTRoDbixzVo4XMXr2E+5kTcibJgLc8E3AzZl2Rml0rq5mGv
z1A8moxxiE4EGBECAAYFAjidlZsAEgkQJKx7GixEevwHZUdQRwABAZMcAKCUUpdW
5pH6MHrz+X+FxuHswIIqIQCgoQQK1sBh8lmIIK4ESlwg/xYoAsk=
=AFhg
-----END PGP PUBLIC KEY BLOCK-----

View file

@ -1,27 +0,0 @@
--- yaboot-1.3.10/ybin/yabootconfig.configfile 2003-06-19 17:33:50.000000000 -0400
+++ yaboot-1.3.10/ybin/yabootconfig 2003-06-19 17:39:26.000000000 -0400
@@ -103,6 +103,7 @@
default: determined from {chroot}/etc/fstab
-b, --boot set bootstrap partition, Example: /dev/hda2
default: first type: Apple_Bootstrap partition
+ -C, --config set config file name (Example: /etc/yaboot.conf)
--kernel-args add an append= line with specified arguments
-q, --quiet don't ask any questions/confirmation
--noinstall don't automatically run mkofboot
@@ -330,6 +331,16 @@
exit 1
fi
;;
+ -C|--config)
+ if [ -n "$2" ]; then
+ CONFIG="$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

View file

@ -1,11 +0,0 @@
--- yaboot-1.3.10/second/fs_ext2.c.ext3 2003-04-09 21:38:48.000000000 -0400
+++ yaboot-1.3.10/second/fs_ext2.c 2003-04-09 21:40:32.000000000 -0400
@@ -176,7 +176,7 @@
ofopened = 1;
/* Open the ext2 filesystem */
- result = ext2fs_open (buffer, EXT2_FLAG_RW, 0, 0, linux_io_manager, &fs);
+ result = ext2fs_open (buffer, EXT2_FLAG_DIRTY, 0, 0, linux_io_manager, &fs);
if (result) {
if(result == EXT2_ET_BAD_MAGIC)

View file

@ -1,29 +0,0 @@
--- yaboot-1.3.10/ybin/yabootconfig~ 2004-04-20 16:20:13.619375616 -0400
+++ yaboot-1.3.10/ybin/yabootconfig 2004-04-20 16:32:40.519829488 -0400
@@ -160,6 +160,8 @@
FDISK=mac-fdisk
elif (command -v pdisk > /dev/null 2>&1) ; then
FDISK=pdisk
+ elif (command -v parted > /dev/null 2>&1) ; then
+ FDISK=parted
else
echo 1>&2 "$PRG: Unable to locate mac-fdisk"
return 1
@@ -209,9 +211,16 @@
BOOT="${DISK}${BOOT}"
fi
debug "BOOT after fixup: $BOOT\n"
- else
+ elif [ "$FDISK" = mac-fdisk ] ; then
BOOT="$(v=`$FDISK -l "$DISK" 2>/dev/null | grep '\<Apple_Bootstrap\>'` ; echo ${v%%[ ]*})"
debug "BOOT=$BOOT\n"
+ else
+ BOOT="$(v=`$FDISK "$DISK" print 2>/dev/null | grep 'bootstrap'` ; echo ${v%%[ ]*})"
+ debug "BOOT before fixup: $BOOT\n"
+ if [ -n "$BOOT" ] ; then
+ BOOT="${DISK}${BOOT}"
+ fi
+ debug "BOOT after fixup: $BOOT\n"
fi
if [ -z "$BOOT" ] ; then
echo 1>&2 "$PRG: Unable to locate bootstrap partition on $DISK..."

View file

@ -1,59 +0,0 @@
--- yaboot-1.3.10/first/ofboot.name 2003-04-09 21:29:29.000000000 -0400
+++ yaboot-1.3.10/first/ofboot 2003-04-09 21:29:55.000000000 -0400
@@ -86,6 +86,13 @@
MENU=1
fi
+if [ -f /etc/redhat-release ]; then
+ PRODUCT=`sed "s/ release.*//g" /etc/redhat-release`
+else
+ PRODUCT="PowerPC GNU/Linux"
+fi
+
+
## create the variables.
##
## OSNAME="$1"
@@ -102,7 +109,7 @@
[ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file1: $5\n"
[ "$COUNT" = "$OSNUM" ] && c="."
BTYA=": boot$1 \" Loading second stage bootstrap...\" .printf 100 ms load-base release-load-area \" ${4}${5}\" \$boot ;"
- MENUYA="\" Press $3 for Red Hat Linux${c-,}\"(0d 0a)\" .printf"
+ MENUYA="\" Press $3 for $PRODUCT${c-,}\"(0d 0a)\" .printf"
GETYA=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof"
shift 5
COUNT="$(($COUNT + 1))"
@@ -315,7 +322,7 @@
MacRISC MacRISC3
</COMPATIBLE>
<DESCRIPTION>
-Red Hat Linux First Stage Bootstrap
+$PRODUCT First Stage Bootstrap
</DESCRIPTION>
<BOOT-SCRIPT>
: .printf fb8-write drop ;
@@ -336,7 +343,7 @@
$BGCOLOR to background-color
\" \"(0C)\" .printf
-\" First Stage Red Hat Linux Bootstrap\"(0d 0a)\" .printf
+\" First Stage $PRODUCT Bootstrap\"(0d 0a)\" .printf
\" \"(0d 0a)\" .printf
$MENUOPTS
\" \"(0d 0a)\" .printf
--- yaboot-1.3.10/ybin/yabootconfig.name 2003-04-09 21:24:20.000000000 -0400
+++ yaboot-1.3.10/ybin/yabootconfig 2003-04-09 21:27:07.000000000 -0400
@@ -700,7 +700,12 @@
fi
fi
-MESG='"Welcome to Red Hat Linux!\\nHit <TAB> for boot options.\\n\\n"'
+if [ -f /etc/redhat-release ]; then
+ PRODUCT=`sed "s/ release.*//g" /etc/redhat-release`
+else
+ PRODUCT="PowerPC GNU/Linux"
+fi
+MESG="\"Welcome to $PRODUCT!\\nHit <TAB> for boot options.\\n\\n\""
## generate global section of yaboot.conf
GLOBAL="boot=${BOOT}${DEVICE:-}

View file

@ -1,51 +0,0 @@
--- yaboot-1.3.10/Makefile.sbindir 2003-04-28 18:14:43.000000000 -0400
+++ yaboot-1.3.10/Makefile 2003-04-28 18:15:44.000000000 -0400
@@ -9,6 +9,7 @@
ROOT =
PREFIX = usr/local
MANDIR = man
+SBINDIR= ${PREFIX}/sbin
# command used to get root (needed for tarball creation)
GETROOT = fakeroot
@@ -179,7 +180,7 @@
install: all strip
install -d -m 0755 ${ROOT}/etc/
- install -d -m 0755 ${ROOT}/${PREFIX}/sbin/
+ install -d -m 0755 ${ROOT}/${SBINDIR}
install -d -m 0755 ${ROOT}/${PREFIX}/lib
install -d -m 0755 ${ROOT}/${PREFIX}/lib/yaboot
install -d -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man5/
@@ -187,11 +188,11 @@
install -m 0644 second/yaboot ${ROOT}/$(PREFIX)/lib/yaboot
install -m 0755 util/addnote ${ROOT}/${PREFIX}/lib/yaboot/addnote
install -m 0644 first/ofboot ${ROOT}/${PREFIX}/lib/yaboot/ofboot
- install -m 0755 ybin/ofpath ${ROOT}/${PREFIX}/sbin/ofpath
- install -m 0755 ybin/ybin ${ROOT}/${PREFIX}/sbin/ybin
- install -m 0755 ybin/yabootconfig ${ROOT}/${PREFIX}/sbin/yabootconfig
- rm -f ${ROOT}/${PREFIX}/sbin/mkofboot
- ln -s ybin ${ROOT}/${PREFIX}/sbin/mkofboot
+ install -m 0755 ybin/ofpath ${ROOT}/${SBINDIR}/ofpath
+ install -m 0755 ybin/ybin ${ROOT}/${SBINDIR}/ybin
+ install -m 0755 ybin/yabootconfig ${ROOT}/${SBINDIR}/yabootconfig
+ rm -f ${ROOT}/${SBINDIR}/mkofboot
+ ln -s ybin ${ROOT}/${SBINDIR}/mkofboot
@gzip -9 man/*.[58]
install -m 0644 man/bootstrap.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/bootstrap.8.gz
install -m 0644 man/mkofboot.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/mkofboot.8.gz
@@ -216,10 +217,10 @@
@echo
deinstall:
- rm -f ${ROOT}/${PREFIX}/sbin/ofpath
- rm -f ${ROOT}/${PREFIX}/sbin/ybin
- rm -f ${ROOT}/${PREFIX}/sbin/yabootconfig
- rm -f ${ROOT}/${PREFIX}/sbin/mkofboot
+ rm -f ${ROOT}/${SBINDIR}/ofpath
+ rm -f ${ROOT}/${SBINDIR}/ybin
+ rm -f ${ROOT}/${SBINDIR}/yabootconfig
+ rm -f ${ROOT}/${SBINDIR}/mkofboot
rm -f ${ROOT}/${PREFIX}/lib/yaboot/yaboot
rm -f ${ROOT}/${PREFIX}/lib/yaboot/ofboot
rm -f ${ROOT}/${PREFIX}/lib/yaboot/addnote

View file

@ -1,251 +0,0 @@
--- 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 @@
fi
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

View file

@ -1,113 +0,0 @@
--- yaboot-1.3.12/util/addnote.c.addnote 2001-12-01 04:58:11.000000000 -0500
+++ yaboot-1.3.12/util/addnote.c 2005-02-02 09:47:02.321140000 -0500
@@ -28,6 +28,7 @@
#include <unistd.h>
#include <string.h>
+/* CHRP note section */
char arch[] = "PowerPC";
#define N_DESCR 6
@@ -40,6 +41,29 @@
0x4000, /* load-base */
};
+/* RPA note section */
+char rpaname[] = "IBM,RPA-Client-Config";
+
+/*
+ * Note: setting ignore_my_client_config *should* mean that OF ignores
+ * all the other fields, but there is a firmware bug which means that
+ * it looks at the splpar field at least. So these values need to be
+ * reasonable.
+ */
+#define N_RPA_DESCR 8
+unsigned int rpanote[N_RPA_DESCR] = {
+ 0, /* lparaffinity */
+ 64, /* min_rmo_size */
+ 0, /* min_rmo_percent */
+ 40, /* max_pft_size */
+ 1, /* splpar */
+ -1, /* min_load */
+ 0, /* new_mem_def */
+ 1, /* ignore_my_client_config */
+};
+
+#define ROUNDUP(len) (((len) + 3) & ~3)
+
unsigned char buf[512];
#define GET_16BE(off) ((buf[off] << 8) + (buf[(off)+1]))
@@ -77,7 +101,7 @@
{
int fd, n, i;
int ph, ps, np;
- int nnote, ns;
+ int nnote, nnote2, ns;
if (ac != 2) {
fprintf(stderr, "Usage: %s elf-file\n", av[0]);
@@ -89,7 +113,8 @@
exit(1);
}
- nnote = strlen(arch) + 1 + (N_DESCR + 3) * 4;
+ nnote = 12 + ROUNDUP(strlen(arch) + 1) + sizeof(descr);
+ nnote2 = 12 + ROUNDUP(strlen(rpaname) + 1) + sizeof(rpanote);
n = read(fd, buf, sizeof(buf));
if (n < 0) {
@@ -112,7 +137,7 @@
np = GET_16BE(E_PHNUM);
if (ph < E_HSIZE || ps < PH_HSIZE || np < 1)
goto notelf;
- if (ph + (np + 1) * ps + nnote > n)
+ if (ph + (np + 2) * ps + nnote + nnote2 > n)
goto nospace;
for (i = 0; i < np; ++i) {
@@ -125,12 +150,12 @@
}
/* XXX check that the area we want to use is all zeroes */
- for (i = 0; i < ps + nnote; ++i)
+ for (i = 0; i < 2 * ps + nnote + nnote2; ++i)
if (buf[ph + i] != 0)
goto nospace;
/* fill in the program header entry */
- ns = ph + ps;
+ ns = ph + 2 * ps;
PUT_32BE(ph + PH_TYPE, PT_NOTE);
PUT_32BE(ph + PH_OFFSET, ns);
PUT_32BE(ph + PH_FILESZ, nnote);
@@ -142,11 +167,26 @@
PUT_32BE(ns + 8, 0x1275);
strcpy(&buf[ns + 12], arch);
ns += 12 + strlen(arch) + 1;
- for (i = 0; i < N_DESCR; ++i)
- PUT_32BE(ns + i * 4, descr[i]);
+ for (i = 0; i < N_DESCR; ++i, ns += 4)
+ PUT_32BE(ns, descr[i]);
+
+ /* fill in the second program header entry and the RPA note area */
+ ph += ps;
+ PUT_32BE(ph + PH_TYPE, PT_NOTE);
+ PUT_32BE(ph + PH_OFFSET, ns);
+ PUT_32BE(ph + PH_FILESZ, nnote2);
+
+ /* fill in the note area we point to */
+ PUT_32BE(ns, strlen(rpaname) + 1);
+ PUT_32BE(ns + 4, sizeof(rpanote));
+ PUT_32BE(ns + 8, 0x12759999);
+ strcpy(&buf[ns + 12], rpaname);
+ ns += 12 + ROUNDUP(strlen(rpaname) + 1);
+ for (i = 0; i < N_RPA_DESCR; ++i, ns += 4)
+ PUT_32BE(ns, rpanote[i]);
/* Update the number of program headers */
- PUT_16BE(E_PHNUM, np + 1);
+ PUT_16BE(E_PHNUM, np + 2);
/* write back */
lseek(fd, (long) 0, SEEK_SET);

View file

@ -1,22 +0,0 @@
--- yaboot-1.3.12/lib/strstr.c.gcc34 2004-06-18 16:47:43.669136744 -0400
+++ yaboot-1.3.12/lib/strstr.c 2004-06-18 16:48:05.700787424 -0400
@@ -76,7 +76,8 @@
a = *++haystack;
if (a == '\0')
goto ret0;
-shloop: }
+shloop: ;
+ }
while (a != b);
jin: a = *++haystack;
--- yaboot-1.3.12/lib/malloc.c.gcc34 2004-06-18 16:46:29.718378968 -0400
+++ yaboot-1.3.12/lib/malloc.c 2004-06-18 16:48:41.972273320 -0400
@@ -21,6 +21,7 @@
#include "types.h"
#include "stddef.h"
+#include <string.h>
/* Imported functions */
extern void prom_printf (char *fmt, ...);

View file

@ -1,21 +0,0 @@
--- yaboot-1.3.12/include/fdisk-part.h.raid 2001-12-01 09:58:10.000000000 +0000
+++ yaboot-1.3.12/include/fdisk-part.h 2005-04-27 08:01:33.000000000 +0100
@@ -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 */
--- yaboot-1.3.12/second/partition.c.raid 2005-04-27 08:01:45.000000000 +0100
+++ yaboot-1.3.12/second/partition.c 2005-04-27 08:02:07.000000000 +0100
@@ -167,7 +167,7 @@
(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 */

View file

@ -1,32 +0,0 @@
--- yaboot-1.3.13/ybin/ybin~ 2005-08-10 15:09:32.000000000 +0100
+++ yaboot-1.3.13/ybin/ybin 2005-08-11 16:13:36.000000000 +0100
@@ -353,17 +353,19 @@ checkconf()
fi
## make sure $mntpoint is on $boot, this matters to nvram updating.
- if [ "$(v=`df "$mntpoint" 2> /dev/null | grep ^/dev/` ; echo ${v%%[ ]*})" != "$boot" -a -d "$mntpoint" ] ; then
- echo 1>&2 "$PRG: $mntpoint is not located on $boot"
- local CONFERR=1
- ## more then one subdirectory deep is not supported. no sed available on boot floppies ( / -> \ )
- elif [ "$mntpoint" != "$(v=`df "$mntpoint" 2> /dev/null | grep ^/dev/` ; echo ${v##*[ ]})" ] ; then
- echo "$(v=`df "$mntpoint" 2>/dev/null | grep ^/dev/`; m=${v##*[ ]}; echo "${mntpoint##*$m/}")" | grep -q /
- if [ $? = 0 ] ; then
- echo 1>&2 "$PRG:$ERR $mntpoint is more then one subdirectory deep from root of $boot"
+ if [ -n "$magicboot" -o "$nonvram" = 0 ]; then
+ if [ "$(v=`df "$mntpoint" 2> /dev/null | grep ^/dev/` ; echo ${v%%[ ]*})" != "$boot" -a -d "$mntpoint" ] ; then
+ echo 1>&2 "$PRG: $mntpoint is not located on $boot"
local CONFERR=1
- else
- OFDIR="$(v=`df "$mntpoint" 2>/dev/null | grep ^/dev/`; m=${v##*[ ]}; echo "${mntpoint##*$m/}")"
+ ## more than one subdirectory deep is not supported. no sed available on boot floppies ( / -> \ )
+ elif [ "$mntpoint" != "$(v=`df "$mntpoint" 2> /dev/null | grep ^/dev/` ; echo ${v##*[ ]})" ] ; then
+ echo "$(v=`df "$mntpoint" 2>/dev/null | grep ^/dev/`; m=${v##*[ ]}; echo "${mntpoint##*$m/}")" | grep -q /
+ if [ $? = 0 ] ; then
+ echo 1>&2 "$PRG:$ERR $mntpoint is more then one subdirectory deep from root of $boot"
+ local CONFERR=1
+ else
+ OFDIR="$(v=`df "$mntpoint" 2>/dev/null | grep ^/dev/`; m=${v##*[ ]}; echo "${mntpoint##*$m/}")"
+ fi
fi
fi

View file

@ -1,189 +0,0 @@
--- yaboot-1.3.13/second/partition.c.amigaparts 2002-09-14 23:12:05.000000000 -0400
+++ yaboot-1.3.13/second/partition.c 2005-07-25 16:54:22.000000000 -0400
@@ -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,114 @@
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));
+ if (!used) {
+ prom_printf("malloc failed for Amiga partition scan\n");
+ return;
+ }
+
+ for (i=0; i < possible; i++) used[i] = 0;
+
+
+ for (part = amiga_block[AMIGA_PARTITIONS], partition = 1;
+ 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/include/amiga-part.h.amigaparts 2005-07-25 16:55:05.000000000 -0400
+++ yaboot-1.3.13/include/amiga-part.h 2005-07-25 16:54:59.000000000 -0400
@@ -0,0 +1,42 @@
+/*
+ * amiga-part.h - Structure of amiga partition table
+ *
+ * Copyright (C) 2004 Sven Luther <luther@debian.org>
+ *
+ * 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.
+ */
+
+#define AMIGA_RDB_MAX 16
+#define AMIGA_ID_RDB 0x5244534B /* 'RDSK' */
+#define AMIGA_ID_PART 0x50415254 /* 'PART' */
+#define AMIGA_END 0xffffffff
+
+#define AMIGA_ID 0
+#define AMIGA_LENGTH 1
+#define AMIGA_PARTITIONS 7
+#define AMIGA_CYL 16
+#define AMIGA_SECT 17
+#define AMIGA_HEADS 18
+#define AMIGA_RDBLIMIT 33
+
+
+#define AMIGA_PART_NEXT 4
+#define AMIGA_PART_FLAGS 8
+#define AMIGA_PART_LOWCYL 41
+#define AMIGA_PART_HIGHCYL 42
+#define AMIGA_PART_DOSTYPE 48
+
+#define AMIGA_PART_BOOTABLE 0x1
+#define AMIGA_PART_NOMOUNT 0x2

View file

@ -1,131 +0,0 @@
--- yaboot-1.3.13/include/bootinfo.h.nocolonzero 2001-12-01 09:58:10.000000000 +0000
+++ yaboot-1.3.13/include/bootinfo.h 2007-11-27 17:17:28.000000000 +0000
@@ -34,6 +34,7 @@
#define _MACH_classic 0x00000400 /* RPCG RPX-Classic 8xx board */
#define _MACH_oak 0x00000800 /* IBM "Oak" 403 eval. board */
#define _MACH_walnut 0x00001000 /* IBM "Walnut" 405GP eval. board */
+#define _MACH_bplan 0x00002000 /* Pegasos/Efika, broken partition #s */
struct bi_record {
unsigned long tag; /* tag ID */
@@ -51,6 +52,8 @@ struct bi_record {
#endif /* _PPC_BOOTINFO_H */
+extern int _machine;
+
/*
* Local variables:
* c-file-style: "k&r"
--- yaboot-1.3.13/second/fs_ext2.c.nocolonzero 2007-11-27 17:16:21.000000000 +0000
+++ yaboot-1.3.13/second/fs_ext2.c 2007-11-27 17:17:43.000000000 +0000
@@ -35,6 +35,7 @@
#include "fs.h"
#include "errors.h"
#include "debug.h"
+#include "bootinfo.h"
#define FAST_VERSION
#define MAX_READ_RANGE 256
@@ -159,7 +160,8 @@ ext2_open( struct boot_file_t* file,
/* Open the OF device for the entire disk */
strncpy(buffer, dev_name, 1020);
- strcat(buffer, ":0");
+ if (_machine != _MACH_bplan)
+ strcat(buffer, ":0");
DEBUG_F("<%s>\n", buffer);
--- yaboot-1.3.13/second/fs_reiserfs.c.nocolonzero 2001-12-01 09:58:10.000000000 +0000
+++ yaboot-1.3.13/second/fs_reiserfs.c 2007-11-27 17:18:14.000000000 +0000
@@ -29,6 +29,7 @@
#include "fs.h"
#include "errors.h"
#include "debug.h"
+#include "bootinfo.h"
#include "reiserfs/reiserfs.h"
/* Exported in struct fs_t */
@@ -84,7 +85,10 @@ reiserfs_open( struct boot_file_t *file,
else
INFO->partition_offset = 0;
- sprintf( buffer, "%s:%d", dev_name, 0 ); /* 0 is full disk in OF */
+ strncpy(buffer, dev_name, 1020);
+ if (_machine != _MACH_bplan)
+ strcat(buffer, ":0"); /* 0 is full disk in (non-buggy) OF */
+
file->of_device = prom_open( buffer );
DEBUG_F( "Trying to open dev_name=%s; filename=%s; partition offset=%Lu\n",
buffer, file_name, INFO->partition_offset );
--- yaboot-1.3.13/second/fs_xfs.c.nocolonzero 2002-09-15 04:12:21.000000000 +0100
+++ yaboot-1.3.13/second/fs_xfs.c 2007-11-27 17:17:57.000000000 +0000
@@ -30,6 +30,7 @@
#include "xfs/xfs.h"
#include "errors.h"
#include "debug.h"
+#include "bootinfo.h"
#define SECTOR_BITS 9
@@ -77,7 +78,9 @@ xfs_open(struct boot_file_t *file, const
else
partition_offset = 0;
- sprintf(buffer, "%s:%d", dev_name, 0); /* 0 is full disk in OF */
+ strncpy(buffer, dev_name, 1020);
+ if (_machine != _MACH_bplan)
+ strcat(buffer, ":0"); /* 0 is full disk in (non-buggy) OF */
DEBUG_F("Trying to open dev_name=%s; filename=%s; partition offset=%Lu\n",
buffer, file_name, partition_offset);
file->of_device = prom_open(buffer);
--- yaboot-1.3.13/second/partition.c.nocolonzero 2007-11-27 17:16:21.000000000 +0000
+++ yaboot-1.3.13/second/partition.c 2007-11-27 17:17:16.000000000 +0000
@@ -40,6 +40,7 @@
#include "linux/iso_fs.h"
#include "debug.h"
#include "errors.h"
+#include "bootinfo.h"
/* We currently don't check the partition type, some users
* are putting crap there and still expect it to work...
@@ -337,7 +338,8 @@ partitions_lookup(const char *device)
unsigned int prom_blksize, iso_root_block;
strncpy(block_buffer, device, 2040);
- strcat(block_buffer, ":0");
+ if (_machine != _MACH_bplan)
+ strcat(block_buffer, ":0");
/* Open device */
disk = prom_open(block_buffer);
--- yaboot-1.3.13/second/yaboot.c.nocolonzero 2007-11-27 17:16:21.000000000 +0000
+++ yaboot-1.3.13/second/yaboot.c 2007-11-27 17:16:21.000000000 +0000
@@ -222,7 +222,10 @@ yaboot_start (unsigned long r3, unsigned
root = prom_finddevice("/");
if (root != 0) {
static char model[256];
- if (prom_getprop(root, "device_type", model, 256 ) > 0 &&
+ if (prom_getprop(root, "CODEGEN,vendor", model, 256) > 0 &&
+ !strncmp("bplan", model, 5))
+ _machine = _MACH_bplan;
+ else if (prom_getprop(root, "device_type", model, 256 ) > 0 &&
!strncmp("chrp", model, 4))
_machine = _MACH_chrp;
else {
@@ -1486,11 +1489,13 @@ yaboot_main(void)
prom_printf("%s: Unable to parse\n", bootdevice);
return -1;
}
+ if (_machine == _MACH_bplan && !conf_given)
+ boot.part++;
DEBUG_F("After parse_device_path: dev=%s, part=%d, file=%s\n",
boot.dev, boot.part, boot.file);
if (!conf_given) {
- if (_machine == _MACH_chrp)
+ if (_machine == _MACH_chrp || _machine == _MACH_bplan)
boot.file = "/etc/";
else if (strlen(boot.file)) {
if (!strncmp(boot.file, "\\\\", 2))

View file

@ -1,166 +0,0 @@
--- yaboot-1.3.13/second/yaboot.c.cnf 2005-08-09 16:00:12.000000000 +0100
+++ yaboot-1.3.13/second/yaboot.c 2005-08-09 16:01:45.000000000 +0100
@@ -112,6 +112,7 @@ static void setup_display(void);
int useconf = 0;
char bootdevice[1024];
+char bootargs[1024];
char *password = NULL;
struct boot_fspec_t boot;
int _machine = _MACH_Pmac;
@@ -324,13 +325,11 @@ done:
* config file. Handle the "\\" (blessed system folder)
*/
static int
-load_config_file(char *device, char* path, int partition)
+load_config_file(struct boot_fspec_t *fspec)
{
char *conf_file = NULL, *p;
struct boot_file_t file;
int sz, opened = 0, result = 0;
- char conf_path[512];
- struct boot_fspec_t fspec;
/* Allocate a buffer for the config file */
conf_file = malloc(CONFIG_FILE_MAX);
@@ -339,23 +338,11 @@ load_config_file(char *device, char* pat
goto bail;
}
- /* Build the path to the file */
- if (_machine == _MACH_chrp)
- strcpy(conf_path, "/etc/");
- else if (path && *path)
- strcpy(conf_path, path);
- else
- conf_path[0] = 0;
- strcat(conf_path, CONFIG_FILE_NAME);
-
/* Open it */
- fspec.dev = device;
- fspec.file = conf_path;
- fspec.part = partition;
- result = open_file(&fspec, &file);
+ result = open_file(fspec, &file);
if (result != FILE_ERR_OK) {
- prom_printf("%s:%d,", fspec.dev, fspec.part);
- prom_perror(result, fspec.file);
+ prom_printf("%s:%d,", fspec->dev, fspec->part);
+ prom_perror(result, fspec->file);
prom_printf("Can't open config file\n");
goto bail;
}
@@ -375,7 +362,7 @@ load_config_file(char *device, char* pat
opened = 0;
/* Call the parsing code in cfg.c */
- if (cfg_parse(conf_path, conf_file, sz) < 0) {
+ if (cfg_parse(fspec->file, conf_file, sz) < 0) {
prom_printf ("Syntax error or read error config\n");
goto bail;
}
@@ -590,7 +577,6 @@ int get_params(struct boot_param_t* para
int singlekey = 0;
int restricted = 0;
static int first = 1;
- static char bootargs[1024];
static char imagepath[1024];
static char initrdpath[1024];
static char sysmappath[1024];
@@ -607,7 +593,6 @@ int get_params(struct boot_param_t* para
if (first) {
first = 0;
- prom_get_chosen("bootargs", bootargs, sizeof(bootargs));
imagename = bootargs;
word_split(&imagename, &params->args);
timeout = DEFAULT_TIMEOUT;
@@ -1458,12 +1443,32 @@ int
yaboot_main(void)
{
char *ptype;
+ int conf_given = 0;
+ char conf_path[1024];
if (_machine == _MACH_Pmac)
setup_display();
+ prom_get_chosen("bootargs", bootargs, sizeof(bootargs));
+ DEBUG_F("/chosen/bootargs = %s\n", bootargs);
prom_get_chosen("bootpath", bootdevice, sizeof(bootdevice));
DEBUG_F("/chosen/bootpath = %s\n", bootdevice);
+
+ /* If conf= specified on command line, it overrides */
+ if (!strncmp(bootargs, "conf=", 5)) {
+ char *end = strchr(bootargs,' ');
+ if (end)
+ *end = 0;
+
+ strcpy(bootdevice, bootargs + 5);
+ conf_given = 1;
+
+ /* Remove conf=xxx from bootargs */
+ if (end)
+ memmove(bootargs, end+1, strlen(end+1)+1);
+ else
+ bootargs[0] = 0;
+ }
if (bootdevice[0] == 0) {
prom_get_options("boot-device", bootdevice, sizeof(bootdevice));
DEBUG_F("boot-device = %s\n", bootdevice);
@@ -1480,29 +1485,36 @@ yaboot_main(void)
DEBUG_F("After parse_device_path: dev=%s, part=%d, file=%s\n",
boot.dev, boot.part, boot.file);
- if (strlen(boot.file)) {
- if (!strncmp(boot.file, "\\\\", 2))
- boot.file = "\\\\";
- else {
- char *p, *last;
- p = last = boot.file;
- while(*p) {
- if (*p == '\\')
- last = p;
- p++;
+ if (!conf_given) {
+ if (_machine == _MACH_chrp)
+ boot.file = "/etc/";
+ else if (strlen(boot.file)) {
+ if (!strncmp(boot.file, "\\\\", 2))
+ boot.file = "\\\\";
+ else {
+ char *p, *last;
+ p = last = boot.file;
+ while(*p) {
+ if (*p == '\\')
+ last = p;
+ p++;
+ }
+ if (p)
+ *(last) = 0;
+ else
+ boot.file = "";
+ if (strlen(boot.file))
+ strcat(boot.file, "\\");
}
- if (p)
- *(last) = 0;
- else
- boot.file = "";
- if (strlen(boot.file))
- strcat(boot.file, "\\");
}
+ strcpy(conf_path, boot.file);
+ strcat(conf_path, CONFIG_FILE_NAME);
+ boot.file = conf_path;
+ DEBUG_F("After path kludgeup: dev=%s, part=%d, file=%s\n",
+ boot.dev, boot.part, boot.file);
}
- DEBUG_F("After pmac path kludgeup: dev=%s, part=%d, file=%s\n",
- boot.dev, boot.part, boot.file);
- useconf = load_config_file(boot.dev, boot.file, boot.part);
+ useconf = load_config_file(&boot);
prom_printf("Welcome to yaboot version " VERSION "\n");
prom_printf("Enter \"help\" to get some basic usage information\n");

View file

@ -1,13 +0,0 @@
--- yaboot-1.3.13/ybin/ybin.dontwritehome 2006-08-10 14:33:06.000000000 -0400
+++ yaboot-1.3.13/ybin/ybin 2006-08-10 14:33:15.000000000 -0400
@@ -821,6 +821,10 @@
return 1
fi
+ ## N.B.: SELinux does not like bootloader executables writing to
+ ## root's homedir, so we lie about HOME here.
+ export HOME=/boot
+
## hmount is really more of a way to make sure we have a valid HFS
## filesystem before proceding, and hcopy requires it...
hmount "$boot" > /dev/null

View file

@ -1,12 +0,0 @@
--- yaboot-1.3.13/lib/strstr.c.gcc34 2001-09-20 09:15:31.000000000 -0400
+++ yaboot-1.3.13/lib/strstr.c 2005-07-25 16:02:23.000000000 -0400
@@ -76,7 +76,8 @@
a = *++haystack;
if (a == '\0')
goto ret0;
-shloop: }
+shloop: ;
+ }
while (a != b);
jin: a = *++haystack;

View file

@ -1,22 +0,0 @@
--- yaboot-1.3.13/second/yaboot.c~ 2005-08-11 16:16:46.000000000 +0100
+++ yaboot-1.3.13/second/yaboot.c 2005-08-14 14:22:52.000000000 +0100
@@ -177,6 +177,7 @@ yaboot_start (unsigned long r3, unsigned
{
int result;
void* malloc_base = NULL;
+ unsigned long addr;
prom_handle root;
/* OF seems to do it, but I'm not very confident */
@@ -195,7 +196,10 @@ yaboot_start (unsigned long r3, unsigned
prom_init ((prom_entry) r5);
/* Allocate some memory for malloc'ator */
- malloc_base = prom_claim((void *)MALLOCADDR, MALLOCSIZE, 0);
+ for (addr = MALLOCADDR; addr <= MALLOCADDR * 16 ;addr+=0x100000) {
+ malloc_base = prom_claim((void *)addr, MALLOCSIZE, 0);
+ if (malloc_base != (void *)-1) break;
+ }
if (malloc_base == (void *)-1) {
prom_printf("Can't claim malloc buffer (%d bytes at 0x%08x)\n",
MALLOCSIZE, MALLOCADDR);

View file

@ -1,95 +0,0 @@
* 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

View file

@ -1,30 +0,0 @@
--- yaboot-1.3.13/ybin/ofpath.multisata 2006-08-21 14:30:50.000000000 -0400
+++ yaboot-1.3.13/ybin/ofpath 2006-08-21 14:41:28.000000000 -0400
@@ -298,10 +298,24 @@
echo "${DEVICE_PATH##*device-tree}/@$DEVICE_ID:$PARTITION"
;;
ata_k2|sata_svw)
- HOST_LIST="$(for i in `find /proc/device-tree -name compatible` ; do
- lgrep "$i" "k2-s-ata" ; done)"
+ #Not all G5 device trees have a compatible "k2-sata" node
+ #per channel use parent
+ HOST_LIST="$(for i in `find /proc/device-tree -name compatible ` ; do
+ lgrep "$i" "k2-s-ata" ; done | sort)"
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"
+ ;;
+ sbp2)
+ HOST_LIST="$(for i in `find /proc/device-tree -name name` ; do
+ lgrep "$i" "sbp-2" ; done)"
+ DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
+ echo "${DEVICE_PATH##*device-tree}/disk@0:$PARTITION"
;;
*)
echo 1>&2 "$PRG: Driver: $SCSI_DRIVER is not supported"

View file

@ -1,179 +0,0 @@
--- yaboot-1.3.13/second/file.c.netboot 2003-02-10 04:18:13.000000000 -0500
+++ yaboot-1.3.13/second/file.c 2005-09-14 16:57:02.000000000 -0400
@@ -38,6 +38,112 @@
extern char bootdevice[1024];
+static char *netdev_path_to_filename(const char *path)
+{
+ char *tmp, *args, *filename;
+ size_t len;
+
+ DEBUG_F("path = %s\n", path);
+
+ if (!path)
+ return NULL;
+
+ args = strrchr(path, ':');
+ if (!args)
+ return NULL;
+
+ /* The obp-tftp device arguments should be at the end of
+ * the argument list. Skip over any extra arguments (promiscuous,
+ * speed, duplex, bootp, rarp).
+ */
+
+ tmp = strstr(args, "promiscuous");
+ if (tmp && tmp > args)
+ args = tmp + strlen("promiscuous");
+
+ tmp = strstr(args, "speed=");
+ if (tmp && tmp > args)
+ args = tmp + strlen("speed=");
+
+ tmp = strstr(args, "duplex=");
+ if (tmp && tmp > args)
+ args = tmp + strlen("duplex=");
+
+ tmp = strstr(args, "bootp");
+ if (tmp && tmp > args)
+ args = tmp + strlen("bootp");
+
+ tmp = strstr(args, "rarp");
+ if (tmp && tmp > args)
+ args = tmp + strlen("rarp");
+
+ args = strchr(args, ',');
+ if (!args)
+ return NULL;
+
+ tmp = args;
+ tmp--;
+ /* If the preceding character is ':' then there were no
+ * non-obp-tftp arguments and we know we're right up to the
+ * filename. Otherwise, we must advance args once more.
+ */
+ args++;
+ if (*tmp != ':') {
+ args = strchr(args, ',');
+ if (!args)
+ return NULL;
+ args++;
+ }
+
+ /* filename may be empty; e.g. enet:192.168.1.1,,192.168.1.2 */
+ if (*args == ',') {
+ DEBUG_F("null filename\n");
+ return NULL;
+ }
+
+ /* Now see whether there are more args following the filename. */
+ tmp = strchr(args, ',');
+ if (!tmp)
+ len = strlen(args) + 1;
+ else
+ len = tmp - args + 1;
+
+ filename = malloc(len);
+ if (!filename)
+ return NULL;
+
+ strncpy(filename, args, len);
+ filename[len - 1] = '\0';
+
+ DEBUG_F("filename = %s\n", filename);
+ return filename;
+}
+
+static char *netdev_path_to_dev(const char *path)
+{
+ char *dev, *tmp;
+ size_t len;
+
+ DEBUG_F("path = %s\n", path);
+
+ if (!path)
+ return NULL;
+
+ tmp = strchr(path, ':');
+ if (!tmp)
+ return strdup(path);
+ tmp++;
+
+ len = tmp - path + 1;
+
+ dev = malloc(len);
+ if (dev) {
+ strncpy(dev, path, len);
+ dev[len - 1] = '\0';
+ }
+ return dev;
+}
+
/* This function follows the device path in the devtree and separates
the device name, partition number, and other datas (mostly file name)
the string passed in parameters is changed since 0 are put in place
@@ -71,6 +177,7 @@
char *ptr;
char *ipath = NULL;
char *defdev = NULL;
+ int device_kind;
result->dev = NULL;
result->part = -1;
@@ -81,20 +188,21 @@
else
ipath = strdup(imagepath);
- if (defdevice)
+ if (defdevice) {
defdev = strdup(defdevice);
-
- if (defdev) {
- if (!strstr(defdev, "ethernet") && !strstr(defdev, "enet")) {
- if ((ptr = strrchr(defdev, ':')) != NULL)
- *ptr = 0; /* remove trailing : from defdevice if necessary */
- }
+ device_kind = prom_get_devtype(defdev);
+ } else
+ device_kind = prom_get_devtype(ipath);
+
+ if (device_kind != FILE_DEVICE_NET && strchr(defdev, ':') != NULL) {
+ if ((ptr = strrchr(defdev, ':')) != NULL)
+ *ptr = 0; /* remove trailing : from defdevice if necessary */
}
- /* if there is no : then there is no filename or partition. must
- use strrchr() since enet:,10.0.0.1,file is legal */
-
- if (strchr(ipath, ':') != NULL) {
+ /* This will not properly handle an obp-tftp argument list
+ * with elements after the filename; that is handled below.
+ */
+ if (device_kind != FILE_DEVICE_NET && strchr(ipath, ':') != NULL) {
if ((ptr = strrchr(ipath, ',')) != NULL) {
char *colon = strrchr(ipath, ':');
/* If a ':' occurs *after* a ',', then we assume that there is
@@ -107,13 +215,15 @@
}
}
- if (strstr(ipath, "ethernet") || strstr(ipath, "enet"))
- if ((ptr = strstr(ipath, "bootp")) != NULL) { /* `n' key booting boots enet:bootp */
- *ptr = 0;
- result->dev = strdup(ipath);
- } else
- result->dev = strdup(ipath);
- else if ((ptr = strchr(ipath, ':')) != NULL) {
+ if (device_kind == FILE_DEVICE_NET) {
+ if (strchr(ipath, ':'))
+ result->file = netdev_path_to_filename(ipath);
+ else
+ result->file = strdup(ipath);
+
+ if (!defdev)
+ result->dev = netdev_path_to_dev(ipath);
+ } else if ((ptr = strchr(ipath, ':')) != NULL) {
*ptr = 0;
result->dev = strdup(ipath);
if (*(ptr+1))

View file

@ -1,17 +0,0 @@
--- yaboot-1.3.13/ybin/ofpath.nobootx 2004-07-11 16:12:42.000000000 -0400
+++ yaboot-1.3.13/ybin/ofpath 2005-07-25 16:05:57.000000000 -0400
@@ -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

View file

@ -1,41 +0,0 @@
--- yaboot-1.3.13/ybin/ofpath.firewire 2006-11-16 12:58:15.000000000 +0000
+++ yaboot-1.3.13/ybin/ofpath 2006-11-16 13:03:03.000000000 +0000
@@ -250,7 +250,7 @@
DEVHOST="$(v=$(echo ${DEVINFO##*Host: scsi}) ; echo ${v%% *})"
[ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVHOST=$DEVHOST"
- if [ "$DEVTYPE" = "Direct-Access" ] ; then
+ if [ "$DEVTYPE" = "Direct-Access" ] || [ "$DEVTYPE" = "Direct-Access-RBC" ] ; then
DEVCOUNT="$(($DEVCOUNT + 1))"
[ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: DEVCOUNT=$DEVCOUNT"
if [ "$SUBDEV" = "$DEVCOUNT" ] ; then
@@ -311,9 +311,19 @@
done
echo "${DEVICE_PATH##*device-tree}/k2-sata@$K2_DEVICE_ID/disk@0:$PARTITION"
;;
- sbp2)
+ usb-storage)
+ HOST_LIST="$(for i in `find /proc/device-tree -name name | grep usb` ; do
+ lgrep "$i" "disk" ; done)"
+ DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
+ echo "${DEVICE_PATH##*device-tree}:$PARTITION"
+ ;;
+ sbp2|"")
+ # sbp-2 driver may not have a dir in /proc/scsi
HOST_LIST="$(for i in `find /proc/device-tree -name name` ; do
lgrep "$i" "sbp-2" ; done)"
+ if [ "$SCSI_HOSTNUMBER" = "" ] ; then
+ SCSI_HOSTNUMBER=1
+ fi
DEVICE_PATH="$(printhost $SCSI_HOSTNUMBER $HOST_LIST)"
echo "${DEVICE_PATH##*device-tree}/disk@0:$PARTITION"
;;
@@ -821,7 +831,7 @@
local DEVTYPE="$(v=$(echo ${DEVINFO##*Type: }) ; echo ${v%% *})"
[ "$DEBUG" = 1 ] && echo 1>&2 "$PRG: DEBUG: fixdevfs: DEVTYPE=$DEVTYPE"
- if [ "$DEVTYPE" = "Direct-Access" ] ; then
+ if [ "$DEVTYPE" = "Direct-Access" ] || [ "$DEVTYPE" = "Direct-Access-RBC" ] ; then
## Lets find out some more information
## get the device id.
local DEVID="$(v=$(echo ${DEVINFO##*Id: }) ; n=$(echo ${v%% *}) ; echo ${n#*0})"

View file

@ -1,83 +0,0 @@
--- yaboot-1.3.13/ybin/ofpath.ofpath 2005-07-30 23:28:00.000000000 +0100
+++ yaboot-1.3.13/ybin/ofpath 2005-07-30 23:34:52.000000000 +0100
@@ -382,12 +382,19 @@ ide_ofpath()
echo 1>&2 "$PRG: KERNEL BUG: /proc/ide/${IDEBUS}/channel does not exist"
return 1
fi
-
case "$(cat /proc/device-tree${DEVSPEC}/device_type 2> /dev/null)" in
ide|ata)
local MASTER="/disk@0"
local SLAVE="/disk@1"
;;
+ spi)
+ local DEVTYPE="disk$DEVTYPE"
+ if grep -q ide-cdrom /proc/ide/$DEVNODE/driver; then
+ DEVTYPE="cdrom"
+ fi
+ local MASTER="/$DEVTYPE@$(cat /proc/ide/${IDEBUS}/channel),0"
+ local SLAVE="/$DEVTYPE@$(cat /proc/ide/${IDEBUS}/channel),1"
+ ;;
pci-ide|pci-ata)
local MASTER="/@$(cat /proc/ide/${IDEBUS}/channel)/disk@0"
local SLAVE="/@$(cat /proc/ide/${IDEBUS}/channel)/disk@1"
@@ -681,6 +688,40 @@ chrp()
return 0
}
+## find OpenFirmware device path for Genesi Pegasos hardware (ide only)
+pegasos()
+{
+ # SmartFirmware disagrees with the rest of the world about whether
+ # partition numbers should start at zero or one.
+ [ -n $PARTITION ] && PARTITION=$(($PARTITION - 1))
+
+ 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
+
+ ## now we have the data for /@$DEVID:$PARTITION
+ ## find the actual OF path.
+ scsi_ofpath || return 1
+ ;;
+ hd*)
+ ide_ofpath || return 1
+ ;;
+ *)
+ echo 1>&2 "$PRG: Device: /dev/$DEVNODE is not supported"
+ return 1
+ ;;
+ esac
+ return 0
+}
+
## If we get lame devfs name, we need to make it foad
ckdevfs()
{
@@ -906,6 +947,8 @@ elif (cat /proc/cpuinfo 2>/dev/null | gr
SUBARCH=OldWorld
elif (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP IBM') ; then
SUBARCH=CHRP
+elif (cat /proc/cpuinfo 2> /dev/null | grep ^machine | grep -q 'CHRP Pegasos') ; then
+ SUBARCH=Pegasos
else
echo 1>&2 "$PRG: This machine is not yet supported"
exit 1
@@ -937,6 +980,9 @@ case "$SUBARCH" in
CHRP)
chrp || exit 1
;;
+ Pegasos)
+ pegasos || exit 1
+ ;;
esac
exit 0

View file

@ -1,15 +0,0 @@
--- 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

View file

@ -1,82 +0,0 @@
--- 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
}

View file

@ -1,14 +0,0 @@
--- yaboot-1.3.13/second/prom.c~ 2005-08-10 14:53:10.000000000 +0100
+++ yaboot-1.3.13/second/prom.c 2005-08-10 15:07:16.000000000 +0100
@@ -368,10 +368,8 @@ prom_getchar ()
char c[4];
int a;
- while ((a = (int)call_prom ("read", 3, 1, prom_stdin, c, 4)) == 0)
+ while ((a = (int)call_prom ("read", 3, 1, prom_stdin, c, 4)) <= 0)
;
- if (a == -1)
- prom_abort ("EOF on console\n");
if (a == 3 && c[0] == '\e' && c[1] == '[')
return 0x100 | c[2];
return c[0];

View file

@ -1,11 +0,0 @@
--- yaboot-1.3.13/Makefile.orig 2005-09-13 13:12:44.000000000 +0000
+++ yaboot-1.3.13/Makefile 2005-09-13 13:12:01.000000000 +0000
@@ -32,7 +32,7 @@ CROSS =
# The flags for the yaboot binary.
#
YBCFLAGS = -Os $(CFLAGS) -nostdinc -Wall -isystem `gcc -print-file-name=include` -fsigned-char
-YBCFLAGS += -DVERSION=\"${VERSION}\" #"
+YBCFLAGS += -DVERSION="\"${VERSION}${VERSIONEXTRA}\"" #"
YBCFLAGS += -DTEXTADDR=$(TEXTADDR) -DDEBUG=$(DEBUG)
YBCFLAGS += -DMALLOCADDR=$(MALLOCADDR) -DMALLOCSIZE=$(MALLOCSIZE)
YBCFLAGS += -DKERNELADDR=$(KERNELADDR)

View file

@ -1,179 +0,0 @@
--- yaboot-1.3.13/ybin/ybin.swraid1 2004-07-11 16:12:12.000000000 -0400
+++ yaboot-1.3.13/ybin/ybin 2005-07-25 16:05:01.000000000 -0400
@@ -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)"

View file

@ -1,111 +0,0 @@
--- yaboot-1.3.13/second/partition.c.swraid2 2005-07-25 16:09:39.000000000 -0400
+++ yaboot-1.3.13/second/partition.c 2005-07-25 16:09:39.000000000 -0400
@@ -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/second/fs_of.c.swraid2 2004-07-11 15:54:53.000000000 -0400
+++ yaboot-1.3.13/second/fs_of.c 2005-07-25 16:09:39.000000000 -0400
@@ -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 && 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) {
--- yaboot-1.3.13/include/partition.h.swraid2 2001-12-01 04:58:10.000000000 -0500
+++ yaboot-1.3.13/include/partition.h 2005-07-25 16:09:39.000000000 -0400
@@ -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);
--- yaboot-1.3.13/include/fdisk-part.h.swraid2 2001-12-01 04:58:10.000000000 -0500
+++ yaboot-1.3.13/include/fdisk-part.h 2005-07-25 16:09:39.000000000 -0400
@@ -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 */

View file

@ -1,11 +0,0 @@
--- yaboot-1.3.13/second/yaboot.c.telnet 2005-08-17 17:53:35.000000000 -0400
+++ yaboot-1.3.13/second/yaboot.c 2005-08-17 17:54:24.000000000 -0400
@@ -1450,7 +1450,7 @@
int conf_given = 0;
char conf_path[1024];
- if (_machine == _MACH_Pmac)
+ if (prom_getprop(call_prom("instance-to-package", 1, 1, prom_stdout), "iso6429-1983-colors", NULL, 0) >= 0)
setup_display();
prom_get_chosen("bootargs", bootargs, sizeof(bootargs));

View file

@ -1,248 +0,0 @@
--- yaboot-1.3.13/ybin/yabootconfig.yabootconfig 2005-07-25 16:09:39.000000000 -0400
+++ yaboot-1.3.13/ybin/yabootconfig 2005-07-25 16:25:03.000000000 -0400
@@ -34,6 +34,7 @@
NOINSTALL=0
QUIET=0
DEBUG=0
+LABEL="Linux"
SIGINT="$PRG: Interrupt caught ... exiting"
export LC_COLLATE=C
@@ -319,6 +320,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"
@@ -347,10 +358,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
;;
@@ -474,6 +563,6 @@
READLINKKV=`readlink /usr/src/linux`
## find the kernel in the usual places and (if not --quiet) ask the
## user if we cannot find one.
-for k in "vmlinux" "vmlinux-`uname -r`" "vmlinux-`uname -r`" "$READLINKKV" ; do
+for k in "${KERNELIMAGE}" "vmlinux" "vmlinux-`uname -r`" "vmlinux-`uname -r`" "$READLINKKV" ; do
if [ -f "${CHROOT}${k}" ] ; then
KERNEL="${CHROOT}${k}"
@@ -721,6 +812,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"
@@ -731,24 +850,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:-}${INITRDIMGS:-}"
+\tlabel=$LABEL
+\troot=$ROOT
+\tread-only\n
+${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.
@@ -767,7 +928,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

View file

@ -1,132 +0,0 @@
diff -urN -X CVS man/mkofboot.8 man.deb/mkofboot.8
--- man/mkofboot.8 Thu May 24 04:32:54 2001
+++ man.deb/mkofboot.8 Tue Sep 25 05:38:42 2001
@@ -94,7 +94,7 @@
.TP
.BR \-i ,\ \-\-install\ \fIboot-file
Use \fIboot-file\fR as the primary boot loader executable, instead of
-the default\fI/usr/local/lib/yaboot/yaboot\fR(8).
+the default\fI/usr/lib/yaboot/yaboot\fR(8).
.TP
.BR \-C ,\ \-\-config\ \fIconfig-file
Use \fIconfig-file\fR as the \fBmkofboot\fR/\fByaboot\fR(8) configuration
@@ -200,8 +200,8 @@
Print out the version number and exit.
.SH FILES
.nf
-/usr/local/lib/yaboot/yaboot \- boot loader executable
-/usr/local/lib/yaboot/ofboot \- OpenFirmware boot script
+/usr/lib/yaboot/yaboot \- boot loader executable
+/usr/lib/yaboot/ofboot \- OpenFirmware boot script
/etc/yaboot.conf \- boot loader/mkofboot configuration file
.fi
.SH ENVIRONMENT
@@ -218,7 +218,7 @@
program otherwise \fBmkofboot\fR will be vulnerable to race conditions.
The Debian mktemp is derived from OpenBSD and thus should be secure.
-\fI/usr/local/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
+\fI/usr/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
\fBmkofboot\fR) it is thus critical that it not be writable by anyone
but root. It is also critical that \fI/etc/yaboot.conf\fR not be
writable by anyone but root since a different \fIofboot\fR script could be
diff -urN -X CVS man/yaboot.conf.5 man.deb/yaboot.conf.5
--- man/yaboot.conf.5 Tue Sep 25 05:20:03 2001
+++ man.deb/yaboot.conf.5 Tue Sep 25 05:38:42 2001
@@ -136,7 +136,7 @@
boot=/dev/hda2
device=hd:
partition=3
- magicboot=/usr/local/lib/yaboot/ofboot
+ magicboot=/usr/lib/yaboot/ofboot
timeout=50
root=/dev/hda3
read-only
@@ -228,7 +228,7 @@
magicboot script will be executed by OF automatically at boot (instead
of the \fBinstall\fR file.) See man \fBbootstrap\fR(8) for more
information on this. As of ybin 0.22 you should set this to
-/usr/local/lib/yaboot/ofboot which is a autoconfiguring first stage
+/usr/lib/yaboot/ofboot which is a autoconfiguring first stage
loader for yaboot. It is capable of presenting a dual boot menu for
GNU/Linux, MacOS and MacOSX. If dual booting is not required or
configured it will simply load yaboot directly. You must specify this
@@ -301,7 +301,7 @@
When you define this option you will be presented with a simple menu at
bootup allowing you to hit L to boot GNU/Linux or B to boot BSD (along
with other choices if configured). This will only work if you are
-using the new \fI/usr/local/lib/yaboot/ofboot\fR script. When this is
+using the new \fI/usr/lib/yaboot/ofboot\fR script. When this is
set to a unix device node (ie \fI/dev/hda11\fR) then ybin will use the
\fBofpath\fR(8) utility to determine the OpenFirmware device path.
.TP
@@ -310,7 +310,7 @@
partition. When you define this option you will be presented with a
simple menu at bootup allowing you to hit L to boot GNU/Linux or M to
boot MacOS (along with other choices if configured). This will only
-work if you are using the new \fI/usr/local/lib/yaboot/ofboot\fR
+work if you are using the new \fI/usr/lib/yaboot/ofboot\fR
script. When this is set to a unix device node (ie \fI/dev/hda11\fR)
then ybin will use the \fBofpath\fR(8) utility to determine the
OpenFirmware device path.
@@ -320,7 +320,7 @@
When you define this option you will be presented with a simple menu
at bootup allowing you to hit L to boot GNU/Linux or X to boot MacOSX
(along with other choices if configured). This will only work if you
-are using the new \fI/usr/local/lib/yaboot/ofboot\fR script. When
+are using the new \fI/usr/lib/yaboot/ofboot\fR script. When
this is set to a unix device node (ie \fI/dev/hda11\fR) then ybin will
use the \fBofpath\fR(8) utility to determine the OpenFirmware device
path.
@@ -341,7 +341,7 @@
When you define this option you will be presented with a simple menu
at bootup allowing you to hit L to boot GNU/Linux or D to boot Darwin
(along with other choices if configured). This will only work if you
-are using the new \fI/usr/local/lib/yaboot/ofboot\fR script. When
+are using the new \fI/usr/lib/yaboot/ofboot\fR script. When
this is set to a unix device node (ie \fI/dev/hda11\fR) then ybin will
use the \fBofpath\fR(8) utility to determine the OpenFirmware device
path.
@@ -589,8 +589,8 @@
root=/dev/hda3
partition=3
timeout=20
-install=/usr/local/lib/yaboot/yaboot
-magicboot=/usr/local/lib/yaboot/ofboot
+install=/usr/lib/yaboot/yaboot
+magicboot=/usr/lib/yaboot/ofboot
fgcolor=black
bgcolor=green
default=Linux
diff -urN -X CVS man/ybin.8 man.deb/ybin.8
--- man/ybin.8 Thu May 24 04:33:16 2001
+++ man.deb/ybin.8 Tue Sep 25 05:38:42 2001
@@ -109,7 +109,7 @@
.TP
.BR \-i ,\ \-\-install\ \fIboot-file
Use \fIboot-file\fR as the primary boot loader executable, instead of
-the default \fI/usr/local/lib/yaboot/yaboot\fR.
+the default \fI/usr/lib/yaboot/yaboot\fR.
.TP
.BR \-C ,\ \-\-config\ \fIconfig-file
Use \fIconfig-file\fR as the \fBybin\fR/\fByaboot\fR(8) configuration
@@ -214,8 +214,8 @@
Print out the version number and exit.
.SH FILES
.nf
-/usr/local/lib/yaboot/yaboot \- boot loader executable
-/usr/local/lib/yaboot/ofboot \- OpenFirmware boot script
+/usr/lib/yaboot/yaboot \- boot loader executable
+/usr/lib/yaboot/ofboot \- OpenFirmware boot script
/etc/yaboot.conf \- boot loader/ybin configuration file
.fi
.SH ENVIRONMENT
@@ -232,7 +232,7 @@
program, otherwise \fBybin\fR will be vulnerable to race conditions.
The Debian mktemp is derived from OpenBSD and thus should be secure.
-\fI/usr/local/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
+\fI/usr/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
\fBybin\fR). It is thus critical that it not be writable by anyone but
root. It is also critical that \fI/etc/yaboot.conf\fR not be writable
by anyone but root since a different \fIofboot\fR script could be

View file

@ -1,29 +0,0 @@
--- yaboot-1.3.6/first/ofboot.orig Thu Mar 7 04:19:09 2002
+++ yaboot-1.3.6/first/ofboot Thu Mar 7 04:21:49 2002
@@ -102,7 +102,7 @@
[ "$DEBUG" = 1 ] && $PRINTF 1>&2 "$PRG: DEBUG: file1: $5\n"
[ "$COUNT" = "$OSNUM" ] && c="."
BTYA=": boot$1 \" Loading second stage bootstrap...\" .printf 100 ms load-base release-load-area \" ${4}${5}\" \$boot ;"
- MENUYA="\" Press $3 for GNU/Linux${c-,}\"(0d 0a)\" .printf"
+ MENUYA="\" Press $3 for Red Hat Linux${c-,}\"(0d 0a)\" .printf"
GETYA=" ascii $3 of \" $3 \"(0d 0a)\" .printf boot$1 endof"
shift 5
COUNT="$(($COUNT + 1))"
@@ -315,7 +315,7 @@
MacRISC
</COMPATIBLE>
<DESCRIPTION>
-PowerPC GNU/Linux First Stage Bootstrap
+Red Hat Linux First Stage Bootstrap
</DESCRIPTION>
<BOOT-SCRIPT>
: .printf fb8-write drop ;
@@ -336,7 +336,7 @@
$BGCOLOR to background-color
\" \"(0C)\" .printf
-\" First Stage GNU/Linux Bootstrap\"(0d 0a)\" .printf
+\" First Stage Red Hat Linux Bootstrap\"(0d 0a)\" .printf
\" \"(0d 0a)\" .printf
$MENUOPTS
\" \"(0d 0a)\" .printf

View file

@ -1,94 +0,0 @@
--- yaboot-1.3.6/Makefile.rh Fri May 17 15:08:25 2002
+++ yaboot-1.3.6/Makefile Fri May 17 15:09:32 2002
@@ -172,32 +172,32 @@
strip --remove-section=.comment --remove-section=.note util/addnote
install: all strip
- install -d -o root -g root -m 0755 ${ROOT}/etc/
- install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/sbin/
- install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib
- install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib/yaboot
- install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man5/
- install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man8/
- install -o root -g root -m 0644 second/yaboot ${ROOT}/$(PREFIX)/lib/yaboot
- install -o root -g root -m 0755 util/addnote ${ROOT}/${PREFIX}/lib/yaboot/addnote
- install -o root -g root -m 0644 first/ofboot ${ROOT}/${PREFIX}/lib/yaboot/ofboot
- install -o root -g root -m 0755 ybin/ofpath ${ROOT}/${PREFIX}/sbin/ofpath
- install -o root -g root -m 0755 ybin/ybin ${ROOT}/${PREFIX}/sbin/ybin
- install -o root -g root -m 0755 ybin/yabootconfig ${ROOT}/${PREFIX}/sbin/yabootconfig
+ install -d -m 0755 ${ROOT}/etc/
+ install -d -m 0755 ${ROOT}/${PREFIX}/sbin/
+ install -d -m 0755 ${ROOT}/${PREFIX}/lib
+ install -d -m 0755 ${ROOT}/${PREFIX}/lib/yaboot
+ install -d -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man5/
+ install -d -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man8/
+ install -m 0644 second/yaboot ${ROOT}/$(PREFIX)/lib/yaboot
+ install -m 0755 util/addnote ${ROOT}/${PREFIX}/lib/yaboot/addnote
+ install -m 0644 first/ofboot ${ROOT}/${PREFIX}/lib/yaboot/ofboot
+ install -m 0755 ybin/ofpath ${ROOT}/${PREFIX}/sbin/ofpath
+ install -m 0755 ybin/ybin ${ROOT}/${PREFIX}/sbin/ybin
+ install -m 0755 ybin/yabootconfig ${ROOT}/${PREFIX}/sbin/yabootconfig
rm -f ${ROOT}/${PREFIX}/sbin/mkofboot
ln -s ybin ${ROOT}/${PREFIX}/sbin/mkofboot
@gzip -9 man/*.[58]
- install -o root -g root -m 0644 man/bootstrap.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/bootstrap.8.gz
- install -o root -g root -m 0644 man/mkofboot.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/mkofboot.8.gz
- install -o root -g root -m 0644 man/ofpath.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/ofpath.8.gz
- install -o root -g root -m 0644 man/yaboot.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/yaboot.8.gz
- install -o root -g root -m 0644 man/yabootconfig.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/yabootconfig.8.gz
- install -o root -g root -m 0644 man/ybin.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/ybin.8.gz
- install -o root -g root -m 0644 man/yaboot.conf.5.gz ${ROOT}/${PREFIX}/${MANDIR}/man5/yaboot.conf.5.gz
+ install -m 0644 man/bootstrap.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/bootstrap.8.gz
+ install -m 0644 man/mkofboot.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/mkofboot.8.gz
+ install -m 0644 man/ofpath.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/ofpath.8.gz
+ install -m 0644 man/yaboot.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/yaboot.8.gz
+ install -m 0644 man/yabootconfig.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/yabootconfig.8.gz
+ install -m 0644 man/ybin.8.gz ${ROOT}/${PREFIX}/${MANDIR}/man8/ybin.8.gz
+ install -m 0644 man/yaboot.conf.5.gz ${ROOT}/${PREFIX}/${MANDIR}/man5/yaboot.conf.5.gz
@gunzip man/*.gz
@if [ ! -e ${ROOT}/etc/yaboot.conf ] ; then \
- echo "install -o root -g root -m 0644 etc/yaboot.conf ${ROOT}/etc/yaboot.conf"; \
- install -o root -g root -m 0644 etc/yaboot.conf ${ROOT}/etc/yaboot.conf; \
+ echo "install -m 0644 etc/yaboot.conf ${ROOT}/etc/yaboot.conf"; \
+ install -m 0644 etc/yaboot.conf ${ROOT}/etc/yaboot.conf; \
else \
echo "/etc/yaboot.conf already exists, leaving it alone"; \
fi
--- yaboot-1.3.6/etc/yaboot.conf.fhs Thu May 23 15:56:11 2002
+++ yaboot-1.3.6/etc/yaboot.conf Thu May 23 15:57:29 2002
@@ -10,7 +10,7 @@
## specify a partition number for this! On IBM hardware you can
## generally comment this out.
-device=hd:
+## device=hd:
## partition is the partition number where the kernel images are
## located. The kernel images should be on your root filesystem, so
@@ -20,7 +20,7 @@
## option can be either set globally as shown here, or per image in
## the image= sections
-partition=3
+partition=2
## delay is the amount of time in seconds the dual boot menu (if one
## is configured, by the presense of macos, macosx, etc options here)
@@ -35,13 +35,13 @@
## section in this config file or the value of default=).
timeout=40
-install=/usr/local/lib/yaboot/yaboot
-magicboot=/usr/local/lib/yaboot/ofboot
+install=/usr/lib/yaboot/yaboot
+magicboot=/usr/lib/yaboot/ofboot
## Change the default colors, fgcolor is the text color, bgcolor is
## the screen background color. (default: fgcolor=white, bgcolor=black)
-#fgcolor=black
-#bgcolor=green
+fgcolor=white
+bgcolor=black
## Password supplied in plaintext, required for yaboot to boot, unless
## restricted is also present (see below). Be sure to

View file

@ -1,393 +0,0 @@
diff -urpN -X /cvs/dontdiff yaboot-1.3.8-orig/include/bootinfo.h yaboot-1.3.8-redhat/include/bootinfo.h
--- yaboot-1.3.8-orig/include/bootinfo.h 2001-12-01 03:58:10.000000000 -0600
+++ yaboot-1.3.8-redhat/include/bootinfo.h 2003-05-02 14:17:59.000000000 -0500
@@ -21,6 +21,8 @@
#ifndef _PPC_BOOTINFO_H
#define _PPC_BOOTINFO_H
+#include "debug.h"
+
#define _MACH_prep 0x00000001
#define _MACH_Pmac 0x00000002 /* pmac or pmac clone (non-chrp) */
#define _MACH_chrp 0x00000004 /* chrp machine */
@@ -41,6 +43,13 @@ struct bi_record {
unsigned long data[0]; /* data */
};
+struct birecs {
+ struct bi_record *first; /* first record pointer */
+ struct bi_record *last; /* last record pointer */
+ int initialized;
+};
+extern struct birecs birecs;
+
#define BI_FIRST 0x1010 /* first record - marker */
#define BI_LAST 0x1011 /* last record - marker */
#define BI_CMD_LINE 0x1012
@@ -49,6 +58,79 @@ struct bi_record {
#define BI_SYSMAP 0x1015
#define BI_MACHTYPE 0x1016
+/* align addr on a size boundry - adjust address up if needed -- Cort */
+#define _ALIGN(addr,size) ((((ulong)(addr))+((ulong)(size))-1)&(~(((ulong)(size))-1)))
+
+static __inline__ struct bi_record * birec_next(struct bi_record *birec)
+{
+ return (struct bi_record *)((ulong)birec + birec->size);
+}
+
+static __inline__ void birecs_init(ulong addr)
+{
+ /* Since the birec may be inside the malloc pool, we'll wait
+ * to finish the birec initialization until just before we
+ * are ready to allocate the birec entries when we no longer
+ * need the malloc pool.
+ */
+ birecs.first = (struct bi_record *)addr;
+ birecs.initialized = 0;
+}
+
+static __inline__ struct bi_record * birec_alloc(ulong tag, ulong args);
+
+static __inline__ void birecs_lazy_init(void)
+{
+ /*
+ * We make sure it's mapped. We map only 64k for now, it's
+ * plenty enough we don't claim since this precise memory
+ * range may already be claimed by the malloc pool.
+ */
+ prom_map (birecs.first, birecs.first, 0x10000);
+ DEBUG_F("birec at %p\n", birecs.first);
+ DEBUG_SLEEP;
+
+ birecs.last = birecs.first;
+ birecs.last->size = 0;
+ birecs.initialized = 1;
+
+ /* Create the BI_FIRST entry. The BI_LAST entry is created as a side effect. */
+ birecs.first = birec_alloc(BI_FIRST, 2);
+}
+
+static __inline__ struct bi_record * birec_alloc_bytes(ulong tag, ulong bytes)
+{
+ struct bi_record *birec;
+
+ if (!birecs.initialized)
+ birecs_lazy_init();
+
+ /* Allocate and initialize the new birec. */
+ birec = birecs.last;
+ birec->tag = tag;
+ birec->size = _ALIGN(sizeof(struct bi_record) + bytes, sizeof(ulong));
+ birec->data[0] = 0; /* Clear out the old birecs.last->date[0] entry */
+
+ /*
+ * Create a new BI_LAST entry and link the BI_FIRST and
+ * BI_LAST entries together as required by the PPC64 kernel.
+ */
+ birecs.last = birec_next(birec);
+ birecs.last->tag = BI_LAST;
+ birecs.last->size = sizeof(struct bi_record) + sizeof(ulong);
+ birecs.last->data[0] = (ulong)birecs.first;
+
+ birecs.first->data[0] = (ulong)birecs.last;
+ birecs.first->data[1] = (ulong)birecs.last + birecs.last->size - (ulong)birecs.first;
+
+ return birec;
+}
+
+static __inline__ struct bi_record * birec_alloc(ulong tag, ulong args)
+{
+ return birec_alloc_bytes(tag, args * sizeof(ulong));
+}
+
#endif /* _PPC_BOOTINFO_H */
/*
diff -urpN -X /cvs/dontdiff yaboot-1.3.8-orig/lib/vsprintf.c yaboot-1.3.8-redhat/lib/vsprintf.c
--- yaboot-1.3.8-orig/lib/vsprintf.c 2001-09-20 08:15:31.000000000 -0500
+++ yaboot-1.3.8-redhat/lib/vsprintf.c 2003-04-02 13:00:41.000000000 -0600
@@ -158,9 +158,9 @@ static char * number(char * str, long lo
tmp[i++]='0';
else while (num != 0)
{
- int t = ((long long) num) % (unsigned int) base;
+ int t = ((unsigned long long) num) % (unsigned int) base;
tmp[i++] = digits[t];
- num = ((long long) num) / (unsigned int) base;
+ num = ((unsigned long long) num) / (unsigned int) base;
}
if (i > precision)
precision = i;
diff -urpN -X /cvs/dontdiff yaboot-1.3.8-orig/second/yaboot.c yaboot-1.3.8-redhat/second/yaboot.c
--- yaboot-1.3.8-orig/second/yaboot.c 2002-09-14 22:11:44.000000000 -0500
+++ yaboot-1.3.8-redhat/second/yaboot.c 2003-05-02 12:09:03.000000000 -0500
@@ -62,9 +62,6 @@
#include "md5.h"
#endif /* USE_MD5_PASSWORDS */
-/* align addr on a size boundry - adjust address up if needed -- Cort */
-#define _ALIGN(addr,size) (((addr)+size-1)&(~(size-1)))
-
/* Addresses where the PPC32 and PPC64 vmlinux kernels are linked at.
* These are used to determine whether we are booting a vmlinux, in
* which case, it will be loaded at KERNELADDR. Otherwise (eg zImage),
@@ -81,16 +78,19 @@ typedef struct {
} elf;
void* base;
unsigned long memsize;
+ unsigned long totalsize;
unsigned long filesize;
unsigned long offset;
- unsigned long load_loc;
- unsigned long entry;
+ unsigned long long load_loc;
+ unsigned long long entry;
} loadinfo_t;
+struct birecs birecs;
+
typedef void (*kernel_entry_t)( void *,
unsigned long,
prom_entry,
- unsigned long,
+ struct bi_record *,
unsigned long );
/* Imported functions */
@@ -913,7 +913,7 @@ yaboot_text_ui(void)
prom_perror(result, params.sysmap.file);
}
else {
- sysmap_base = prom_claim(loadinfo.base+loadinfo.memsize, 0x100000, 0);
+ sysmap_base = prom_claim(loadinfo.base+loadinfo.totalsize, 0x100000, 0);
if (sysmap_base == (void *)-1) {
prom_printf("Claim failed for sysmap memory\n");
sysmap_base = 0;
@@ -930,7 +930,7 @@ yaboot_text_ui(void)
if (sysmap_base) {
prom_printf("System.map loaded at %p, size: %lu Kbytes\n",
sysmap_base, sysmap_size >> 10);
- loadinfo.memsize += _ALIGN(0x100000, 0x1000);
+ loadinfo.totalsize += _ALIGN(0x100000, 0x1000);
} else {
prom_printf("System.map load failed !\n");
prom_pause();
@@ -964,7 +964,7 @@ yaboot_text_ui(void)
}
else {
#define INITRD_CHUNKSIZE 0x400000
- initrd_base = prom_claim(loadinfo.base+loadinfo.memsize, INITRD_CHUNKSIZE, 0);
+ initrd_base = prom_claim(loadinfo.base+loadinfo.totalsize, INITRD_CHUNKSIZE, 0);
if (initrd_base == (void *)-1) {
prom_printf("Claim failed for initrd memory\n");
initrd_base = 0;
@@ -989,10 +989,11 @@ yaboot_text_ui(void)
file.fs->close(&file);
memset(&file, 0, sizeof(file));
}
- if (initrd_base)
+ if (initrd_base) {
prom_printf("ramdisk loaded at %p, size: %lu Kbytes\n",
initrd_base, initrd_size >> 10);
- else {
+ loadinfo.totalsize += _ALIGN(initrd_size, 0x1000);
+ } else {
prom_printf("ramdisk load failed !\n");
prom_pause();
}
@@ -1001,7 +1002,7 @@ yaboot_text_ui(void)
DEBUG_F("setting kernel args to: %s\n", params.args);
prom_setargs(params.args);
DEBUG_F("flushing icache...");
- flush_icache_range ((long)loadinfo.base, (long)loadinfo.base+loadinfo.memsize);
+ flush_icache_range ((long)loadinfo.base, (long)loadinfo.base+loadinfo.totalsize);
DEBUG_F(" done\n");
if (flat_vmlinux) {
@@ -1012,40 +1013,24 @@ yaboot_text_ui(void)
* so we don't write it earlier. At this point, we should not
* use anything coming from the malloc pool.
*/
- birec = (struct bi_record *)_ALIGN(loadinfo.filesize+(1<<20)-1,(1<<20));
- /* We make sure it's mapped. We map only 64k for now, it's
- * plenty enough we don't claim since this precise memory
- * range may already be claimed by the malloc pool.
- */
- prom_map (birec, birec, 0x10000);
- DEBUG_F("birec at %p\n", birec);
- DEBUG_SLEEP;
-
- birec->tag = BI_FIRST;
- birec->size = sizeof(struct bi_record);
- birec = (struct bi_record *)((ulong)birec + birec->size);
+ birec = birec_alloc_bytes(BI_BOOTLOADER_ID, strlen("yaboot")+1);
+ sprintf((char *)birec->data, "yaboot");
- birec->tag = BI_BOOTLOADER_ID;
- sprintf( (char *)birec->data, "yaboot");
- birec->size = sizeof(struct bi_record) + strlen("yaboot") + 1;
- birec = (struct bi_record *)((ulong)birec + birec->size);
-
- birec->tag = BI_MACHTYPE;
+ birec = birec_alloc(BI_MACHTYPE, 1);
birec->data[0] = _machine;
- birec->size = sizeof(struct bi_record) + sizeof(ulong);
- birec = (struct bi_record *)((ulong)birec + birec->size);
if (sysmap_base) {
- birec->tag = BI_SYSMAP;
+ birec = birec_alloc(BI_SYSMAP, 2);
birec->data[0] = (ulong)sysmap_base;
birec->data[1] = sysmap_size;
- birec->size = sizeof(struct bi_record) + sizeof(ulong)*2;
- birec = (struct bi_record *)((ulong)birec + birec->size);
}
- birec->tag = BI_LAST;
- birec->size = sizeof(struct bi_record);
- birec = (struct bi_record *)((ulong)birec + birec->size);
+
+ if (initrd_base) {
+ birec = birec_alloc(BI_INITRD, 2);
+ birec->data[0] = (ulong)initrd_base;
+ birec->data[1] = initrd_size;
+ }
}
/* compute the kernel's entry point. */
@@ -1055,14 +1040,13 @@ yaboot_text_ui(void)
DEBUG_F("kernel: arg1 = %p,\n"
" arg2 = 0x%08lx,\n"
" prom = %p,\n"
- " arg4 = %d,\n"
+ " birecs = %p,\n"
" arg5 = %d\n\n",
- initrd_base + loadinfo.load_loc, initrd_size, prom, 0, 0);
-
+ initrd_base + loadinfo.load_loc, initrd_size, prom, birecs.first, 0);
DEBUG_F("Entering kernel...\n");
/* call the kernel with our stack. */
- kernel_entry(initrd_base + loadinfo.load_loc, initrd_size, prom, 0, 0);
+ kernel_entry(initrd_base + loadinfo.load_loc, initrd_size, prom, birecs.first, 0);
continue;
next:
; /* do nothing */
@@ -1148,9 +1132,9 @@ load_elf32(struct boot_file_t *file, loa
}
/* leave some room (1Mb) for boot infos */
- loadinfo->memsize = _ALIGN(loadinfo->memsize,(1<<20)) + 0x100000;
+ loadinfo->totalsize = _ALIGN(loadinfo->memsize,(1<<20)) + 0x100000;
/* Claim OF memory */
- DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);
+ DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->totalsize);
/* Determine whether we are trying to boot a vmlinux or some
* other binary image (eg, zImage). We load vmlinux's at
@@ -1168,7 +1152,7 @@ load_elf32(struct boot_file_t *file, loa
* other nearby addresses before giving up.
*/
for(addr=loadaddr; addr <= loadaddr * 8 ;addr+=0x100000) {
- loadinfo->base = prom_claim((void *)addr, loadinfo->memsize, 0);
+ loadinfo->base = prom_claim((void *)addr, loadinfo->totalsize, 0);
if (loadinfo->base != (void *)-1) break;
}
if (loadinfo->base == (void *)-1) {
@@ -1177,9 +1161,12 @@ load_elf32(struct boot_file_t *file, loa
}
DEBUG_F("After ELF parsing, load base: %p, mem_sz: 0x%08lx\n",
- loadinfo->base, loadinfo->memsize);
+ loadinfo->base, loadinfo->totalsize);
DEBUG_F(" wanted load base: 0x%08lx, mem_sz: 0x%08lx\n",
- loadaddr, loadinfo->memsize);
+ loadaddr, loadinfo->totalsize);
+
+ if (flat_vmlinux)
+ birecs_init(_ALIGN(loadinfo->filesize+(1<<20)-1,1<<20));
/* Load the program segments... */
p = ph;
@@ -1191,13 +1178,13 @@ load_elf32(struct boot_file_t *file, loa
/* Now, we skip to the image itself */
if ((*(file->fs->seek))(file, p->p_offset) != FILE_ERR_OK) {
prom_printf ("Seek error\n");
- prom_release(loadinfo->base, loadinfo->memsize);
+ prom_release(loadinfo->base, loadinfo->totalsize);
return 0;
}
offset = p->p_vaddr - loadinfo->load_loc;
if ((*(file->fs->read))(file, p->p_filesz, loadinfo->base+offset) != p->p_filesz) {
prom_printf ("Read failed\n");
- prom_release(loadinfo->base, loadinfo->memsize);
+ prom_release(loadinfo->base, loadinfo->totalsize);
return 0;
}
}
@@ -1227,9 +1214,9 @@ load_elf64(struct boot_file_t *file, loa
DEBUG_F(" e.e_type = %d\n", (int)e->e_type);
DEBUG_F(" e.e_machine = %d\n", (int)e->e_machine);
DEBUG_F(" e.e_version = %d\n", (int)e->e_version);
- DEBUG_F(" e.e_entry = 0x%016lx\n", (long)e->e_entry);
- DEBUG_F(" e.e_phoff = 0x%016lx\n", (long)e->e_phoff);
- DEBUG_F(" e.e_shoff = 0x%016lx\n", (long)e->e_shoff);
+ DEBUG_F(" e.e_entry = 0x%016Lx\n", (long long)e->e_entry);
+ DEBUG_F(" e.e_phoff = 0x%016Lx\n", (long long)e->e_phoff);
+ DEBUG_F(" e.e_shoff = 0x%016Lx\n", (long long)e->e_shoff);
DEBUG_F(" e.e_flags = %d\n", (int)e->e_flags);
DEBUG_F(" e.e_ehsize = 0x%08x\n", (int)e->e_ehsize);
DEBUG_F(" e.e_phentsize = 0x%08x\n", (int)e->e_phentsize);
@@ -1287,9 +1274,9 @@ load_elf64(struct boot_file_t *file, loa
}
/* leave some room (1Mb) for boot infos */
- loadinfo->memsize = _ALIGN(loadinfo->memsize,(1<<20)) + 0x100000;
+ loadinfo->totalsize = _ALIGN(loadinfo->memsize,(1<<20)) + 0x100000;
/* Claim OF memory */
- DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);
+ DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->totalsize);
/* Determine whether we are trying to boot a vmlinux or some
* other binary image (eg, zImage). We load vmlinux's at
@@ -1307,7 +1294,7 @@ load_elf64(struct boot_file_t *file, loa
* other nearby addresses before giving up.
*/
for(addr=loadaddr; addr <= loadaddr * 8 ;addr+=0x100000) {
- loadinfo->base = prom_claim((void *)addr, loadinfo->memsize, 0);
+ loadinfo->base = prom_claim((void *)addr, loadinfo->totalsize, 0);
if (loadinfo->base != (void *)-1) break;
}
if (loadinfo->base == (void *)-1) {
@@ -1316,9 +1303,12 @@ load_elf64(struct boot_file_t *file, loa
}
DEBUG_F("After ELF parsing, load base: %p, mem_sz: 0x%08lx\n",
- loadinfo->base, loadinfo->memsize);
+ loadinfo->base, loadinfo->totalsize);
DEBUG_F(" wanted load base: 0x%08lx, mem_sz: 0x%08lx\n",
- loadaddr, loadinfo->memsize);
+ loadaddr, loadinfo->totalsize);
+
+ if (flat_vmlinux)
+ birecs_init(_ALIGN((unsigned long)loadinfo->base+loadinfo->memsize,0x1000));
/* Load the program segments... */
p = ph;
@@ -1330,13 +1320,13 @@ load_elf64(struct boot_file_t *file, loa
/* Now, we skip to the image itself */
if ((*(file->fs->seek))(file, p->p_offset) != FILE_ERR_OK) {
prom_printf ("Seek error\n");
- prom_release(loadinfo->base, loadinfo->memsize);
+ prom_release(loadinfo->base, loadinfo->totalsize);
return 0;
}
offset = p->p_vaddr - loadinfo->load_loc;
if ((*(file->fs->read))(file, p->p_filesz, loadinfo->base+offset) != p->p_filesz) {
prom_printf ("Read failed\n");
- prom_release(loadinfo->base, loadinfo->memsize);
+ prom_release(loadinfo->base, loadinfo->totalsize);
return 0;
}
}

View file

@ -1,21 +0,0 @@
--- yaboot-1.3.13/Makefile.ppc64 2005-09-14 20:01:12.920430616 -0400
+++ yaboot-1.3.13/Makefile 2005-09-14 20:01:21.090385992 -0400
@@ -36,7 +36,7 @@
# The flags for the yaboot binary.
#
-YBCFLAGS = -Os $(CFLAGS) -nostdinc -Wall -isystem `$(CC) -m32 -print-file-name=include` -fsigned-char
-YBCFLAGS += -DVERSION=\"${VERSION}${VERSIONEXTRA}\" #"
+YBCFLAGS = -Os $(CFLAGS) -m32 -nostdinc -Wall -isystem `$(CC) -m32 -print-file-name=include` -fsigned-char
+YBCFLAGS += -DVERSION="\"${VERSION}${VERSIONEXTRA}\"" #"
YBCFLAGS += -DTEXTADDR=$(TEXTADDR) -DDEBUG=$(DEBUG)
YBCFLAGS += -DMALLOCADDR=$(MALLOCADDR) -DMALLOCSIZE=$(MALLOCSIZE)
@@ -65,7 +65,7 @@
# Link flags
#
-LFLAGS = -Ttext $(TEXTADDR) -Bstatic -melf32ppclinux
+LFLAGS = -Ttext $(TEXTADDR) -Bstatic
# Libraries
#
LLIBS = -lext2fs

View file

@ -1,348 +0,0 @@
Summary: Linux bootloader for Power Macintosh "New World" computers.
Name: yaboot
Version: 1.3.14
Release: 3%{?dist}
License: GPL
Group: System Environment/Base
Source: http://yaboot.ozlabs.org/releases/yaboot-%{version}.tar.gz
Source1: efika.forth
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.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.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
Patch17: yaboot-1.3.13-pegasos-claim.patch
Patch18: yaboot-1.3.13-pegasos-ext2.patch
Patch19: yaboot-1.3.13-confarg.patch
Patch20: yaboot-1.3.13-ofpath-pegasos.patch
Patch21: yaboot-1.3.13-pegasos-serial.patch
Patch22: yaboot-1.3.13-allow-deep-mntpoint.patch
Patch23: yaboot-1.3.13-malloc.patch
Patch24: yaboot-1.3.13-telnet.patch
Patch25: yaboot-1.3.13-netboot.patch
Patch26: yaboot-1.3.13-printversion.patch
Patch27: yaboot-ppc64.patch
Patch28: yaboot-1.3.13-multisata.patch
Patch29: yaboot-1.3.13-dontwritehome.patch
Patch30: yaboot-1.3.12-addnote.patch
Patch31: yaboot-1.3.13-ofpath-firewire-usb.patch
Patch32: yaboot-1.3.13-bplan.patch
URL: http://yaboot.ozlabs.org/
BuildRoot: %{_tmppath}/%{name}-root
Obsoletes: ybin
ExclusiveArch: ppc ppc64
Requires: hfsutils
BuildRequires: e2fsprogs-devel
%description
yaboot is a bootloader for PowerPC machines which works on New World ROM
machines (Rev. A iMac and newer) and runs directly from Open Firmware,
eliminating the need for Mac OS.
yaboot can also bootload IBM pSeries machines.
%prep
%setup -q
%patch1 -p0
%patch2 -p1
%patch3 -p1
%patch4 -p1 -b .yabootconfig
#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 .manpage
#%patch12 -p1 -b .gcc34
#%patch13 -p1 -b .amigaparts
#%patch14 -p1 -b .swraid1
#%patch15 -p1 -b .nobootx
#%patch16 -p1 -b .swraid2
%patch17 -p1 -b .pegasos
%patch18 -p1 -b .ext2
#%patch19 -p1 -b .confarg
#%patch20 -p1 -b .ofpath
%patch21 -p1 -b .pegasos-serial
%patch22 -p1 -b .deepmnt
#%patch23 -p1 -b .malloc
#patch24 -p1 -b .telnet
#%patch25 -p1 -b .netboot
#%patch26 -p1 -b .printversion
%patch27 -p1 -b .ppc64
#%patch28 -p1 -b .multisata
%patch29 -p1 -b .bootwrite
#%patch30 -p1 -b .addnote
#%patch31 -p1 -b .firewire
#%patch32 -p1 -b .bplan
%build
make VERSIONEXTRA='\ (Red Hat %version-%release)'
%install
%makeinstall ROOT=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=share/man SBINDIR=/sbin
rm -f $RPM_BUILD_ROOT/etc/yaboot.conf
touch $RPM_BUILD_ROOT/etc/yaboot.conf
mkdir -p $RPM_BUILD_ROOT/boot
install -m0644 %{SOURCE1} $RPM_BUILD_ROOT/boot/efika.forth
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc COPYING README* doc/*
/boot/efika.forth
/sbin/ofpath
/sbin/ybin
/sbin/yabootconfig
/sbin/mkofboot
/usr/lib/yaboot/addnote
/usr/lib/yaboot/ofboot
/usr/lib/yaboot/yaboot
%{_mandir}/man8/bootstrap.8.gz
%{_mandir}/man8/mkofboot.8.gz
%{_mandir}/man8/ofpath.8.gz
%{_mandir}/man8/yaboot.8.gz
%{_mandir}/man8/yabootconfig.8.gz
%{_mandir}/man8/ybin.8.gz
%{_mandir}/man5/yaboot.conf.5.gz
%ghost %config(noreplace) %{_sysconfdir}/yaboot.conf
%changelog
* Wed Apr 16 2008 Roman Rakus <rrakus@redhat.cz> - 1.3.14-3
- Upstream 1.3.14
* Thu Mar 27 2008 David Woodhouse <dwmw2@redhat.com> - 1.3.13-11
- Correct off-by-one error in Amiga partition numbers
* Thu Mar 27 2008 David Woodhouse <dwmw2@redhat.com> - 1.3.13-10
- Don't increment partition number to work around bplan firmware
brokenness when the config file was specified on the command line
* Fri Feb 08 2008 David Cantrell <dcantrell@redhat.com> - 1.3.13-9
- Rebuild for gcc-4.3
* Wed Nov 28 2007 David Woodhouse <dwmw2@redhat.com> - 1.3.13-8
- Correct default config file location on Efika
- Disable new USB bindings in efika.forth for now
* Tue Nov 27 2007 David Woodhouse <dwmw2@redhat.com> - 1.3.13-7
- Add efika.forth for fixing up Efika device-tree
* Tue Nov 27 2007 David Woodhouse <dwmw2@redhat.com> - 1.3.13-6
- Detect broken bplan firmware and don't add ":0" to block device names
* Tue Aug 21 2007 David Cantrell <dcantrell@redhat.com> - 1.3.13-5
- Rebuild
* Thu Nov 16 2006 Paul Nasrat <pnasrat@redhat.com> - 1.3.13-4
- Add support for usb/firewire from Alex Kanavin (#208768)
* Thu Nov 09 2006 Paul Nasrat <pnasrat@redhat.com> - 1.3.13-3
- Apply addnote patch (#184714)
* Wed Aug 23 2006 Paul Nasrat <pnasrat@redhat.com> - 1.3.13-2
- Fix ybin with SELinux (#201414)
* Mon Aug 21 2006 Paul Nasrat <pnasrat@redhat.com> - 1.3.13-1
- Fix multi disk G5 patch for all cases
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.3.13-0.18.1
- rebuild
* Tue Feb 21 2006 Paul Nasrat <pnasrat@redhat.com> - 1.3.13-0.18
- Drop telnet console patch for now (#182180)
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.3.13-0.17.1
- bump again for double-long bug on ppc(64)
* Thu Feb 09 2006 Paul Nasrat <pnasrat@redhat.com> - 1.3.13-0.17
- Fix ofpath for multi-disk G5 (#180182)
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.3.13-0.16.2
- rebuilt for new gcc4.1 snapshot and glibc changes
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Wed Sep 14 2005 Jeremy Katz <katzj@redhat.com> - 1.3.13-0.16
- fix paths
* Wed Sep 14 2005 Jeremy Katz <katzj@redhat.com> - 1.3.13-0.15
- fix build on ppc64
* Wed Sep 14 2005 Paul Nasrat <pnasrat@redhat.com> - 1.3.13-0.14
- New netboot patch handling device=alias: for non network case
* Tue Sep 13 2005 David Woodhouse <dwmw2@redhat.com> - 1.3.13-0.13
- Print version-release of yaboot
* Mon Sep 12 2005 Paul Nasrat <pnasrat@redhat.com> - 1.3.13-0.12
- reworking of netboot patch (Nathan Lynch)
* Sat Aug 20 2005 Paul Nasrat <pnasrat@redhat.com> - 1.3.13-0.11
- drop netboot patch as mac cds fail to load yaboot.conf
* Wed Aug 17 2005 Paul Nasrat <pnasrat@redhat.com> - 1.3.13-0.10
- No colours on unsupported consoles (eg telnet)
- Improved pSeries netbooting (Nathan Lynch)
* Sun Aug 14 2005 David Woodhouse <dwmw2@redhat.com> - 1.3.13-0.9
- Try harder to allocate malloc region
* Thu Aug 11 2005 David Woodhouse <dwmw2@redhat.com> - 1.3.13-0.8
- Allow mntpoint to be more than one directory into the partition
as long as magicboot and nvram are not being used.
* Thu Aug 11 2005 David Woodhouse <dwmw2@redhat.com> - 1.3.13-0.7
- Fix error in swraid2 patch -- don't dereference NULL pointer.
* Tue Aug 9 2005 David Woodhouse <dwmw2@redhat.com> - 1.3.13-0.6
- Fix handling of prom 'read' method, to make Pegasos serial work
* Tue Aug 9 2005 David Woodhouse <dwmw2@redhat.com> - 1.3.13-0.5
- Fix Pegasos partition hack
* Tue Aug 9 2005 David Woodhouse <dwmw2@redhat.com> - 1.3.13-0.4
- Make default boot after timeout work again
- Pegasos disagrees about partition numbering
* Sat Jul 30 2005 David Woodhouse <dwmw2@redhat.com> - 1.3.13-0.3
- Accept config file path on command line
- Make ofpath work on Pegasos
* Fri Jul 29 2005 David Woodhouse <dwmw2@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
- Try dropping ppc64 initrd patch
* Tue Mar 15 2005 Paul Nasrat <pnasrat@redhat.com> - 1.3.12-9
- GCC 4 rebuild
* Wed Feb 02 2005 Paul Nasrat <pnasrat@redhat.com> - 1.3.12-8
- addnote support for IBM,RPA-Client-Config note (#145739)
- Patch to recognise l-lan as a network device
* Wed Jul 28 2004 Paul Nasrat <pnasrat@redhat.com> - 1.3.12-7
- Add yaboot.conf as ghost
* Sat Jul 10 2004 Paul Nasrat <pnasrat@redhat.com> - 1.3.12-6
- Rebuild
* Sat Jul 10 2004 Paul Nasrat <pnasrat@redhat.com> - 1.3.12-5
- Added hfsutils requires for pmac
* Wed Jun 23 2004 David Woodhouse <dwmw2@redhat.com> - 1.3.12-4
- Increase TFTP load buffer size to 8MiB.
* Fri Jun 18 2004 Jeremy Katz <katzj@redhat.com> - 1.3.12-3
- s/Copyright/License/
- fix build with gcc 3.4
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Mon May 24 2004 Paul Nasrat <pnasrat@redhat.com> 1.3.12-1
- update to 1.3.12
* Tue Apr 20 2004 David Woodhouse <dwmw2@redhat.com> 1.3.10-10
- make yabootconfig use parted if available
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Fri Aug 22 2003 Elliot Lee <sopwith@redhat.com> 1.3.10-8
- Build for rawhide
* Fri Jun 20 2003 Jeremy Katz <katzj@redhat.com> 1.3.10-7
- allow passing configfile name to yabootconfig with -C
* Wed Jun 18 2003 Jeremy Katz <katzj@redhat.com> 1.3.10-6
- don't ship (invalid) default yaboot.conf
- update to newer version of ppc64 initrd patch
* Mon Apr 28 2003 Jeremy Katz <katzj@redhat.com> 1.3.10-5
- clean up how yabootconfig adds stuff, do some rediff'ing
- install ybin, etc in /sbin instead of /usr/sbin (#83229)
* Wed Apr 23 2003 Jeremy Katz <katzj@redhat.com> 1.3.10-4
- make sure there's a newline at the end of yaboot.conf generated by
yabootconfig
* Wed Apr 9 2003 Jeremy Katz <katzj@redhat.com> 1.3.10-3
- try to read product name from /etc/redhat-release instead of hard coding
- add patch (from silo) to allow mounting dirty fs's instead of mounting
read-write
* Thu Apr 3 2003 Jeremy Katz <katzj@redhat.com> 1.3.10-2
- add patch from Peter Bergner <bergner@vnet.ibm.com> to add support for
ppc64 initrds (warning: breaks ppc32 initrds)
* Thu Mar 20 2003 Jeremy Katz <katzj@redhat.com> 1.3.10-1
- update to 1.3.10
- fix ofboot patch to use Red Hat Linux instead of Yellow Dog Linux
- include patch from Dan Burcaw for yabootconfig so that it can be used
from the installer
* Tue Jan 21 2003 Elliot Lee <sopwith@redhat.com> 1.3.8-1
- Update to new version
* Wed Dec 11 2002 Tim Powers <timp@redhat.com> 1.3.6-1b.2rh
- rebuild
- added ExclusiveArch
* Wed Mar 06 2002 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- modify for YDL 2.2
* Fri Dec 07 2001 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- update to 1.3.6
* Sat Oct 06 2001 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- update to 1.3.4
* Sun Sep 30 2001 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- updated to yaboot 1.3.3
* Tue Sep 25 2001 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- add makefile patch
* Sun Sep 23 2001 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- update to 1.3.1
- obsoletes ybin
* Thu Aug 08 2001 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- updated to 1.2.3 per Ben H's urgent announcement
- removed obsoleted patches
* Tue Jan 16 2001 Hollis Blanchard <hollis@terrasoftsolutions.com>
- hacked out bug preventing manual boot from yaboot prompt (may break CHRP)
- removed ybin's man pages
- moved to /usr/lib/yaboot for ybin, FHS compliance
- changed permissions to 644 (can't run yaboot under Linux)
* Sat Nov 18 2000 Hollis Blanchard <hollis@terrasoftsolutions.com>
- updated to yaboot 0.9
- added man pages from ybin
- added sample yaboot.conf and bootscript (and README's)
* Sun Feb 27 2000 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- modified for YDL
* Wed Jan 18 2000 Tom Rini <trini@kernel.crashing.org>
- created