Greetings. I've been talking about it for a while, and I've gotten a few people excited, so I figured it was time to actually release something useful.
I believe that there is a lot of power in coreboot for AMD customers, especially in the embedded market which my team supports. Part of that power is in the low cost and high visibility of the open source code, but also in the flexibility of the payload model. Now, for a very low cost a customer can get not only the hardware initialization, but also an blank page where they can add their own special, be it a fully fledged payload, or just an intermediary before loading an operating system.
This is where libpayload comes in - it abstracts away the icky bits of payload initialization, and gives the user a semblance of a normal C library that they can use to develop a payload without having to worry about re-implementing malloc() and printf() and all the other usual friends.
I am happy to release the first proof of concept for libpayload:
http://coreboot.org/~jcrouse/libpayload_0.1.tar.gz
This is a conglomeration of code from three projects - the payload initialization code from FILO, superb curses code from our good friend Uwe Hermann, and various libc and driver bits from coreboot-v3. I combined them together into a library, mixed kconfig into the mix and baked at 300F for 2 hours. This is proof of concept code for the most part, and I wouldn't go off and put this in your airplane autopilot quite yet, but its a good start.
And to celebrate the good start, how about something practical to go with it? Here is something I call coreinfo:
http://coreboot.org/~jcrouse/coreinfo_0.1.tar.gz
Coreinfo is a curses based payload that outputs lots of information about the CPU and system. Or rather, it will - for now it just shows the cpuid of the processor, and has a rather slick PCI device browser. The most important thing is that it shows that libpayload can be used for a relatively complex payload without really breathing hard. Here's a screenshot:
http://coreboot.org/~jcrouse/coreinfo_screenshot.png
So, please, enjoy. Flame me as needed, and once everybody has digested this for a bit, we'll meet back and discuss what the next step is. Obviously, I think more libc functions are needed, filesystem support is useful, and maybe even graphics are in our future.
Jordan
That is really cool :-)
ron
On 04/03/08 14:39 -0800, ron minnich wrote:
That is really cool :-)
I would like to point out that all the eye-candy is really thanks to Uwe and his awesome tinycurses implmentation, without which none of this would have been possible. printf() is good and all, but I prefer pretty colors.
Thanks, Uwe!
ron
-- coreboot mailing list coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
On Tue, Mar 04, 2008 at 03:45:35PM -0700, Jordan Crouse wrote:
On Tue, Mar 04, 2008 at 03:52:40PM -0700, Jordan Crouse wrote:
I would like to point out that all the eye-candy is really thanks to Uwe and his awesome tinycurses implmentation
Vielen Dank and Thank You!
This made my day which was otherwise not so good.
It is beautiful!
//Peter
Jordan Crouse wrote:
And to celebrate the good start, how about something practical to go with it? Here is something I call coreinfo:
Thanks!
I'll have to find out about the proper stdio.h include file or sprintf declaration.
When I use my /usr/include/stdio.h I get redefinitions of typedef ‘FILE’ and struct _IO_FILE
Otherwise without including stdio.h I see incompatible implicit declaration of built-in function ‘sprintf’
Martin
On 06/03/08 09:27 +0100, Martin Trautmann wrote:
Jordan Crouse wrote:
And to celebrate the good start, how about something practical to go with it? Here is something I call coreinfo:
Thanks!
I'll have to find out about the proper stdio.h include file or sprintf declaration.
When I use my /usr/include/stdio.h I get redefinitions of typedef ‘FILE’ and struct _IO_FILE
Otherwise without including stdio.h I see incompatible implicit declaration of built-in function ‘sprintf’
Oops - yep. sprintf is missing from the header file.
Add:
int sprintf(char * buf, const char *fmt, ...);
to include/libpayload.h
On Tue, Mar 04, 2008 at 03:45:35PM -0700, Jordan Crouse wrote:
I am happy to release the first proof of concept for libpayload:
Great stuff, thanks!
This is a conglomeration of code from three projects - the payload initialization code from FILO, superb curses code from our good friend Uwe Hermann, and various libc and driver bits from coreboot-v3. I combined them together into a library, mixed kconfig into the mix and baked at 300F for 2 hours. This is proof of concept code for the most part, and I wouldn't go off and put this in your airplane autopilot quite yet, but its a good start.
And to celebrate the good start, how about something practical to go with it? Here is something I call coreinfo:
I think Jordan tested this on SimNow, but I'm happy to confirm that it runs very nicely on real hardware, in my case on the ASUS A8V-E Deluxe.
FYI: We (or rather: mostly Jordan) are working on a fixed-up libpayload version which will be BSD-licensed, so commercial users can benefit too.
For that to work, I'm hereby relicensing all my code which is part of libpayload (tinycurses mostly) under the 3-clause BSD license. The plan is that the same will happen with code written by Jordan, and the rest of the currently non-BSD code which is not authored by us will be shamelessly replaced by code stolen from FreeBSD/OpenBSD/NetBSD and/or rewritten by us from scratch.
The goal is to have a small, fully-BSD libpayload soon, with each file having a clear license header. This should then probably go into svn, maybe under a new 'payloads' directory or so (where other libpayload-based payloads will also live, e.g. coreinfo, lbmenu, etc).
Also, I'll rework my (long-overdue) GSoC project from last year (lbmenu) to use libpayload after that is done, and beat it with a stick until it becomes reasonably suited for real-life usage.
Uwe.
On 07/03/08 00:45 +0100, Uwe Hermann wrote:
FYI: We (or rather: mostly Jordan) are working on a fixed-up libpayload version which will be BSD-licensed, so commercial users can benefit too.
For that to work, I'm hereby relicensing all my code which is part of libpayload (tinycurses mostly) under the 3-clause BSD license. The plan is that the same will happen with code written by Jordan, and the rest of the currently non-BSD code which is not authored by us will be shamelessly replaced by code stolen from FreeBSD/OpenBSD/NetBSD and/or rewritten by us from scratch.
Thanks Uwe!
To that end, here's our current status. If anybody out there is bored, pick a feature and start rewriting (or borrow from *BSD).
These are the files of questionable license status from FILO - these need to be replaced:
./libc/malloc.c ./include/elf_boot.h ./include/arch/io.h ./i386/context.c ./i386/context.h ./i386/segment.c ./i386/segment.h ./i386/switch.S
These are files of known status (all GPLv2) that have been borrowed from various projects. These either need to be replaced with BSD versions, or permission acquired to relicense them:
./libc/memory.c (from coreboot-v3) ./libc/string.c (from coreboot-v3) ./libc/printf.c (from the kernel) ./libc/ipchecksum.c (from coreboot-v3) ./include/checksum.h (from coreboot-v3) ./drivers/serial.c (from coreboot-v3)
Jordan