1 -------------------------------------------------------------------------------
3 -------------------------------------------------------------------------------
5 libpayload is a minimal library to support standalone payloads
6 that can be booted with firmware like coreboot. It handles the setup
7 code, and provides common C library symbols such as malloc() and printf().
9 Note: This is _not_ a standard library for use with an operating system,
10 rather it's only useful for coreboot payload development!
11 See https://www.coreboot.org for details on coreboot.
17 $ git clone https://review.coreboot.org/coreboot.git
19 $ cd coreboot/payloads/libpayload
25 $ make install (optional, will install into ./install per default)
27 On x86 systems, libpayload will always be 32-bit even if your host OS runs
28 in 64-bit, so you might have to install the 32-bit libgcc version.
29 On Debian systems you'd do 'apt-get install gcc-multilib' for example.
31 Run 'make distclean' before switching boards. This command will remove
32 your current .config file, so you need 'make menuconfig' again or
33 'make defconfig' in order to set up configuration. Default configuration
34 is based on 'configs/defconfig'. See the configs/ directory for examples
41 Here's an example of a very simple payload (hello.c) and how to build it:
43 #include <libpayload.h>
47 printf("Hello, world!\n");
51 Building the payload using the 'lpgcc' compiler wrapper:
53 $ lpgcc -o hello.elf hello.c
55 Please see the sample/ directory for details.
58 Website and Mailing List
59 ------------------------
61 The main website is https://www.coreboot.org/Libpayload.
63 For additional information, patches, and discussions, please join the
64 coreboot mailing list at https://www.coreboot.org/Mailinglist, where most
65 libpayload developers are subscribed.