coreboot-kgpe-d16/payloads/libpayload
Julius Werner 496ef1a9e9 Add new CONFIG(XXX) macro to replace IS_ENABLED(CONFIG_XXX)
The IS_ENABLED() macro is pretty long and unwieldy for something so
widely used, and often forces line breaks just for checking two Kconfigs
in a row. Let's replace it with something that takes up less space to
make our code more readable. From now on,

 if (IS_ENABLED(CONFIG_XXX))
 #if IS_ENABLED(CONFIG_XXX)

shall become

 if (CONFIG(XXX))
 #if CONFIG(XXX)

Change-Id: I2468427b569b974303084574125a9e1d9f6db596
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31773
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-03-07 17:06:28 +00:00
..
arch libpayload: arm64: Add GDB support 2018-10-12 20:17:48 +00:00
bin
configs libpayload: Remove unused timer/serial drivers 2018-12-05 14:07:17 +00:00
crypto
curses Fix typos involving "the the" 2018-12-18 13:24:28 +00:00
drivers libpayload: i8042: Only test PS/2 AUX port when enabled 2019-03-02 06:17:49 +00:00
gdb libpayload: gdb: Factor out gdb_handle_reentrant_exception() from arm32 2018-10-12 20:17:40 +00:00
include Add new CONFIG(XXX) macro to replace IS_ENABLED(CONFIG_XXX) 2019-03-07 17:06:28 +00:00
libc libpayload: add memchr to libc 2019-02-11 23:17:37 +00:00
libcbfs libpayload: cbfs: Check decompressed size when loading files 2019-02-28 13:56:45 +00:00
liblz4
liblzma
libpci
sample
tests
Doxyfile payloads: Remove/fix trailing whitespace 2018-09-04 12:38:40 +00:00
Kconfig libpayload: keyboard: Add option to ignore failures during init 2019-03-02 06:17:36 +00:00
LICENSES
LICENSE_GPL
Makefile libpayload: Make libpayload compile using gnu11 2018-07-16 07:44:03 +00:00
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 https://www.coreboot.org for details on coreboot.


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

 $ git clone https://review.coreboot.org/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 https://www.coreboot.org/Libpayload.

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


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

See LICENSES.