11 Sep, 2018

4 commits

  • Add a script that is capable of generating a FIT image
    source file that combines ATF, SPL(64 bit) and DT.
    This combined image is used by R5 SPL and start ATF
    on ARMv8 core.

    Signed-off-by: Lokesh Vutla
    Reviewed-by: Tom Rini

    Lokesh Vutla
     
  • The set_header call in kwbimage.c adds a checksum to the end of the
    image in addition to setting up the header. It 'helpfully' updates the
    st_size to match the fact that the file is now longer. However, mkimage
    uses this length in the munmap call. This can lead to unmapping an extra
    page, of perhaps required data. When this happens, a SEGV can occur.

    To prevent this from happening, the munmap call now uses the same length
    that was passed to mmap. This could also have been fixed by not changing
    the length in kwbimage.c, however changing it in the main file means
    that other plugins will also not fall for the same trap.

    Signed-off-by: Mark Tomlinson
    Signed-off-by: Chris Packham
    [cp: resolve checkpatch complaints]
    Tested-by: Chris Packham

    Mark Tomlinson
     
  • You do not need to use the typedefs provided by compiler.

    Our compilers are either IPL32 or LP64. Hence, U-Boot can/should
    always use int-ll64.h typedefs like Linux kernel, whatever the
    typedefs the compiler internally uses.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • On some systems the host system or even the cross sysroot can
    contain a version.h. This leads to the wrong file being picked
    up and a PLAIN_VERSION undefined error.

    This workaround symlinks the version.h into the tool folder to
    allow reordering of search folders.

    Fixes
    http://autobuild.buildroot.net/results/770/7702d5df36a6532aafdbe6e9e62709bbfa058b54/build-end.log
    http://autobuild.buildroot.net/results/e34/e3401027d2fb3ce565ca9e2456a427afd3610a87/build-end.log
    ... additional can be found with these queries ...
    http://autobuild.buildroot.net/?reason=uboot-tools-2018.03
    http://autobuild.buildroot.net/?reason=uboot-tools-2018.05

    Upstream: pending

    Signed-off-by: Matthew Weber

    Matt Weber
     

08 Aug, 2018

2 commits

  • A recent rename of the function did not rename the test file. Fix this.

    Fixes: 12308b128fa (lib: fdtdec: Rename routine fdtdec_setup_memory_size())

    Signed-off-by: Simon Glass

    Simon Glass
     
  • The enhanced pylibfdt support in U-Boot needed for binman was a
    placeholder while upstreaming of this work continued. This is now
    complete, so bring in the changes and update the tools as needed.

    There are quite a few changes since we decided to split the
    implementation into three fdt classes instead of two.

    The Fdt.del_node() method was unfortunately missed in this process and
    will be dealt with later. It exists in U-Boot but not upstream.

    Further syncing of libfdt probably needs to wait until we assess the
    code-size impact of all the new checking code on SPL and possibly provide
    a way to disable it.

    Signed-off-by: Simon Glass

    Simon Glass
     

07 Aug, 2018

