Paul Nasrat [Mon, 3 Dec 2007 12:41:42 +0000 (12:41 +0000)]
These patch provides the function of load a alternative initrd file
specified by the user via Yaboot prompt. To load the new file, just use
the "initrd=<name_of_file>" command. The <name_of_file> could include
all the directory path to the file.
Using only the "initrd" command, Yaboot will load the default kernel
specified in the configuration file and the initrd file specified by the
user. The user can, also, specify an initrd file to any other label of
the configuration file, just adding the "initrd" command before the
label's name.
Signed-off-by: Paulo Ricardo Paz Vital <vital@br.ibm.com>
Paul Nasrat [Mon, 3 Dec 2007 12:37:10 +0000 (12:37 +0000)]
The patch from Scott Moser moves the "search-for-prom_claim'able" routine that
was present in load_elf64 and load_elf32 to a function named
prom_claim_chunk. This reduces the code-snippit duplication and makes
the function available for of_net_open.
Paul Nasrat [Fri, 17 Aug 2007 14:22:00 +0000 (15:22 +0100)]
On some of the larger kernels we are starting to see a space squeeze.
The kernel is currently being put at 20MBs and on some of the newer
pSeries systems we are getting real-bases at 32MBs (plus AIX 5.3 has
real-base at 32MB, so if AIX is ever booted, everything gets shifted).
If the uncompressed kernel+initrd is larger than 12MBs then we see
truncation (typical on install kernels).
This patch moves the KERNELADDR to 0x00C00000 (12MB). If real-base is
12MB and is loaed there, yaboot will keep going up by a megabyte until
prom_claim finds space. And the uncompressed kernel should be
indifferent where it's loaded because there's nothing at 32MB (ie it
will operate as it does today). If OF is loaded at 32MB then the 12MB
region is free and the uncompressed kernel will have more space to grow.
I have tested this on numerous pSeries boxes. I have not tested on
anything else.
Paul Nasrat [Thu, 17 May 2007 12:54:20 +0000 (13:54 +0100)]
Netboot fixes:
- the ARRAY_SIZE macro is no more needed here,
- use of cfgpath to have the actual config path to apply for mac *and* ip
lookup,
- no need to free a buffer big enough, and besides malloc(9) was not
enough ("/etc/" missed),
- use of intermediate length variables to avoid unneeded calls to strlen()
and strrchr().
benoit.guillon <benoit.guillon@tele2.fr>
Paul Nasrat [Tue, 15 May 2007 13:24:06 +0000 (14:24 +0100)]
load_my_config_file() modifications in yaboot.c
This second part, deletes the netbooting like PXE algorithm from
yaboot.c (reallocated in prom.c) and sets the use of prom_get_netinfo(),
prom_get_mac (), prom_get_ip () functions in load_my_config_file()
function to netbooting work like before the changes.
Signed-off-by: Paulo Ricardo Paz Vital <vital@br.ibm.com>
Paul Nasrat [Tue, 15 May 2007 13:23:26 +0000 (14:23 +0100)]
prom functions
This first part creates the prom_get_netinfo (), prom_get_mac (),
prom_get_ip () functions, and some structures to get the necessary
information about the MAC and IP addresses.
Actually, this is a reallocation of netbooting like PXE algorithm wrote
by Benoit Guillon [1], to be used by any other part of Yaboot to get the
netbooting information.
Paul Nasrat [Tue, 15 May 2007 13:14:43 +0000 (14:14 +0100)]
User-specified config file on Yaboot's prompt
This patch clears out the kernel image list before loading a new config file.
Leonardo Rangel lrangel at linux.vnet.ibm.com
Paul Nasrat [Thu, 19 Apr 2007 09:14:24 +0000 (10:14 +0100)]
ybin userland interface for specifying bootonce
Add an option to ybin called "--bootonce" that takes exactly one
argument, the label of the kernel to boot exactly once, on next reboot.
Do some sanity checking. Grep through the yaboot config file to make
sure that label=WHATEVER exists somewhere, bail if not. Try to prune
out comment lines. Perhaps this might be implemented better. It worked
will in my testing, though.
Set the boot-once OF environment variable to the --bootonce value. Due
to the previously mentioned nvsetenv bug, this will fail silently if
you're trying to set boot-once on a system where boot-once doesn't
already exist in nvram. Thus, immediately after doing the set, try and
read it back out of nvsetenv and make sure it landed there. Bail if
not.
Paul Nasrat [Thu, 19 Apr 2007 09:13:43 +0000 (10:13 +0100)]
yaboot menu user interface
This patch allows for denoting a kernel label as a "boot-once" label
when printing the menu of labels.
The label flagged as default is marked with an asterisk (*). If a label
matches the global bootoncelabel, I'm marking it with an ampersand (&).
I'm ambivalent about the symbol used here, or even if it is. But I
found this bit useful when debugging and testing the functionality, and
it's trivial to add cleanly. I chose ampersand because it's immediately
left of the asterisk on my keyboard.
Paul Nasrat [Thu, 19 Apr 2007 09:12:22 +0000 (10:12 +0100)]
read boot-once, zero out, set bootoncelabel as default
This patch reads the boot-once environment variable from Open Firmware
and stores in a global variable, "bootoncelabel".
It then unconditionally zeros out the boot-once environment variable.
*** Note that according to 1275, setprop will create a specified
environment variable if it doesn't already exist. A bug in nvsetenv
causes it to fail silently if you try to set an OF environment variable
that does not already exist. However, simply booting a system running a
yaboot with this patch set compiled in will in fact create the boot-once
environment variable, which nvsetenv can later set and reset.
Paul Nasrat [Thu, 19 Apr 2007 09:11:19 +0000 (10:11 +0100)]
prom setprop primatives
This patch creates the prom_set_options() and prom_setprop() functions.
These are precise mirrors of their read-only brothers,
prom_get_options() and prom_getprop(), implemented as defined in the
Open Firmware 1275 spec.
The prom_set_options() function will be used to zero out the boot-once
label unconditionally after reading it.
Paul Nasrat [Fri, 2 Mar 2007 16:26:18 +0000 (16:26 +0000)]
Certain levels of IBM firmware will allow the system to boot from an
iscsi target. System OFW accomplishes this by setting up a virtual
disk device with parameters. These parameters, when passed back to
OFW by yaboot, directs the FW to use virtual device over the ethernet
port that will then access iscsi target as a block device. This patch
extracts those parameters from the property of the virtual device and
passes them back to OFW to indicate the kernel is to be retrieved via
the iscsi protocol.
Signed-off-by: Doug Maxey <dwm@austin.ibm.com> Cc: Ben Herrenscmidt <benh@kernel.crashing.org> Cc: Mike Christie <michaelc@cs.wisc.edu>
* second/file.c: Replace bootpath parser for netboot cases, the new
one should (hopefully) correctly handle most/all netboot
situations. (Nathan Lynch)
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-88
Ethan Benson [Wed, 3 Aug 2005 03:12:29 +0000 (03:12 +0000)]
Bugfix to patch-83
* Correct dereference of NULL in RAID partition patch (patch-83).
(Patch from Dustin).
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-85
* Pretend like we actually manage memory properly by calling free() on
things which were malloc()'ed or strdup()'ed.
(Patch from Dustin Kirkland).
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-84
* Support reading of type RAID partitions, except from fs_of.
This only works on x86 partition tables, Pmac partition tables will
need alternate methods. (Patch from Dustin Kirkland).
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-83
* ybin/ofpath: Remove check for broken-by-BootX device-tree, it no
longer works under current 2.6 kernels and nobody attempts to use
BootX anymore.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-82
* ybin/ybin: Allow for multiple bootstrap partitions. Patch by Dustin
Kirkland. May not fully work on PMAC hardware.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-81
* second/fs_of.c: increase tftp buffer to 6MB. This is as far as it
can go.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-73
* ybin/yabootconfig: Add support for LABEL= and UUID= in
/etc/fstab. (Colin Watson)
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-72
Ethan Benson [Sat, 8 May 2004 22:04:51 +0000 (22:04 +0000)]
Add additional check on /dev/nvram to avoid misleading error message
* ybin/ybin: Add additional check on /dev/nvram, if we cannot read a
couple bytes report it as broken. This avoids misleading
`Incompatible nvsetenv' message on kernels without /dev/nvram support.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-71
Ethan Benson [Sat, 8 May 2004 06:38:44 +0000 (06:38 +0000)]
Fix several ofpath error messages going to stdout rather then stderr
* ybin/ofpath: Fix several error messages mistakenly written to stdout
rather then stderr. (Thanks to Colin Watson for noticing)
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-70
* ybin/yabootconfig: If detected kernel appears to have a corresponding
initrd image then include an initrd= line in generated yaboot.conf.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-69
Ethan Benson [Sun, 28 Mar 2004 05:02:03 +0000 (05:02 +0000)]
Fix ofpath SATA support and sysfs detection
* ybin/ofpath: Support newwer kernels which call the driver sata_svw,
instead of ata-k2.
* ybin/ofpath: Detect sysfs mount correctly.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-67
Ethan Benson [Sun, 22 Feb 2004 13:15:30 +0000 (13:15 +0000)]
Add caveat regarding UFS to yaboot howto
* Add caveat regarding UFS to temporary bootloader setup chapter of
the yaboot-howto (Thanks to Brian Sammon, and to Stefan Pfetzing for
the German translation).
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-65
Ethan Benson [Mon, 17 Nov 2003 04:35:21 +0000 (04:35 +0000)]
Fix ofpath for `scsi' ide controllers
* ybin/ofpath:
- Generate correct paths for IDE controllers which
pretend to be scsi.
- Correct error message regarding CONFIG_SCSI_PROC_FS
(=y not =n).
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-59
Ethan Benson [Mon, 10 Nov 2003 10:23:36 +0000 (10:23 +0000)]
Fix ofpath 2.6 /proc/scsi check
* ybin/ofpath: Move return to proper place so ofpath doesn't exit
silently when scsi appears to not be installed and the system is
running a 2.6 kernel.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-58
Ethan Benson [Mon, 10 Nov 2003 08:52:02 +0000 (08:52 +0000)]
Detect lack of CONFIG_SCSI_PROC_FS in ofpath on 2.6 systems
* ybin/ofpath: Under 2.6 systems detect lack of CONFIG_SCSI_PROC_FS in
kernel configuration and print error message indicating its required.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-57
Ethan Benson [Thu, 6 Nov 2003 07:28:26 +0000 (07:28 +0000)]
Add PowerMac G5 SATA support to ofpath
* ybin/ofpath: Add support for SATA drives found in the PowerMac G5.
(Olof Johansson <offe@localnet.sh>)
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-56
Ethan Benson [Tue, 4 Nov 2003 09:19:11 +0000 (09:19 +0000)]
Use OpenFirmware RELEASE method
* second/prom.c: Use OpenFirmware's RELEASE method instead of the
broken crap hack which broke on more recent Apple OpenFirmware.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-53
Ethan Benson [Wed, 12 Feb 2003 08:55:45 +0000 (08:55 +0000)]
Prep 1.3.9 release
* Prep 1.3.9 release:
- Set version numbers to 1.3.9.
- Finalize changelog.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-49
Ethan Benson [Mon, 10 Feb 2003 09:55:05 +0000 (09:55 +0000)]
Fix botched IBM patch (multiple partition handling on rs6k)
* IBM file.c patch is broken, fix file.c so yaboot finds its config on
systems with more then one primary GNU/Linux filesystem partition.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-48
Ethan Benson [Sun, 9 Feb 2003 05:28:41 +0000 (05:28 +0000)]
Update first stage to be compatible with new Macs
* Mark first stage loader compatible with new MacOS9-free PowerMacs so
it will be accepted by OpenFirmware.
* Update copyrights to include 2003.
* Version 1.3.9-UNRELEASED.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-47
Ethan Benson [Wed, 27 Nov 2002 09:35:34 +0000 (09:35 +0000)]
Add 'kernel too old' warning to ofpath
* ofpath: On Windtunnel warn when the kernel is too old for proper
support. The warning message is sent to stderr so it will not
interfere with scripts or other automated invocation of ofpath.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-44
Ethan Benson [Tue, 19 Nov 2002 11:32:49 +0000 (11:32 +0000)]
Fix readlink fallback
* ofpath: fallback shell function for readlink was broken. Fixes
IDEBUS==NULL on broken systems that lack /bin/readlink.
* Prepare 1.3.8-rc3.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-42
Ethan Benson [Mon, 18 Nov 2002 10:38:53 +0000 (10:38 +0000)]
handle ide device nodes up to hdp
* ofpath: handle ide device nodes up to /dev/hdp (16 disks, current
max in the kernel).
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-41
Ethan Benson [Sun, 17 Nov 2002 23:33:17 +0000 (23:33 +0000)]
Add support for IDE controllers with identity crisis
* ofpath: Add support for IDE controllers that pretend they are scsi.
* Prepare 1.3.8-rc2.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-40
Ethan Benson [Sun, 17 Nov 2002 03:13:10 +0000 (03:13 +0000)]
Prepare 1.3.8-rc1
* Prefer $PATH_PREFIX/usr/sbin/ofpath if it exists.
* yabootconfig: Add append="video=ofonly" if the running kernel
was booted with it. This solves user confusion when they boot an installer with an
install-safe label, install, then reboot the new system to find the
console display doesn't work. This only occurs if user does not
specify --kernel-args so it will not interfere with distro installers
which handle this themselves.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-39
Ethan Benson [Wed, 30 Oct 2002 10:32:14 +0000 (10:32 +0000)]
Update ofpath for new devspec export in /proc
* ofpath: /proc/ide/pmac is dead, the OpenFirmware devspec is now
exported to /proc/ide/ideX/devspec, ofpath now uses that.
- this change is not tested, some additional sanity checks are still
needed.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-36
Ethan Benson [Sun, 27 Oct 2002 00:57:19 +0000 (00:57 +0000)]
Change ofpath to use /proc/ide/of1275 instead of /proc/ide/pmac
* ofpath: the current incarnation of /proc/ide/pmac is not supported
by ofpath, and I believe this file should be renamed since it should
not be inherently pmac specific. When the format of this file is
updated it can be renamed at the same time.
git-archimport-id: erbenson@alaska.net--public/yaboot--devel--1.3--patch-35