Hi,
@coresystemsgmbh; you're replying to a post I made on 31 Jul 2009 (give or take minor time zone differences), and almost 8 months have passed...
Not too long before I wrote my comments I attempted to get documentation about the interface between coreboot and payloads (on their mailing list), and failed. The best they could do is "read the source code" (even though the source code was being heavily changed at the time, and there was no way they could guarantee that any payload that worked one day would still work the next day, the next month or the next year). You can probably still find my emails and their replies in Coreboot's mailing list archive.
Since then, coreboot has done a lot more work.
Also note that the "GRUB2" payload didn't exist at the time (and the "GRUB2" project
still hasn't published an adequately usable multi-boot specification for "non-PC BIOS" computers - here's their
draft, but at least they *do* have a specification, sort of).
coresystemsgmbh wrote:Brendan wrote:
However, (if nothing has changed since last time I looked into it) the coreboot project seem to assume that the OS will use a boot loader (GRUB2, FILO, etc) and won't be in the ROM itself.
Sorry to say, but that is wrong, and has never been the case. coreboot started out as "LinuxBIOS" and hence started Linux directly from flash, without another boot loader. However, in many cases the OS is too big for available and supported NOR flash sizes, so that is where a boot loader comes in handy and loads the OS from a secondary device. Systems usually support 512KB-2MB (4-16MBit) flash parts these days. As long as the OS you want to put in flash is smaller than that, you are perfectly fine without boot loader.
Linux is 5 MiB or more (compressed) - over twice as big as the biggest flash part today (and probably 4 times larger than the biggest flash part that was available when LinuxBIOS first started). Of course coreboot itself takes up some of this space too.
Initially they wanted to do the minor modification on Linux to make it boot from flash (and thought that Linux would configure most of the chipset, etc). Then they found out it didn't fit and there's a large amount of "configure the chipset" that Linux doesn't do. Their "minor modifications" became a complete change of plans followed by years of work.
coresystemsgmbh wrote:Brendan wrote:
To get around that you'd need to write your own "payload" (basically a boot loader that will start your OS from ROM that runs after coreboot has done chipset initialization, etc), but the coreboot project refuse to write or provide any sort of specification that a payload can rely on, and you'd need to have a lot of conditional code and update your payload/boot loader every time anything in coreboot changes (which IMHO makes coreboot mostly useless for "boot the OS directly from ROM" situations, unless you want to spend most of your time updating/maintaining one boot loader for your OS rather than actually writing your OS).
Wrong, again, sorry. Coreboot uses two very defined interfaces between itself and its payload:
- It loads an ELF or Multiboot binary. So if your OS kernel is an ELF binary, coreboot can load it.
- It provides the coreboot table to its payloads. This table is well defined and contains all information needed by the payload to take full advantage of coreboot.
If the coreboot table is well defined, where can I find the specification that "well defines" it? Is
"Payload API" this wiki page what you're talking about?
At the time, I wanted a "payload specification", so that I could write a payload that complies with the specification and know that my payload will work in all (current and future) versions of coreboot that also comply with the specification. I did not want to write a payload that continually breaks because of changes to the "payload API", because this would be a nightmare for end-users (trying to figure out which version/s of coreboot are compatible with which version/s of my payload, and complaining when they get it wrong and their computer won't boot).
As far as I can tell, they have still failed to produce any such document.
They do have
"Libpayload", which might work (sort of) if I used C (and not assembler) and if my end users were forced to compile my payload before installing it (which is something I've always avoided - I never assume any end-user has a compiler). Een then, it's not an adequate substitute for a specification - nothing says that coreboot can't change libpayload any time they like, and break my code so that it fails to compile when end-users attempt to install my code.
Anyway, I gave up on coreboot back then, because they were too stupid to produce a specification, and too stupid too see why a specification is needed. I'm not convinced that's changed since (but I'd be happy to be proven wrong).
Cheers,
Brendan