summaryrefslogtreecommitdiff
path: root/tools/binman/README.entries
AgeCommit message (Collapse)AuthorFilesLines
2021-03-26binman: Incorporate entry documentationSimon Glass1-1416/+0
Update this to avoid sphinx warnings and incorporate it into the new documentaiton tree. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26binman: Automatically expand phase binaries into sectionsSimon Glass1-8/+88
When creating an entry, check for an expanded version of that entry, then use it instead. This allows, for example use of: u-boot { }; instead of having to write out in full: u-boot { type = "section"; u-boot-nodtb { }; u-boot-dtb { }; }; Add an implementaion of this and associated documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26binman: Add support for u-boot-tpl-bss-badSimon Glass1-0/+22
This entry holds the padding between the end of of TPL binary and the end of BSS. This region must be left empty so that the devicetree can be appended correctly and remain accessible without interfering with BSS. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26binman: Add support for u-boot-tpl-nodtbSimon Glass1-0/+23
Allow this entry type to be placed in an image. This is the TPL binary, without a devicetree appended. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26binman: Support symbols in u-boot-spl-nodtbSimon Glass1-0/+9
Since this is an execuable we should be able insert symbol values into it. Add support for this. Use common code for this test and the original testSymbols. Use hex consistently for the values and add some more comments. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26binman: Correct the documentation for u-boot-spl-bss-padSimon Glass1-7/+10
The documentation for this entry indicates that the SPL binary is included along with the padding. It is not, so update it to correct the error. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26binman: Tidy up underscores in entry documentationSimon Glass1-12/+11
Several entries currently use an underscore in the entry-type name, but in fact a hyphen is used. Update the docs to fix this as it might be confusing. Also simplify the 'filename' comment and fix the 'operation' typo. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26binman: Update entry help for files-alignSimon Glass1-0/+1
Regenerate the entry documentation, which step was missed when the files-align feature was added. Fixes: 6eb9932668f ("binman: Support alignment of files") Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-29binman: Use 'files-compress' to set compression for filesSimon Glass1-1/+1
At present we use 'compress' as the property to set the compression of a 'files' entry. But this conflicts with the same property for entries, of which Entry_section is a subclass. Strictly speaking, since Entry_files is in fact a subclass of Entry_section, the files can be compressed individually but also the section (that contains all the files) can itself be compressed. With this change, it is possible to express that. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-29binman: Update the entry docsSimon Glass1-0/+23
This has got out of sync with the entries. Regenerate it. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-22sunxi: binman: Update FIT component descriptionsSamuel Holland1-2/+2
Since commit d879616e9e64 ("spl: fit: simplify logic for FDT loading for non-OS boots"), the SPL looks at the "os" properties of FIT images to determine where to append the FDT. The "os" property of the "firmware" image also determines how to execute the next stage of the boot process, as in 1d3790905d9c ("spl: atf: introduce spl_invoke_atf and make bl31_entry private"). For this reason, the next stage must be specified in "firmware", not in "loadables". To support this additional functionality, and to properly model the boot process, where ATF runs before U-Boot, add the "os" properties and swap the firmware/loadable images in the FIT image. Since this description was copied as an example in commit 70248d6a2916 ("binman: Support generating FITs with multiple dtbs"), update those examples as well for correctness and consistency. Acked-by: Patrick Wildt <patrick@blueri.se> Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2020-09-22binman: Allow selecting default FIT configurationSimon Glass1-0/+4
Add a new entry argument to the fit entry which allows selection of the default configuration to use. This is the 'default' property in the 'configurations' node. Update the Makefile to pass in the value of DEVICE_TREE or CONFIG_DEFAULT_DEVICE_TREE to provide this information. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Michal Simek <michal.simek@xilinx.com>
2020-09-22binman: Support generating FITs with multiple dtbsSimon Glass1-1/+47
In some cases it is useful to generate a FIT which has a number of DTB images, selectable by configuration. Add support for this in binman, using a simple iterator and string substitution. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-09-22binman: Add support for ATF BL31Simon Glass1-0/+14
Add an entry for ARM Trusted Firmware's 'BL31' payload, which is the device's main firmware. Typically this is U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-09-22binman: Move 'external' support into base classSimon Glass1-1/+1
At present we have an Entry_blob_ext which implement a blob which holds an external binary. We need to support other entry types that hold external binaries, e.g. Entry_blob_named_by_arg. Move the support into the base Entry class to allow this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-09-22binman: Allow entry args to be requiredSimon Glass1-1/+6
If an entry argument is needed by an entry but the entry argument is not present, then a strange error can occur when trying to read the file. Fix this by allowing arguments to be required. Select this option for the cros-ec-rw entry. If a filename is provided in the node, allow that to be used. Also tidy up a few related tests to make the error string easier to find, and fully ignore unused return values. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-25binman: Add support for generating a FITSimon Glass1-0/+40
FIT (Flat Image Tree) is the main image format used by U-Boot. In some cases scripts are used to create FITs within the U-Boot build system. This is not ideal for various reasons: - Each architecture has its own slightly different script - There are no tests - Some are written in shell, some in Python To help address this, add support for FIT generation to binman. This works by putting the FIT source directly in the binman definition, with the ability to adjust parameters, etc. The contents of each FIT image come from sub-entries of the image, as is normal with binman. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-25binman: Allow external binaries to be missingSimon Glass1-0/+3
Sometimes it is useful to build an image even though external binaries are not present. This allows the build system to continue to function without these files, albeit not producing valid images. U-Boot does with with ATF (ARM Trusted Firmware) today. Add a new flag to binman to request this behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-07-25binman: Add an etype for external binary blobsSimon Glass1-0/+10
It is useful to be able to distinguish between ordinary blobs such as u-boot.bin and external blobs that cannot be build by the U-Boot build system. If the external blobs are not available for some reason, then we know that a value image cannot be built. Introduce a new 'blob-ext' entry type for that. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-07-25binman: Add support for calling mkimageSimon Glass1-0/+23
As a first step to integrating mkimage into binman, add a new entry type that feeds data into mkimage for processing and incorporates that output into the image. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-24Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"Tom Rini1-76/+0
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing changes made to 56d37f1c564107e27d873181d838571b7d7860e7. Unfortunately this is causing CI failures: https://travis-ci.org/github/trini/u-boot/jobs/711313649 Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-20binman: Add support for generating a FITSimon Glass1-0/+40
FIT (Flat Image Tree) is the main image format used by U-Boot. In some cases scripts are used to create FITs within the U-Boot build system. This is not ideal for various reasons: - Each architecture has its own slightly different script - There are no tests - Some are written in shell, some in Python To help address this, add support for FIT generation to binman. This works by putting the FIT source directly in the binman definition, with the ability to adjust parameters, etc. The contents of each FIT image come from sub-entries of the image, as is normal with binman. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-20binman: Allow external binaries to be missingSimon Glass1-0/+3
Sometimes it is useful to build an image even though external binaries are not present. This allows the build system to continue to function without these files, albeit not producing valid images. U-Boot does with with ATF (ARM Trusted Firmware) today. Add a new flag to binman to request this behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-07-20binman: Add an etype for external binary blobsSimon Glass1-0/+10
It is useful to be able to distinguish between ordinary blobs such as u-boot.bin and external blobs that cannot be build by the U-Boot build system. If the external blobs are not available for some reason, then we know that a value image cannot be built. Introduce a new 'blob-ext' entry type for that. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-07-20binman: Add support for calling mkimageSimon Glass1-0/+23
As a first step to integrating mkimage into binman, add a new entry type that feeds data into mkimage for processing and incorporates that output into the image. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-08binman: fix default filename of u-boot-with-ucode-ptr in documentationMasahiro Yamada1-1/+1
The suffix should be ".bin" instead of ".dtb" . Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-12-03cosmetic: Fix spelling and whitespace errorsThomas Hebb1-2/+2
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2019-11-02binman: Add support for Intel FSP-TSimon Glass1-0/+16
This entry is used to hold an Intel FSP-T (Firmware Support Package Temp-RAM init) binary. Add support for this in binman. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-02binman: Add support for Intel FSP-SSimon Glass1-0/+17
This entry is used to hold an Intel FSP-S (Firmware Support Package Silicon init) binary. Add support for this in binman. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-15binman: Add support for Intel FSP meminitSimon Glass1-0/+17
The Intel FSP supports initialising memory early during boot using a binary blob called 'fspm'. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Add support for Intel FITSimon Glass1-0/+19
A Firmware Image Table (FIT) is a data structure defined by Intel which contains information about various things needed by the SoC, such as microcode. Add support for this entry as well as the pointer to it. The contents of FIT are fixed at present. Future work is needed to support adding microcode, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: x86: Separate out 16-bit reset and init codeSimon Glass1-21/+25
At present these two sections of code are linked together into a single 2KB chunk in a single file. Some Intel SoCs like to have a FIT (Firmware Interface Table) in the ROM and the pointer for this needs to go at 0xffffffc0 which is in the middle of these two sections. Make use of the new 'reset' entry and change the existing 16-bit entry to include just the 16-bit data. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Add support for an x86 'reset' sectionSimon Glass1-0/+48
At present binman has a single entry type for the 16-bit code code needed to start up an x86 processor. This entry is intended to include both the reset vector itself as well as the code to move to 32-bit mode. However this is not very flexible since in some cases other data needs to be included at the top of the SPI flash, in between these two pieces. For example Intel requires that a FIT (Firmware Image Table) pointer be placed 0x40 bytes before the end of the ROM. To deal with this, add a new reset entry for just the reset vector. A subsequent change will adjust the existing 'start16' entry. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-10-15binman: Correct use of 'replace' in IFWI testsSimon Glass1-0/+6
At present the Intel IFWI entry uses 'replace' without the 'ifwi-' prefix. This is a fairly generic name which might conflict with the main Entry base class at some point, if more features are added. Add a prefix. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-29binman: Adjust fmap to ignore CBFS filesSimon Glass1-1/+2
The FMAP is not intended to show the files inside a CBFS. The FMAP can be used to locate the CBFS itself, but then the CBFS must be read to find out what is in it. Update the FMAP to work this way and add some debugging while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-29binman: Add info to allow safely repacking an image laterSimon Glass1-1/+7
At present it is not possible to discover the contraints to repacking an image (e.g. maximum section size) since this information is not preserved from the original image description. Add new 'orig-offset' and 'orig-size' properties to hold this. Add them to the main device tree in the image. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24binman: Convert Image to a subclass of EntrySimon Glass1-8/+13
When support for sections (and thus hierarchical images) was added to binman, the decision was made to create a new Section class which could be used by both Image and an Entry_section class. The decision between using inheritance and composition was tricky to make, but in the end it was decided that Image was different enough from Entry that it made sense to put the implementation of sections in an entirely separate class. It also has the advantage that core Image code does have to rely on an entry class in the etype directory. This work was mostly completed in commit: 8f1da50ccc "binman: Refactor much of the image code into 'section' As a result of this, the Section class has its own version of things like offset and size and these must be kept in sync with the parent Entry_section class in some cases. In the last year it has become apparent that the cost of keeping things in sync is larger than expected, since more and more code wants to access these properties. An alternative approach, previously considered and rejected, now seems better. Adjust Image to be a subclass of Entry_section. Move the code from Section (in bsection.py) to Entry_section and delete Section. Update all tests accordingly. This requires substantial changes to Image. Overall the changes reduce code size by about 240 lines. While much of that is just boilerplate from Section, there are quite a few functions in Entry_section which now do not need to be overiden from Entry. This suggests the change is beneficial even without further functionality being added. A side benefit is that the properties of sections are now consistent with other entries. This fixes a problem in testListCmd() where some properties are missing for sections. Unfortunately this is a very large commit since it is not feasible to do the migration piecemeal. Given the substantial tests available and the 100% code coverage of binman, we should be able to do this safely. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24binman: Add an image headerSimon Glass1-0/+19
It is useful to be able to quickly locate the FDT map in the image. An easy way to do this is with a pointer at the start or end of the image. Add an 'image header' entry, which places a magic number followed by a pointer to the FDT map. This can be located at the start or end of the image, or at a chosen location. As part of this, update GetSiblingImagePos() to detect missing siblings. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24binman: Add an FDT mapSimon Glass1-0/+38
An FDT map is an entry which holds a full description of the image entries, in FDT format. It can be discovered using the magic string at its start. Tools can locate and read this entry to find out what entries are in the image and where each entry is located. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24binman: Add support for fixed-offset files in CBFSSimon Glass1-0/+38
A feature of CBFS is that it allows files to be positioned at particular offset (as with binman in general). This is useful to support execute-in-place (XIP) code, since this may not be relocatable. Add a new cbfs-offset property to control this. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24binman: Add support for CBFS entriesSimon Glass1-0/+142
Add support for putting CBFSs (Coreboot Filesystems) in an image. This allows binman to produce firmware images used by coreboot to boot. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24binman: Support ELF files for TPLSimon Glass1-0/+11
We currenty support using the ELF file in U-Boot proper and SPL, but not TPL. Add this as it is useful both with sandbox and for CBFS to allow adding TPL as a 'stage'. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24binman: Correct comment in u_boot_spl_elfSimon Glass1-1/+1
This comment mentions the wrong default filename. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24binman: Allow text directly in the nodeSimon Glass1-0/+9
At present text entries use an indirect method to specify the text to use, with a label pointing to the text itself. Allow the text to be directly written into the node. This is more convenient in cases where the text is constant. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24binman: Don't assume there is an ME regionSimon Glass1-0/+2
At present having a descriptor means that there is an ME (Intel Management Engine) entry as well. The descriptor provides the ME location and assumes that it is present. For some SoCs this is not true. Before providing the location of a potentially non-existent entry, check if it is present. Update the comment in the ME entry also. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-11binman: Update the README.entries fileSimon Glass1-0/+15
A few minor changes have been made including one new entry. Update the documentation with: $ binman -E >tools/binman/README.entries Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-01Merge git://git.denx.de/u-boot-dmTom Rini1-0/+101
2018-09-29binman: Support ELF files for U-Boot and SPLSimon Glass1-0/+22
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 <sjg@chromium.org>
2018-09-29binman: Support x86 microcode in TPLSimon Glass1-0/+20
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 <sjg@chromium.org>
2018-09-29binman: Support adding filesSimon Glass1-0/+15
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 <sjg@chromium.org>