1. 02 8月, 2018 21 次提交
    • S
      patman: Show the current directory in GetInputFilename() · 4f5dea45
      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: NSimon Glass <sjg@chromium.org>
      4f5dea45
    • S
      binman: Add support for Chromium GBB · 0ef87aa3
      Simon Glass 提交于
      This entry contains a Google Binary Block, used to store keys and bitmaps
      in a Chromium image.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      0ef87aa3
    • S
      patman: Add a few more helpers to the tools library · aeffc5e9
      Simon Glass 提交于
      Add functions to read and write a file, looking through a list of search
      paths to find it.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      aeffc5e9
    • S
      patman: Allow test commands to fall back to real ones · 2b19321e
      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: NSimon Glass <sjg@chromium.org>
      2b19321e
    • S
      dtoc: Export the _FindNode() function · 1d85888c
      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: NSimon Glass <sjg@chromium.org>
      1d85888c
    • S
      binman: Add an entry filled with a repeating byte · 3af8e49c
      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: NSimon Glass <sjg@chromium.org>
      3af8e49c
    • S
      binman: Add support for a cros_ec image · ec127af0
      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: NSimon Glass <sjg@chromium.org>
      ec127af0
    • S
      binman: Add support for flashrom FMAP · 11e36cce
      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: NSimon Glass <sjg@chromium.org>
      11e36cce
    • S
      binman: Create README.entries · 5a5da7ce
      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: NSimon Glass <sjg@chromium.org>
      5a5da7ce
    • S
      binman: Allow creation of entry documentation · fd8d1f79
      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: NSimon Glass <sjg@chromium.org>
      fd8d1f79
    • S
      binman: Expand documentation for entries · 3fb397bb
      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: NSimon Glass <sjg@chromium.org>
      3fb397bb
    • S
      binman: Allow help to work without libfdt · 9b1a804d
      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: NSimon Glass <sjg@chromium.org>
      9b1a804d
    • S
      binman: Support an entry that holds text · bb74837c
      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: NSimon Glass <sjg@chromium.org>
      bb74837c
    • S
      binman: Add support for passing arguments to entries · 53af22a9
      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<prop>=<value>
      
      where
      
         <prop> is the property to set
         <value> is the value to set it to
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      53af22a9
    • S
      dtoc: Add missing comments to fdt_util · dc08ecc9
      Simon Glass 提交于
      This module has a few missing comments. Add them.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      dc08ecc9
    • S
      binman: Add a new 'image-pos' property · dbf6be9f
      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: NSimon Glass <sjg@chromium.org>
      dbf6be9f
    • S
      binman: Enhance the map and fdt-update output · 8122f396
      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: NSimon Glass <sjg@chromium.org>
      8122f396
    • S
      binman: Tidy up some comments in the tests · ea6922e3
      Simon Glass 提交于
      A few lines are commented out and can be removed. Also fix return-value
      docs for _DoReadFile() and _DoReadFileDtb().
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      ea6922e3
    • S
      binman: Add comments to elf_test · b2b0df8f
      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: NSimon Glass <sjg@chromium.org>
      b2b0df8f
    • S
      binman: Rename 'position' to 'offset' · 3ab9598d
      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: NSimon Glass <sjg@chromium.org>
      3ab9598d
    • S
      binman: Don't depend on dict order in ELF testOutsideFile() · 46d61a2f
      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: NSimon Glass <sjg@chromium.org>
      46d61a2f
  2. 01 8月, 2018 10 次提交
  3. 31 7月, 2018 9 次提交