1------------------------------------------------------------------------------- 2libpayload README 3------------------------------------------------------------------------------- 4 5libpayload 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 17 $ svn co svn://coreboot.org/coreboot/trunk/payloads/libpayload 18 19 $ cd libpayload 20 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. 66 67

