[coreboot-gerrit] Patch merged into coreboot/master: libpayload: allow compression at file header level

gerrit at coreboot.org gerrit at coreboot.org
Thu Sep 17 18:53:02 CET 2015


the following patch was just integrated into master:
commit d66f1da846f8e524a6211518c46a993d563b4ffc
Author: Daisuke Nojiri <dnojiri at chromium.org>
Date:   Thu Jul 9 15:07:45 2015 -0700

    libpayload: allow compression at file header level
    
    Decompression is handled transparently within cbfs_get_file_content:
    
    	const char *name = "foo.bmp";
    	void *dst = cbfs_get_file_content(media, name, type, NULL);
    
    To keep things consistent, a couple of API changes were necessary:
    - cbfs_get_file_content always returns a copy of the data, even for
      uncompressed files. It's the callers responsibility to free the
      memory.
    - same for cbfs_load_payload and cbfs_find_file.
    - cbfs_load_optionrom doesn't take a "dest" argument anymore but always
      returns a copy of the data, for compressed and uncompressed files.
      Like with cbfs_get_file_content, the caller is responsible to free it.
      It also decompresses based on extended file attributes instead of the
      cbfs_optionrom subheader that libpayload specified but that (AFAIK)
      nobody ever used, given that there's not even tooling for that.
    
    Change-Id: If959e3dff9b93c6ae45ec7358afcc7840bc17218
    Signed-off-by: Daisuke Nojiri <dnojiri at chromium.org>
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Reviewed-on: http://review.coreboot.org/10938
    Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Tested-by: build bot (Jenkins)


See http://review.coreboot.org/10938 for details.

-gerrit



More information about the coreboot-gerrit mailing list