blob: fdf9b1840dc096e923ede07df62f3c1e6321b074 [file] [log] [blame]
Uwe Hermann43a800c2008-08-18 18:55:33 +00001-------------------------------------------------------------------------------
2libpayload README
3-------------------------------------------------------------------------------
Jordan Crousef6145c32008-03-19 23:56:58 +00004
Uwe Hermann43a800c2008-08-18 18:55:33 +00005libpayload is a minimal library to support standalone payloads
6that can be booted with firmware like coreboot. It handles the setup
7code, and provides common C library symbols such as malloc() and printf().
8
9Note: This is _not_ a standard library for use with an operating system,
10rather it's only useful for coreboot payload development!
Paul Menzel59e21132017-06-05 12:46:00 +020011See https://www.coreboot.org for details on coreboot.
Uwe Hermann43a800c2008-08-18 18:55:33 +000012
13
14Installation
15------------
16
Paul Menzel0cdaad32018-04-06 11:07:27 +020017 $ git clone https://review.coreboot.org/coreboot.git
Uwe Hermann43a800c2008-08-18 18:55:33 +000018
Paul Menzel72ef8882013-04-04 14:12:26 +020019 $ cd coreboot/payloads/libpayload
Uwe Hermann43a800c2008-08-18 18:55:33 +000020
21 $ make menuconfig
22
23 $ make
24
25 $ sudo make install (optional, will install into /opt per default)
26
27As libpayload is for 32bit x86 systems only, you might have to install the
2832bit libgcc version, otherwise your payloads will fail to compile.
29On Debian systems you'd do 'apt-get install gcc-multilib' for example.
30
31
32Usage
33-----
34
35Here's an example of a very simple payload (hello.c) and how to build it:
36
37 #include <libpayload.h>
38
39 int main(void)
40 {
41 printf("Hello, world!\n");
42 return 0;
43 }
44
45Building the payload using the 'lpgcc' compiler wrapper:
46
47 $ lpgcc -o hello.elf hello.c
48
49Please see the sample/ directory for details.
50
51
52Website and Mailing List
53------------------------
54
Paul Menzela8843de2017-06-05 12:33:23 +020055The main website is https://www.coreboot.org/Libpayload.
Uwe Hermann43a800c2008-08-18 18:55:33 +000056
57For additional information, patches, and discussions, please join the
Paul Menzel59e21132017-06-05 12:46:00 +020058coreboot mailing list at https://www.coreboot.org/Mailinglist, where most
Uwe Hermann43a800c2008-08-18 18:55:33 +000059libpayload developers are subscribed.
60
61
62Copyright and License
63---------------------
64
65See LICENSES.