coreboot-kgpe-d16/payloads/libpayload
Gabe Black e88e1ab864 libpayload: Add the format attribute to functions in stdio.h.
gcc recognizes the format function attribute which tells the compiler to expect
the format string to look a certain way and for its arguments to be of
appropriate types. This helps to prevent errors like the one that was recently
fixed in libpayload's assert.

Change-Id: I284ae8bff32f72cfd2d1a250d126c729b38a5730
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1731
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2012-11-07 18:36:14 +01:00
..
arch libpayload: Add faster, architecture specific versions of memset and memcpy. 2012-11-07 18:31:15 +01:00
bin libpayload: Don't leave temporary files behind 2012-09-28 13:43:31 +02:00
configs
crypto
curses
drivers Update the way serial info is read from the coreboot tables. 2012-11-07 18:30:40 +01:00
include libpayload: Add the format attribute to functions in stdio.h. 2012-11-07 18:36:14 +01:00
lib Discard .note sections when linking. 2012-11-07 18:30:11 +01:00
libc libpayload: Make the symbols in memory.c weak so they can be overridden. 2012-11-07 18:30:56 +01:00
libcbfs
liblzma
libpci
sample
util
Config.in libpayload: New AHCI, ATA and ATAPI drivers 2012-10-27 02:52:58 +02:00
Doxyfile
LICENSES
Makefile
Makefile.inc
README

README

-------------------------------------------------------------------------------
libpayload README
-------------------------------------------------------------------------------

libpayload is a minimal library to support standalone payloads
that can be booted with firmware like coreboot. It handles the setup
code, and provides common C library symbols such as malloc() and printf().

Note: This is _not_ a standard library for use with an operating system,
rather it's only useful for coreboot payload development!
See http://coreboot.org for details on coreboot.


Installation
------------

 $ svn co svn://coreboot.org/coreboot/trunk/payloads/libpayload

 $ cd libpayload

 $ make menuconfig

 $ make

 $ sudo make install (optional, will install into /opt per default)

As libpayload is for 32bit x86 systems only, you might have to install the
32bit libgcc version, otherwise your payloads will fail to compile.
On Debian systems you'd do 'apt-get install gcc-multilib' for example.


Usage
-----

Here's an example of a very simple payload (hello.c) and how to build it:

 #include <libpayload.h>

 int main(void)
 {
     printf("Hello, world!\n");
     return 0;
 }

Building the payload using the 'lpgcc' compiler wrapper:

 $ lpgcc -o hello.elf hello.c

Please see the sample/ directory for details.


Website and Mailing List
------------------------

The main website is http://www.coreboot.org/Libpayload.

For additional information, patches, and discussions, please join the
coreboot mailing list at http://coreboot.org/Mailinglist, where most
libpayload developers are subscribed.


Copyright and License
---------------------

See LICENSES.