summaryrefslogtreecommitdiff
path: root/tools/binman/binman.rst
AgeCommit message (Collapse)Author
2025-10-26doc: develop: Change formatting to make binman doc more readableWolfgang Wallner
Change the formatting of binman.rst so that the compiled HTML output becomes more readable. Changes include enumerations and the escaping of arguments starting with a double dash (e.g. --debug). Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Wolfgang Wallner <[email protected]>
2025-10-26doc: develop: Fix typos in binman/binman.rstWolfgang Wallner
Fix some typos in binman.rst. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Wolfgang Wallner <[email protected]>
2025-06-26binman: mark optional missing blobs as absentYannic Moog
Optional blobs should mark themselves as absent to avoid being packed into an image. Extend the documentation of this behaviour. Although the documentation implied this before, the "optional" property had not been explained properly before. The behaviour will change as now absent entries are no longer packed into an image. The image map will also reflect this. As a result, the CheckForProblems() function will no longer alert on optional (blob) entries. This is because the missing optional images were removed before CheckForProblems is called. Adjust the testExtblobOptional test case to highlight that we are testing not only an optional image but the image is missing as well. The behaviour for these is different where the latter will not be packaged into the image. Reported-by: Simon Glass <[email protected]> Signed-off-by: Yannic Moog <[email protected]> Reviewed-by: Bryan Brattlof <[email protected]>
2025-03-04binman: Honour the skip-at-start property more faithfullySimon Glass
A discussion on the mailing list about dealing with block offsets and binman symbols made me think that something is wrong with how Binman deals with the skip-at-start property. The feature was originally designed to handle x86 ROMs, which are mapped at the top of the address space. That seemed too specific, whereas skipping some space at the start seemed more generally useful. It has proved useful. For example, rockchip images start at block 64, so a skip-at-start of 0x8000 deals with this. But it doesn't actually work correctly, since the image_pos value does not give the actual position on the media. Fix this and update the documentation, moving it into the 'section' section. Signed-off-by: Simon Glass <[email protected]>
2025-01-05doc: develop: Fix typos and wording in binman/binman.rstLothar Rubusch
Fix some typos and duplicate words in binman.rst. Signed-off-by: Lothar Rubusch <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-10-18binman: Add a tutorial on resolving test-coverage bugsSimon Glass
Provide a short description of how tests work, why they are so critical and how to resolve gaps in Binman's test coverage. Signed-off-by: Simon Glass <[email protected]> Acked-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2024-10-18binman: Support getting test-coverage on just one testSimon Glass
Pass the arguments through to test_util so that a single test can be used. Update the docs and add some missing backquotes in the same section. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: Provide a way to set the symbol base addressSimon Glass
The base address of the ELF containing symbols is normally added to any symbols written, so that the value points to the correct address in memory when everything is loaded. When the binary resides on disk, a different offset may be needed, typically 0. Provide a way to specify this. Signed-off-by: Simon Glass <[email protected]>
2024-09-26binman: Add minor improvements to symbol-writingSimon Glass
Add a clarification to the documentation and add a missing comment. Also update the test so that when it fails it is easier to see what is going on, rather than having to decode hex strings. Signed-off-by: Simon Glass <[email protected]>
2024-07-29binman: Correct an error in the FIT-template exampleSimon Glass
The example contains references to an non-existent node. Fix it. Signed-off-by: Simon Glass <[email protected]>
2024-07-03binman: Support an assumed size for missing binariesSimon Glass
Binman has a the useful feature of handling missing external blobs gracefully, including allowing them to be missing, deciding whether the resulting image is functional or not and faking blobs when this is necessary for particular tools (e.g. mkimage). This feature is widely used in CI. One drawback is that if U-Boot grows too large to fit along with the required blobs, then this is not discovered until someone does a 'real' build which includes the blobs. Add a 'assume-size' property to entries to allow Binman to reserve a given size for missing external blobs. Signed-off-by: Simon Glass <[email protected]>
2023-12-13binman: doc: fix typoDario Binacchi
s/use set/set/ Signed-off-by: Dario Binacchi <[email protected]> Reviewed-By: Michael Trimarchi <[email protected]>
2023-09-29binman: doc: Remove incomplete sentenceHeinrich Schuchardt
This is the difference between version 1 and 2 of Massimo's patch: binman: doc: fix reference tag placement for Logging section v2: https://lore.kernel.org/u-boot/[email protected]/ v1: https://lore.kernel.org/u-boot/[email protected]/ Fixes: 0f40e23fd22 ("binman: add documentation for binman sign option") Signed-off-by: Massimo Pegorer <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Massimo Pegorer <[email protected]>
2023-09-16binman: doc: fix reference tag placement for Logging sectionMassimo Pegorer
Move BinmanLogging reference tag after section "Signing FIT container with private key in an image" and just before section "Logging". Fixes: 0f40e23fd22 ("binman: add documentation for binman sign option") Signed-off-by: Massimo Pegorer <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2023-08-02binman: Support templates containing phandlesSimon Glass
This provides support for phandles to be copied over from templates. This is not quite safe, since if the template is instantiated twice (i.e. in two different nodes), then duplicate phandles will be found. This will result in an error. Signed-off-by: Simon Glass <[email protected]>
2023-08-02binman: Remove templates after useSimon Glass
It is not necessary to keep templates around after they have been processed. They can cause confusion and potentially duplicate phandles. Remove them. Use the same means of detecting a template node in _ReadImageDesc so that the two places are consistent. Signed-off-by: Simon Glass <[email protected]>
2023-08-02binman: Produce a template-file after processingSimon Glass
This file aids debugging when binman fails to get far enough to write out the final devicetree file. Write it immediate after template processing. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Support simple templatesSimon Glass
Collections can used to collect the contents of other entries into a single entry, but they result in a single entry, with the original entries 'left behind' in their old place. It is useful to be able to specific a set of entries ones and have it used in multiple images, or parts of an image. Implement this mechanism. Signed-off-by: Simon Glass <[email protected]>
2023-07-20binman: Allow disabling symbol writingSimon Glass
Some boards don't use symbol writing but do access the symbols in SPL. Provide an option to work around this. Signed-off-by: Simon Glass <[email protected]>
2023-03-16Merge tag 'dm-next-12mar23a' of git://git.denx.de/u-boot-dm into nextTom Rini
More tests and fixes for fdt command binman signing feature fix buildman -A bug introduced recently Signed-off-by: Tom Rini <[email protected]>
2023-03-14binman: add documentation for binman sign optionIvan Mikhaylov
Add the documentation about binman sign option and providing an example. Signed-off-by: Ivan Mikhaylov <[email protected]> Add a section about 'binman sign' at the bottom: Signed-off-by: Simon Glass <[email protected]>
2023-03-14Merge tag 'v2023.04-rc4' into nextTom Rini
Prepare v2023.04-rc4 Signed-off-by: Tom Rini <[email protected]>
2023-03-08binman: Support updating section contentsSimon Glass
Implement this feature since it is useful for updating FITs within an image. Signed-off-by: Simon Glass <[email protected]>
2023-03-08binman: Allow preserving the output dir when replacingSimon Glass
Add these flags for the 'replace' subcommand too, to aid debugging. Signed-off-by: Simon Glass <[email protected]> 44 2023 -0700
2023-03-08doc: Add notes on how to install patman and binmanSimon Glass
These can be installed with 'pip' now. Add the details for those who are interested. Signed-off-by: Simon Glass <[email protected]>
2023-03-08binman: Make the tooldir configurableSimon Glass
Add a command-line argument for setting the tooldir, so that the default can be overridden. Add this directory to the toolpath automatically. Create the directory if it does not already exist. Put the default in the argument parser instead of the class, so that it is more obvious. Update a few tests that expect the utility name to be provided without any path (e.g. 'futility'), so they can accept a path, e.g. /path/to/futility Update the documentation and add a few tests. Improve the help for --toolpath while we are here. Signed-off-by: Simon Glass <[email protected]>
2023-03-08binman: Use a private directory for bintoolsSimon Glass
At present binman writes tools into the ~/bin directory. This is convenient but some may be concerned about downloading unverified binaries and running them. Place then in a special ~/.binman-tools directory instead. Mention this in the documentation. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-03-08binman: Support marking FMAP areas as preservedSimon Glass
Add an entry flag called 'preserve' to indicate that an entry should be preserved by firmware updates. Propagate this to FMAP too. Signed-off-by: Simon Glass <[email protected]>
2023-03-01tools: binman: minor formatting fix in docsRalph Siemsen
This should fix a rendering oddity when viewing the docs online at https://u-boot.readthedocs.io/en/latest/develop/package/binman.html Signed-off-by: Ralph Siemsen <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-02-14dm: treewide: Complete migration to new driver model schemaSimon Glass
Update various build and test components to use the new schema. Signed-off-by: Simon Glass <[email protected]>
2023-01-26binman: Add 'min-size' entry propertySamuel Holland
This property sets the minimum size of an entry, including padding but not alignment. It can be used to reserve space for growth of an entry, or to enforce a minimum offset for later entries in the section. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-01-18binman: Support positioning an entry by and ELF symbolSimon Glass
In some cases it is useful to position an entry over the top of a symbol in an ELF file. For example, if the symbol holds a version string then it allows the string to be accessed from the fdtmap. Add support for this. Suggested-by: Pali Rohár <[email protected]> Suggested-by: Keith Short <[email protected]> Signed-off-by: Simon Glass <[email protected]>
2023-01-18binman: Provide general support for updating ELF symbolsSimon Glass
The current support for updating variables in a binary is hard-coded to work with U-Boot: - It assumes the image starts at __image_copy_start - It uses the existing U-Boot-specific entry types It is useful for other projects to use these feature. Add properties to enable writing symbols for any blob, a way of specifying the base symbol and a way of providing the ELF filename to allow symbol lookup to take place. With this it is possible to update a Zephyr image, such as zephyr.bin after it has been built. Signed-off-by: Simon Glass <[email protected]>
2023-01-18binman: Support overlapping entriesSimon Glass
In some cases it is useful to have an entry overlap with another in a section, either to update the contents within a blob, or to add an entry to the fdtmap that covers only part of the blob. Add support for this. Signed-off-by: Simon Glass <[email protected]>
2023-01-18binman: Support optional external blobsSimon Glass
Some blobs are actually not necessary for the board to work correctly. Add a property to allow this to be indicated. Missing optional blobs do not cause a build failure. Signed-off-by: Simon Glass <[email protected]>
2023-01-18binman: Support optional entriesSimon Glass
Support entries which can be optional depending on their contents. This allows special entry types which appear in the image only when needed. Signed-off-by: Simon Glass <[email protected]>
2023-01-18binman: Use a reference for binman symbols docsSimon Glass
Several etypes have this reference in their documentation. Now that we are using rST, link to the section directly. Signed-off-by: Simon Glass <[email protected]> Suggested-by: Quentin Schulz <[email protected]>
2023-01-18binman: Allow writing section contents to a fileSimon Glass
At present only the image (which is a section) has a filename. Move this implementation to the entry_Section class so that any section can have a filename. With this, the section data is written to a file. This allows parts of an image to be written, along with the entire image. Make a note that this can be used to include the contents of a section in one image in another (later) image. Signed-off-by: Simon Glass <[email protected]>
2022-12-23global: Migrate CONFIG_X86_MRC_ADDR to CFGTom Rini
Perform a simple rename of CONFIG_X86_MRC_ADDR to CFG_X86_MRC_ADDR Signed-off-by: Tom Rini <[email protected]>
2022-11-22binman: Add documentation for the command line argsSimon Glass
Add command-line documentation for binman. Signed-off-by: Simon Glass <[email protected]>
2022-11-22binman: Add a separate section about environment variablesSimon Glass
These are documented in various several sections. Add a new section that mentions them all in one place so it is easier to see what environment variables can be used to control U-Boot's use of binman. Signed-off-by: Simon Glass <[email protected]> Suggested-by: Heinrich Schuchardt <[email protected]>
2022-11-22binman: Use an exit code when blobs are missingSimon Glass
At present binman returns success when told to handle missing/faked blobs or missing bintools. This is confusing since in fact the resulting image cannot work. Use exit code 103 to signal this problem, with a -W option to convert it to a warning. Rename the flag to --ignore-missing since it controls bintools also. Add documentation about exit codes while we are here. Signed-off-by: Simon Glass <[email protected]>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <[email protected]>
2022-10-29binman: Add support for symlinking imagesNeha Malcom Francis
Adding support to symlink an image packaged using binman. Signed-off-by: Neha Malcom Francis <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-08-26binman: Document how to handle dependent imagesSimon Glass
Binman does not support this properly at present. Add documentation about it including a work-around. Signed-off-by: Simon Glass <[email protected]>
2022-08-26binman: Mention split-elf in the main docsSimon Glass
Since we are talking about ATF, add mention of this new feature too. Signed-off-by: Simon Glass <[email protected]>
2022-08-20binman: Put fake files in a subdirectorySimon Glass
At present fake files from a previous build appear to be real files for a subsequent build, since they sit in the output directory. This can cause problems, since binman may need to parse the file, e.g. with the Intel description.bin files. Fix this by putting them in a 'binman-fake' subdirectory. Keep a track of the fake filename so we only create it once. Subsequent builds will still see that the file is missing and mark it as fake. Update a few tests to check the behaviour. Signed-off-by: Simon Glass <[email protected]>
2022-08-13binman: Add more documentation about binman usageSimon Glass
This is an attempt to answer the comments provided by Xavier [1]. [1] https://lore.kernel.org/all/Yulcol7HpTHtjXTX@begut/ Signed-off-by: Simon Glass <[email protected]> Acked-by: Heinrich Schuchardt <[email protected]>
2022-03-18binman: Change how faked blobs are createdSimon Glass
At present fake blobs are created but internally an empty blob is used. Change it to use the contents of the faked file. Also return whether the blob was faked, in case the caller needs to know that. Add a TODO to put fake blobs in their own directory. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alper Nebi Yasak <[email protected]>
2022-03-18binman: Rename ExpandToLimit to extend_to_limitSimon Glass
The word 'expand' is used for entries which generate subentries. It is also used for entries that can have an '_expanded' version which is used to break out its contents. Rather than talking about expanding an entry's size, use the term 'extending'. It is slightly more precise and avoids the above conflicts. This change renders the old 'expand-size' property invalid, so add an error check for that. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Alper Nebi Yasak <[email protected]>