the following patch was just integrated into master:
commit d01d0368f492b84ea093875f918086a23bc0ec7a
Author: Hung-Te Lin <[email protected]>
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(
                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 <[email protected]>
    Reviewed-on: http://review.coreboot.org/2191
    Tested-by: build bot (Jenkins)
    Reviewed-by: Paul Menzel <[email protected]>
    Reviewed-by: Anton Kochkov <[email protected]>

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

-gerrit

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to