22 Oct, 2018

1 commit


09 Oct, 2018

2 commits


08 Oct, 2018

9 commits

  • At present the tests run one after the other using a single CPU. This is
    not very efficient. Bring in the concurrencytest module and run the tests
    concurrently, using one process for each CPU by default. A -P option
    allows this to be overridden, which is necessary for code-coverage to
    function correctly.

    This requires fixing a few tests which are currently not fully
    independent.

    At some point we might consider doing this across all pytests in U-Boot.
    There is a pytest version that supports specifying the number of processes
    to use, but it did not work for me.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present calling Uninit() always called ClearProgress() which outputs
    a \r character as well as spaces to remove any progress information on the
    line. This can mess up the normal output of binman and other tools. Fix
    this by outputing this only when progress information has actually been
    previous written.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This variable is not documented or set up in the module. Fix this.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • There are a few test cases which print output. Suppress this so that tests
    can run silently in the normal case.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present this test runs binman twice, which means that the temporary
    files from the first run do not get cleaned up. Split this into two tests
    to fix this problem.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present 'make check' leaves some temporary directories around. Part of
    this is because we call tools.PrepareOutputDir() twice in some cases,
    without calling tools.FinaliseOutputDir() in between.

    Fix this.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This module is often available in the sandbox_spl build created by
    'make check'. Use this as a default path so that just typing 'binman -t'
    (without setting PYTHONPATH) will generally run the tests.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • The filenames of the toolchains on kernel.org changes every now and then.
    Fix it for the current change, and make the test use a regex so that it
    has a better chance of passing with future changes too.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • With Python 2.7.15rc1, ConfigParser.SafeConfigParser has unfortunately
    started returning unicode, for unknown reasons. Adjust the code to handle
    this by converting everything to unicode. We cannot convert things to
    ASCII since email addresses may be encoded with UTF-8.

    Signed-off-by: Simon Glass

    Simon Glass
     

06 Oct, 2018

1 commit


05 Oct, 2018

1 commit

  • The 'rkimage' format used for booting rockchip boards over USB seems to
    have been broken since commit 7bf274b9caab ("rockchip: mkimage: use
    imagename to select spl hdr & spl size"). That commit adds an offset of
    RK_SPL_HDR_START(=2048) to the location the 'RKxx' header is written
    at. However the bootrom expects this header to be the first four bytes of
    the image, not at offset 2048. This appears to have been a copy paste
    error since the 'rksd' and 'rkspi' image types do require this offset.

    Furthermore commit 111bcc4fb6cb ("rockchip: mkimage: pad the header to
    8-bytes (using a 'nop') for RK3399"), commit 3d54eabcafec9 ("rockchip:
    spl: RK3399: use boot0 hook to create space for SPL magic") and
    commit 308277569229 ("rockchip: mkimage: update rkimage to support
    pre-padded payloads") changed the way the space for the 'RKxx' header is
    allocated and written to the image without adjusting 'rkimage'.

    This commit fixes those mistakes and makes it possible to load u-boot SPL
    over USB once more.

    (Tested on RK3399)

    Signed-off-by: Daniel Gröber
    Reviewed-by: Philipp Tomsich

    Daniel Gröber
     

03 Oct, 2018

1 commit


01 Oct, 2018

1 commit


30 Sep, 2018

12 commits

  • Something has changed in the last several month such that when buildman
    builds U-Boot incrementally and a new CONFIG option has been added to the
    Kconfig, the build hanges waiting for input:

    Test new config (NEW_CONFIG) [N/y/?] (NEW)

    Since binamn does not connect the build's stdin to anything this waits on
    stdin to the build thread, which never comes. Eventually I suspect all the
    threads end up in this state and the build does not progress.

    Fix this by passing /dev/null as input to the build. That way, if there is
    a new CONFIG, the build will stop (and fail):

    Test new config (NEW_CONFIG) [N/y/?] (NEW)

    Error in reading or end of file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • When we get a problem like overlapping regions it is sometimes hard to
    figure what what is going on. At present we don't write the map file in
    this case. However the file does provide useful information.

    Catch any packing errors and write a map file (if enabled with -m) to aid
    debugging.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • For sandbox we want to put ELF files in the image since that is what we
    need to execute. Add support for this.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Normally x86 platforms use the end-at-4gb option. This currently produces
    an FMAP with positions which have a large offset. The use of end-at-4gb is
    a useful convenience within binman, but we don't really want to export
    a map with these offsets.

    Fix this by subtracting the 'skip at start' parameter.

    Also put the code which convers names to fmap format, for clarity.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present sections have no record of their parent so it is not possible
    to traverse up the tree to the root and figure out the position of a
    section within the image.

    Change the constructor to record this information.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • When TPL is used on x86 we may want to program the microcode (at least for
    the first CPU) early in boot. Add support for this by refactoring the
    existing code to be more generic.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Sometimesi it us useful to be able to verify the content of entries with
    a hash. Add an easy way to do this in binman. The hash information can be
    retrieved from the device tree at run time.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Images and sections have the same attributes, since an image is mostly
    just a top-level section. Update the docs to explain this.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • It is useful to have entries which can grow automatically to fill
    available space. Add support for this.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • In some cases it is useful to add a group of files to the image and be
    able to access them at run-time. Of course it is possible to generate
    the binman config file with a set of blobs each with a filename. But for
    convenience, add an entry type which can do this.

    Add required support (for adding nodes and string properties) into the
    state module.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present if there is only a zero-size entry in a section this is
    reported as an error, e.g.:

    Offset 0x0 (0) is outside the section starting at 0x0 (0)

    Adjust the logic in CheckEntries() to avoid this.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add support for compressing blob entries. This can help reduce image sizes
    for many types of data. It requires that the firmware be able to
    decompress the data at run-time.

    Signed-off-by: Simon Glass

    Simon Glass
     

29 Sep, 2018

12 commits