coreboot-kgpe-d16/payloads/libpayload
Edward O'Callaghan 6bedc27426 libpayload/endian.h: Provide alignment-agnostic enc/dec bytestreams.
Alignment-agnostic encode/decode bytestream to/from little/big endian.

The le16enc(), le16dec(), le32enc(), le32dec() functions encode and
decode integers to/from byte strings on any alignment in big/little
endian format. See BYTEORDER(9).

Change-Id: I73a174b9c02c467bc60590c5cd894dac58b8683a
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/5198
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2014-04-26 15:03:43 +02:00
..
arch libpayload: Parse CBMEM ACPI GNVS pointer 2014-01-30 05:49:13 +01:00
bin libpayload/lpgcc: Add curses include path. 2014-01-19 15:05:20 +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/ahci: Fix a warning by decompartmentalise the AHCI driver. 2014-02-15 14:14:36 +01:00
include libpayload/endian.h: Provide alignment-agnostic enc/dec bytestreams. 2014-04-26 15:03:43 +02: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 Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
Makefile Revert "Makefile: Check $CC variable returned from xcompile is not empty." 2014-01-26 15:46:44 +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.