[coreboot] Patch merged into coreboot/master: d01d036 libpayload: New CBFS to support multiple firmware media sources.

gerrit at coreboot.org gerrit at coreboot.org
Tue Feb 12 11:34:21 CET 2013

the following patch was just integrated into master:
commit d01d0368f492b84ea093875f918086a23bc0ec7a
Author: Hung-Te Lin <hungte at chromium.org>
Date:   Fri Jan 25 12:42:40 2013 +0800

    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(
    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 <hungte at chromium.org>
    Reviewed-on: http://review.coreboot.org/2191
    Tested-by: build bot (Jenkins)
    Reviewed-by: Paul Menzel <paulepanter at users.sourceforge.net>
    Reviewed-by: Anton Kochkov <anton.kochkov at gmail.com>

Build-Tested: build bot (Jenkins) at Tue Feb 12 02:53:20 2013, giving +1
Reviewed-By: Anton Kochkov <anton.kochkov at gmail.com> at Tue Feb 12 11:34:20 2013, giving +2
See http://review.coreboot.org/2191 for details.


More information about the coreboot mailing list