From d01d0368f492b84ea093875f918086a23bc0ec7a Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Fri, 25 Jan 2013 12:42:40 +0800 Subject: libpayload: New CBFS to support multiple firmware media sources. Upgrade CBFS in libpayload to use new media-based implementation from coreboot ( http://review.coreboot.org/#/c/2182/ ). Old CBFS functions (cbfs_find, cbfs_find_file, get_cbfs_header) are still supported, although the recommended way is to use new CBFS API. To migrate your existing x86 payload source: - Change cbfs_find to cbfs_get_file - Change cbfs_find_file to cbfs_get_file_content - Prefix every CBFS call with a CBFS_DEFAULT_MEDIA argument. Ex, char *jpeg_data = cbfs_find_file("splash.jpg", CBFS_TYPE_BOOTSPLASH); => char *jpeg_data = cbfs_get_file_content( CBFS_DEFAULT_MEDIA, "splash.jpg", CBFS_TYPE_BOOTSPLASH); The legacy setup_cbfs_from_{ram,flash} is also supported, although the better equivalent is to make a new media instance: struct cbfs_media ram_media; init_cbfs_ram_media(&ram_media, start, size); char *data = cbfs_get_file_content(&ram_media, "myfile", my_type); Verified by being successfully linked with filo. Change-Id: If797bc7e3ba975d7e3be905c59424f7a93b8ce11 Signed-off-by: Hung-Te Lin Reviewed-on: http://review.coreboot.org/2191 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Anton Kochkov --- payloads/libpayload/include/stdint.h | 1 + 1 file changed, 1 insertion(+) (limited to 'payloads/libpayload/include/stdint.h') diff --git a/payloads/libpayload/include/stdint.h b/payloads/libpayload/include/stdint.h index 8e5083e39a..dd7439d788 100644 --- a/payloads/libpayload/include/stdint.h +++ b/payloads/libpayload/include/stdint.h @@ -32,4 +32,5 @@ #include typedef unsigned long uintptr_t; +typedef long intptr_t; #endif -- cgit v1.2.3