Commit Graph

38 Commits

Author SHA1 Message Date
Mark Cave-Ayland
004dc4cf85 Fix up NVRAM settings for boot-device and boot-args.
This patch originally started as a fix for PPC, in that the NVRAM initialiser wasn't been run on startup (this is why printenv 
on PPC always showed much much less than on SPARC). However, it also showed up some inconsistent logic for boot device 
selection, which must also happen *before* boot is called in order for load to work correctly. With this patch applied, bootpath 
and bootargs are set from boot-device and boot-args respectively on startup for SPARC32, SPARC64 and PPC.

Note: there is a small chance SPARC32 may break on some images - please let me know if it does.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@805 f158a5a8-5612-0410-a976-696ce0be7e32
2010-06-28 11:58:28 +00:00
Mark Cave-Ayland
1264ad95d2 Create a brand new ELF loader based upon arch/*/elfload.c and libopenbios/elfload.c combined together in libopenbios. This means
that each arch no longer needs its own ELF loader implementation.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@710 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-27 10:57:03 +00:00
Mark Cave-Ayland
92f8310ff7 Split nvram.h into its proper two components - one for the arch-specific functions and another for the package functions.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@698 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 20:34:01 +00:00
Mark Cave-Ayland
1dbe55b8e4 Move the basic OpenBIOS configuration header files from include/openbios to include/.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@695 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 17:19:58 +00:00
Mark Cave-Ayland
f84dd73af4 Fix the sys_info.h header file so it doesn't reference functions both inside and outside of libopenbios, and move the firmware
configuration header file to include/arch/common. Following through the code showed that elfnote.c and linuxbios.c were being 
used by sys_info and so these are also renamed to elf_info.c and linuxbios_info.c for clarity.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@693 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 16:09:44 +00:00
Mark Cave-Ayland
4a2c065e4f Move the libopenbios header files into include/libopenbios to synchronise with the code directory structure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@691 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 15:05:53 +00:00
Laurent Vivier
5398f1f5e3 Correct typo
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@600 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-08 23:43:19 +00:00
Laurent Vivier
b9486926d9 ppc: if "\\:tbxi" (mac) fails, try "ppc\bootinfo.txt" (chrp).
This is needed to load the bootloader of OpenBSD.

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@590 f158a5a8-5612-0410-a976-696ce0be7e32
2009-10-19 23:02:10 +00:00
Laurent Vivier
6e47ae9e09 ppc: simplify boot by using load and go.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@589 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-21 23:12:02 +00:00
Laurent Vivier
719271835f Add bootinfo-loader.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@584 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-20 20:15:46 +00:00
Laurent Vivier
38283e32ac Use the load method to load and execute CHRP script.
This adds a better support of Apple BootX script.
However, "init-program" and "go" are always missing to be able to really boot with BootX.

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@576 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-01 23:44:24 +00:00
Laurent Vivier
2db781a446 Replace yaboot_startup() by newworld_boot() which implements generic
CHRP boot method.
It finds the CHRP bootscript using the file attribute 'tbxi' and 
the blessed directory.

This method allows to boot easily Fedora (the bitness detection is done
by the script and yaboot is called with the according yaboot.conf) but
openSUSE is broken (you have to use "boot cd:,\suseboot\yaboot")
Debian works well (as usual...).
The openSUSE needs the missing forth words: "load" and "go".
The MacOS bootloader (BootX) is also loaded automatically but forth 
script is too complex to be executed correctly.

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@571 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-29 15:43:00 +00:00
Laurent Vivier
1ced7923e7 For mac-parts, when no partition number is provided, open the first HFS
partition (type is "Apple_HFS").

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@570 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-29 15:24:49 +00:00
Laurent Vivier
6a16562087 This patch allows to boot from bootsector of first bootable partition
using "boot hd:%BOOT"

As explained in:

"PowerPC Microprocessor Common Hardware Reference Platform (CHRP)
System binding to:
IEEE Std 1275-1994 Standard for Boot (Initialization, Configuration)
Firmware
Revision: 1.8"

"Chapter 11.1.2. Open Method Algorith"

Signed-off-by: Laurent Vivier <Laurent@vivier.info>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@552 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-12 19:55:31 +00:00
Steven Noonan
4636eeeedf There are numerous places where using 'ELF_DPRINTF' does not make
sense, because the loader does not use ELF binaries or is not
directly involved in loading them.

Created a generic SUBSYS_PRINTF macro, as well as loader-specific
ELF_DPRINTF, CHRP_DPRINTF, and YABOOT_DPRINTF macros.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@545 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-10 19:57:43 +00:00
Steven Noonan
a734a346f2 try_chrp_script() now accepts a third parameter which indicates the
script to be loaded and parsed. It will also terminate parsing on
the '</chrp-boot>' tag, which makes locating embedded data after
the script easier.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>

(laurent: remove XCOFF placeholder)



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@544 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-10 19:50:04 +00:00
Laurent Vivier
bf92aa1fbf quik_startup() uses now encode_bootpath() instead of calling
find_dev()/set_property().



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@541 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-08 21:56:26 +00:00
Blue Swirl
a0c398f24b Delete some unused macros detected with -Wp,-Wunused-macros use
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@482 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-28 14:28:16 +00:00
Blue Swirl
b098842b5b Use firmware configuration instead of NVRAM (initial patch by Aurelien Jarno)
Use firmware configuration device for boot device, kernel, initrd and
kernel command line parameters on PPC, Sparc32 and Sparc64.


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@479 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-08 09:45:25 +00:00
Laurent Vivier
21507bfb5b Extract "bootargs" from "boot" command line.
It is needed to boot Fedora-10 as we must specify the path to the yaboot.conf.

To boot Fedora:

boot cd: conf=cd:,\ppc\ppc32\yaboot.conf

so "bootpath" is "cd:", and "bootargs" is "conf=cd:,\ppc\ppc32\yaboot.conf"



git-svn-id: svn://coreboot.org/openbios/openbios-devel@456 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-18 13:58:35 +00:00
Laurent Vivier
f0daea0151 In "<boot-script>", from bootinfo.txt, decode all bootinfo entities: device,
partition, directory, filename, full-path.

(as defined in "PowerPC Microprocessor CHRP binding r1.8", chapter 3.1.6.1.)



git-svn-id: svn://coreboot.org/openbios/openbios-devel@453 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-15 20:20:55 +00:00
Laurent Vivier
b47d10c5e2 Extract correctly "&device;" and "&partition;" from bootinfo.txt.
To keep compatibility with yaboot (tested with debian install CD), 
put in bootpath a fully qualified path (<device>:<partition>,<filename>)



git-svn-id: svn://coreboot.org/openbios/openbios-devel@442 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-05 00:05:58 +00:00
Stefan Assmann
bf6f68f96f Add an enhancement to deal with configurations in /ppc/bootinfo.txt like
<boot-script>boot &device;:1,\suseboot\yaboot.ibm</boot-script>.
This would evaluate to boot cd:0,1\suseboot\yaboot.ibm which results
in a file not found error (seen on many openSUSE ppc media).

With this patch the above will evaluate to boot cd:0,\suseboot\yaboot.ibm
and yaboot will load.

Signed-off-by: Stefan Assmann <sassmann@suse.de>



git-svn-id: svn://coreboot.org/openbios/openbios-devel@429 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-29 10:51:25 +00:00
Laurent Vivier
f336ed1793 ide: allow to have multiple instances
git-svn-id: svn://coreboot.org/openbios/openbios-devel@411 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-15 12:55:31 +00:00
Laurent Vivier
b599634ceb Don't try to start Quik from hard disk if booting from the CD-ROM
(Aurelien Jarno)


git-svn-id: svn://coreboot.org/openbios/openbios-devel@405 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 20:07:43 +00:00
Laurent Vivier
f9a9554ba5 use the kernel arguments when using -kernel-append (Aurelien Jarno)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@404 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 20:02:40 +00:00
Laurent Vivier
5fde3e6ee3 Remove compilation warning
git-svn-id: svn://coreboot.org/openbios/openbios-devel@386 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-11 00:27:48 +00:00
Laurent Vivier
3888c71730 Add quik support (oldworld bootloader).
Load two first sectors of the partition and check quik signature ('QUIK').
If it is quik, execute it to boot.

Currently partition and parameter are hardcoded to "hd:2" and "Linux".



git-svn-id: svn://coreboot.org/openbios/openbios-devel@385 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-11 00:19:02 +00:00
Blue Swirl
9b865de74b Pass initrd parameters to preloaded Linux kernel like Yaboot does
git-svn-id: svn://coreboot.org/openbios/openbios-devel@349 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-04 19:25:41 +00:00
Blue Swirl
1beaaac8fa Allow yaboot to read files from cdrom (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@325 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-25 10:38:40 +00:00
Blue Swirl
612dd8d75d Change cdrom alias (original patch by Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@324 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-25 10:36:19 +00:00
Blue Swirl
18cd147df3 Get machine ID, boot device, preloaded kernel parameters and UUID from Qemu
configuration device and NVRAM.


git-svn-id: svn://coreboot.org/openbios/openbios-devel@315 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 11:57:36 +00:00
Blue Swirl
882edb55de Parse bootscript in ppc\bootinfo.txt
git-svn-id: svn://coreboot.org/openbios/openbios-devel@314 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 11:54:25 +00:00
Blue Swirl
fa30d06c1d Use boot-device and boot-args NVRAM variables, fix warnings when debugging
git-svn-id: svn://coreboot.org/openbios/openbios-devel@313 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 11:53:13 +00:00
Blue Swirl
e7b906fd86 Fix gcc and Sparse warnings generated by r301
git-svn-id: svn://coreboot.org/openbios/openbios-devel@302 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-21 09:15:57 +00:00
Laurent Vivier
e11b806d1c qemu better support
This patches copies all needed ppc files to qemu and modifies them.

The generated OpenBIOS image must be loaded at adresse 0xfff00000 by  Qemu.

It is able to load Yaboot from disk and Yaboot is able to load Linux, but Linux hangs somewhere... of course it needs more work (but this cleans up my patch queue).

Thank you to Blue Swirl and Aurelien Jarno for their help.

Signed-off-by: Laurent Vivier <Laurent@lvivier.info>


git-svn-id: svn://coreboot.org/openbios/openbios-devel@301 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-21 08:30:42 +00:00
Blue Swirl
7e21fc929d Fix almost all remaining warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@294 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-20 17:15:47 +00:00
Laurent Vivier
fe82df644b Create arch/ppc/qemu by copying arch/ppc/pearpc.
Signed-off-by: Laurent Vivier <Laurent@lvivier.info> 
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/openbios-devel@253 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-24 12:16:22 +00:00