blob: 0f905cb122e67c98f9d351970c2ad3ce2336f2de [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!
11See http://coreboot.org for details on coreboot.
12
13
14Installation
15------------
16
Paul Menzele1ea5152012-10-05 23:05:48 +020017 $ git clone http://review.coreboot.org/p/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
55The main website is http://www.coreboot.org/Libpayload.
56
57For additional information, patches, and discussions, please join the
58coreboot mailing list at http://coreboot.org/Mailinglist, where most
59libpayload developers are subscribed.
60
61
62Copyright and License
63---------------------
64
65See LICENSES.