coreboot-kgpe-d16/payloads/libpayload
Vladimir Serbinenko 0af61b6c82 lib/cbfs_core.c: Supply size of file as well in cbfs_get_file_content
Change-Id: I5b93e5321e470f19ad22ca2cfdb1ebf3b340b252
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4659
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Tested-by: build bot (Jenkins)
2014-01-12 17:41:02 +01:00
..
arch libpayload: Get rid of a compiler warning 2013-12-12 22:03:22 +01:00
bin libpayload: Drop PowerPC architecture 2013-11-26 00:08:39 +01:00
configs libpayload: update defconfig 2014-01-08 13:24:43 +01:00
crypto libpayload: fix wrong endian assumption in sha1.c 2013-11-24 05:40:19 +01:00
curses libpayload: Use longer delay in tinycurses' wgetch() 2013-06-26 20:51:07 +02:00
drivers libpayload: reintroduce optional PCI in XHCI driver 2014-01-08 13:24:39 +01:00
include lib/cbfs_core.c: Supply size of file as well in cbfs_get_file_content 2014-01-12 17:41:02 +01:00
libc libpayload: Include hexdump.c in the Makefile so it gets built 2013-12-21 08:18:43 +01:00
libcbfs lib/cbfs_core.c: Supply size of file as well in cbfs_get_file_content 2014-01-12 17:41:02 +01:00
liblzma libpayload: Don't do unaligned accesses during LZMA decompression 2013-03-13 23:42:09 +01:00
libpci libpayload: minor cleanups 2012-04-04 00:40:31 +02:00
sample libpayload/sample: Use settings from .xcompile file to build. 2013-10-17 01:54:43 +02:00
tests libpayload: initial test case + tiny "framework" 2013-03-22 00:35:32 +01:00
util libpayload: Fix xcompile 2013-11-25 23:36:27 +01:00
Config.in libpayload: Drop PowerPC architecture 2013-11-26 00:08:39 +01:00
Doxyfile Run doxygen -u on doxygen configuration files 2010-06-28 10:40:38 +00:00
LICENSES
Makefile libpayload: Drop PowerPC architecture 2013-11-26 00:08:39 +01:00
Makefile.inc libpayload: add junit.xml build target 2014-01-08 13:24:45 +01:00
README libpayload, superiotool: README: Prepend `coreboot/` to path of change directory line 2013-04-04 17:22:15 +02:00

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
------------

 $ git clone http://review.coreboot.org/p/coreboot.git

 $ cd coreboot/payloads/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.