31 Dec, 2018

2 commits

  • The call to file_cbfs_fill_cache() is given with the parameter
    'start' pointing to the offset by the CBFS base address, but
    with the parameter 'size' that equals to the whole CBFS size.
    During CBFS walking through, it checks files one by one and
    after it pass over the end of the CBFS which is 4GiB boundary
    it tries to check files from address 0 and so on, until the
    overall size the codes checked hits to the given 'size'.

    Fix this by passing 'start' pointing to the CBFS base address.

    Signed-off-by: Bin Meng
    Reviewed-by: Simon Glass

    Bin Meng
     
  • cbfs_fileheader.len indicates the content size of the file in the
    cbfs, and it has nothing to do with cbfs_fileheader.offset which
    is the starting address of the file in the cbfs.

    Remove such check in file_cbfs_next_file(). Before this change
    'cbfsinit' failed with 'Bad CBFS file'. After this change all cbfs
    commands are working as expected.

    Signed-off-by: Christian Gmeiner
    [bmeng: keep the necessary header sanity check]
    Signed-off-by: Bin Meng
    Reviewed-by: Simon Glass

    Christian Gmeiner
     

07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

31 Mar, 2018

1 commit


01 May, 2017

1 commit

  • Rather than using CMD_CBFS for both the filesystem and its command, we
    should have a separate option for each. This allows us to enable CBFS
    support without the command, if desired, which reduces U-Boot's size
    slightly.

    Signed-off-by: Simon Glass
    [trini: imply FS_CBFS on SYS_COREBOOT]
    Signed-off-by: Tom Rini

    Simon Glass
     

16 Aug, 2016

1 commit


19 Jun, 2016

1 commit

  • Fix the following build errors when building sandbox on x86 32-bit:

    In file included from fs/cbfs/cbfs.c:8:0:
    include/malloc.h:364:7: error: conflicting types for 'memset'
    void* memset(void*, int, size_t);
    ^
    In file included from include/compiler.h:123:0,
    from include/cbfs.h:10,
    from fs/cbfs/cbfs.c:7:
    include/linux/string.h:78:15: note: previous declaration of 'memset' was here
    extern void * memset(void *,int,__kernel_size_t);
    ^
    In file included from fs/cbfs/cbfs.c:8:0:
    include/malloc.h:365:7: error: conflicting types for 'memcpy'
    void* memcpy(void*, const void*, size_t);
    ^
    In file included from include/compiler.h:123:0,
    from include/cbfs.h:10,
    from fs/cbfs/cbfs.c:7:
    include/linux/string.h:81:15: note: previous declaration of 'memcpy' was here
    extern void * memcpy(void *,const void *,__kernel_size_t);
    ^
    scripts/Makefile.build:280: recipe for target 'fs/cbfs/cbfs.o' failed

    Signed-off-by: Guillaume GARDET
    Cc: Tom Rini
    Reviewed-by: Simon Glass

    Guillaume GARDET
     

18 Nov, 2013

1 commit


01 Nov, 2013

1 commit


24 Jul, 2013

1 commit


07 Dec, 2012

1 commit


22 Oct, 2012

1 commit

  • This change adds CBFS support and some commands to use it to u-boot. These
    commands are:

    cbfsinit - Initialize CBFS support and pull all metadata into RAM. The end of
    the ROM is an optional parameter which defaults to the standard 0xffffffff and
    can be used to support multiple CBFSes in a system. The last one set up with
    cbfsinit is the one that will be used.

    cbfsinfo - Print information from the CBFS header.

    cbfsls - Print out the size, type, and name of all the files in the current
    CBFS. Recognized types are translated into symbolic names.

    cbfsload - Load a file from CBFS into memory. Like the similar command for fat
    filesystems, you can optionally provide a maximum size.

    Support for CBFS is compiled in when the CONFIG_CMD_CBFS option is specified.

    The CBFS driver can also be used programmatically from within u-boot.

    If u-boot needs something out of CBFS very early before the heap is
    configured, it won't be able to use the normal CBFS support which caches some
    information in memory it allocates from the heap. The
    cbfs_file_find_uncached function searches a CBFS instance without touching
    the heap.

    Signed-off-by: Gabe Black
    Signed-off-by: Stefan Reinauer
    Signed-off-by: Simon Glass

    Gabe Black