1. 08 10月, 2018 1 次提交
  2. 30 9月, 2018 8 次提交
  3. 29 9月, 2018 8 次提交
    • S
      binman: Support updating all device tree files · 6ed45ba0
      Simon Glass 提交于
      Binman currently supports updating the main device tree with things like
      the position of each entry. Extend this support to SPL and TPL as well,
      since they may need (a subset of) this information.
      
      Also adjust DTB output files to have a .out extension since this seems
      clearer than having a .dtb extension with 'out' in the name somwhere.
      
      Also add a few missing comments and update the DT setup code to use
      ReadFile and WriteFile().
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      6ed45ba0
    • S
      binman: Allow control of whether a fake DT is used · 93d17413
      Simon Glass 提交于
      We use a fake device tree in tests most of the time since tests don't
      normally care about the actual data. For example, for U-Boot proper we use
      U_BOOT_DTB_DATA which is just a four-character string. This makes testing
      the image output against an expected value very easy.
      
      However in some cases, such as when the test wants to check that the DT
      output containing particular nodes, we do actually need the real DT. Add
      support for this, along with a command-line option to select 'test mode'.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      93d17413
    • S
      binman: Move state information into a new module · c55a50f5
      Simon Glass 提交于
      At present the control module has state information in it, since it is the
      primary user of this. But it is a bit odd to have entries and other
      modules importing control to obtain this information.
      
      It seems better to have a dedicated state module, which control can use as
      well. Create a new module using code from control and update other modules
      to use it.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      c55a50f5
    • S
      binman: Support building a selection of images · 0bfa7b09
      Simon Glass 提交于
      Sometimes it is useful to build only a subset of the images provided by
      the binman configuration. Add a -i option for this. It can be given
      multiple times to build several images. If the option is not given, all
      images are built.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      0bfa7b09
    • S
      binman: Tidy up the vblock entry · a326b495
      Simon Glass 提交于
      At present if there are two vblock entries an image their contents are
      written to the same file in the output directory. This prevents checking
      the contents of each separately.
      
      Fix this by adding part of the entry path to the filename, and add some
      missing comments.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      a326b495
    • S
      binman: Add x86 support for starting TPL · 35b384cb
      Simon Glass 提交于
      Sometimes we want to include TPL for x86 platforms, such as when we want
      to select between different SPL images (e.g. for Chrome OS verified boot).
      Add support for this.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      35b384cb
    • S
      binman: Generate an error when text is not provided · 0b489364
      Simon Glass 提交于
      When the value of a text entry is not provided an execption is generated
      talking about a None type. This is confusing. Add a more explanatory error
      and a test for this case.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      0b489364
    • S
      binman: Allow 'fill' entry to have a size of 0 · d178eab8
      Simon Glass 提交于
      The check for this should be for None, not 0. Fix it and add a test.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      d178eab8
  4. 28 9月, 2018 2 次提交
  5. 02 8月, 2018 16 次提交
    • S
      binman: Adjust _GetPropTree() parameters · cee02e6f
      Simon Glass 提交于
      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: NSimon Glass <sjg@chromium.org>
      cee02e6f
    • S
      binman: Add a test to catch use of the old 'pos' property · 15a587c9
      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: NSimon Glass <sjg@chromium.org>
      15a587c9
    • S
      binman: Show the image position in the map · 1be70d20
      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: NSimon Glass <sjg@chromium.org>
      1be70d20
    • S
      binman: Add support for adding TPL binaries · b8ef5b6b
      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: NSimon Glass <sjg@chromium.org>
      b8ef5b6b
    • S
      binman: Add an entry for a Chromium vblock · 24d0d3c3
      Simon Glass 提交于
      This adds support for a Chromium verified boot block, used to sign a
      read-write section of the image.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      24d0d3c3
    • 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
      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: 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: 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
      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: 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
  6. 09 7月, 2018 4 次提交
  7. 08 6月, 2018 1 次提交
    • S
      binman: Add support for adding a name prefix to entries · c8d48efb
      Simon Glass 提交于
      Sometimes we have several sections which repeat the same entries (e.g. for
      a read-only and read-write version of the same section). It is useful to
      be able to tell these entries apart by name.
      
      Add a new 'name-prefix' property for sections, which causes all entries
      within that section to have a given name prefix.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      c8d48efb