2 commits

  • When kwboot is attached to a terminal which disappears such as one
    connected via an unplugged USB cable, read() returns 0, making kwboot
    loop until a key is pressed in the terminal. The only case where read()
    may return 0 here is when the terminal is closed anyway, so let's
    properly handle this one and report is similar to other errors.

    Signed-off-by: Willy Tarreau
    Signed-off-by: Stefan Roese

    Willy Tarreau
     
  • Commit 84899e2 ("tools/kwboot: Sync with latest barebox version to
    support Armada XP") accidently broke the terminal-only mode (-t) by
    removing the test on the bootmsg. Thus even when trying to use kwboot
    as a plain terminal, it asks to reboot the target.

    This commit simply reintroduces the lost test so that it is possible
    again to use kwboot to attach to the target system's console.

    Signed-off-by: Willy Tarreau
    Signed-off-by: Stefan Roese

    Willy Tarreau
     

02 Aug, 2018

28 commits

  • At present this function takes a filename, but it is better to use an Fdt
    object so that the caller can control this, perhaps obtainint the device
    tree from a bytearray. Update the method accordingly and also fix a
    confusing parameter name.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This property has been changed to 'offset'. To help downstream users who
    might still be using 'pos', add a check that this is not used by mistake.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This function name is too generic for its purpose and is therefore
    confusing. It actually only applies to blobs, so rename it to indicate
    this.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present the map only shows the offset and size for each region. The
    image position provides the actual position of each entry in the image,
    regardless of the section hierarchy.

    Add the image position to the map.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add support for U-Boot's TPL and TPL device tree. Also fix a few comments
    in the other device-tree entries.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This adds support for a Chromium verified boot block, used to sign a
    read-write section of the image.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a function which can decode a property containing a list of phandles.
    This is useful for finding nodes linked to a property. Also provide a way
    to look up a single phandle and get the Fdt object from a Node.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • When this fails it is useful to see the current directory, since U-Boot's
    build system will typically change into the output directory during the
    build. Add this information to the error.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This entry contains a Google Binary Block, used to store keys and bitmaps
    in a Chromium image.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add functions to read and write a file, looking through a list of search
    paths to find it.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Tests use the 'test_result' feature to return a predetermined command
    result for particular commands. The avoids needing to have the real
    command available just to run a test. It works by calling the function
    provided by the test, to get the value.

    However sometimes the test does need to run the real command. Allow it to
    fall back to do this when the function does not return a result.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This is useful for clients that want to find a node. Export it so it can
    be used by others.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • It is sometimes useful to have an area of the image which is all zeroes,
    or all 0xff. This can often be achieved by padding the size of an an
    existing entry and setting the pad byte for an entry or image.

    But it is useful to have an explicit means of adding blocks of repeating
    data to the image. Add a 'fill' entry type to handle this.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add an entry type which can hold a Chrome OS EC.

    To make this work a new entry type is created, which supports getting a
    blob filename from the command line.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add an entry which can hold an FMAP region as used by flashrom, an
    open-source flashing tool used on Linux x86 machines. This provides a
    simplified non-hierarchical view of the entries in the image and has a
    signature at the start to allow flashrom to find it in the image.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Create a new README containing documentation for the entry types supported
    by binman. This provides an easy reference in one place. It is
    automatically generated from the source-code documentation.

    Add a reference to this from the binman README.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Binman supports quite a number of different entries now. The operation of
    these is not always obvious but at present the source code is the only
    reference for understanding how an entry works.

    Add a way to create documentation (from the source code) which can be put
    in a new 'README.entries' file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present only the more complex entries are documented. It is useful to
    have documentation for all entries in one place.

    As a first step, add and expand the documentation to cover all entries.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present binman needs libfdt.py to be available before it will do
    anything, even print help. Import those modules later to avoid this, as it
    is bad practice to fail to even show help on startup.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • It is useful to able to write an identifying string to the image within an
    entry. Add a 'text' entry type to handle this. The actual text is
    typically passed to binman on the command line. The text is not itself
    nul-terminated but this can be achieved if required by setting the size of
    the entry to something larger than the text.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Sometimes it is useful to pass binman the value of an entry property from
    the command line. For example some entries need access to files and it is
    not always convenient to put these filenames in the image definition
    (device tree).

    Add a -a option which can be used like this:

    -a=

    where

    is the property to set
    is the value to set it to

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This module has a few missing comments. Add them.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present each entry has an offset within its parent section. This is
    useful for figuring out how entries relate to one another. However it
    is sometimes necessary to locate an entry within an image, regardless
    of which sections it is nested inside.

    Add a new 'image-pos' property to provide this information. Also add
    some documentation for the -u option binman provides, which updates the
    device tree with final entry information.

    Since the image position is a better symbol to use for the position of
    U-Boot as obtained by SPL, update the SPL symbols to use this instead of
    offset, which might be incorrect if hierarchical sections are used.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present the .map file produced for each image does not include the
    overall image size. This is useful information.

    Update the code to generate it in the .map file as well as the updated
    FDT. Also fix a few comments while we are here.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • A few lines are commented out and can be removed. Also fix return-value
    docs for _DoReadFile() and _DoReadFileDtb().

    Signed-off-by: Simon Glass

    Simon Glass
     
  • The purpose of some of the tests is not obvious from the function names.
    Add a few comments to help with understanding.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • After some thought, I believe there is an unfortunate naming flaw in
    binman. Entries have a position and size, but now that we support
    hierarchical sections it is unclear whether a position should be an
    absolute position within the image, or a relative position within its
    parent section.

    At present 'position' actually means the relative position. This indicates
    a need for an 'image position' for code that wants to find the location of
    an entry without having to do calculations back through parents to
    discover this image position.

    A better name for the current 'position' or 'pos' is 'offset'. It is not
    always an absolute position, but it is always an offset from its parent
    offset.

    It is unfortunate to rename this concept now, 18 months after binman was
    introduced. However I believe it is the right thing to do. The impact is
    mostly limited to binman itself and a few changes to in-tree users to
    binman:

    tegra
    sunxi
    x86

    The change makes old binman definitions (e.g. downstream or out-of-tree)
    incompatible if they use the 'pos = ' property. Later work will
    adjust binman to generate an error when it is used.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present this test assumes that the symbols are returned in address
    order. However, objdump can list symbols in any order and dictionaries do
    not guarantee any particular order when iterating through item.

    Update elf.GetSymbols() to return an OrderedDict, sorted by address, to
    avoid any problems.

    Signed-off-by: Simon Glass

    Simon Glass
     

30 Jul, 2018

1 commit

  • To system which has kconfiglib installed, genboardscfg will
    use system kconfiglib, we need it use U-Boot owned version,
    so move the buildman path to first.

    Signed-off-by: Peng Fan
    Cc: Masahiro Yamada
    Cc: Simon Glass
    Cc: Tom Rini
    Acked-by: Masahiro Yamada
    Reviewed-by: Simon Glass

    Peng Fan
     

27 Jul, 2018

2 commits


24 Jul, 2018

1 commit