- 15 10月, 2019 4 次提交
-
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
It is more common to use the name 'cls' for the class object of a class method, to distinguish it from normal methods, which use 'self' Update the binman tests accordingly. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 29 7月, 2019 15 次提交
-
-
由 Simon Glass 提交于
Add a 'replace' command to binman to permit entries to be replaced, either individually or all at once (using a filter). Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present this message references -o for output file. But binman uses -f now. Fix it. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present some tests leave behind output directories. This happens because some tests call binman, which sets up an output directory, then call it again, which sets up another output directory and leaves the original one behind. Fix this by using a separate temporary directory when binman is called twice, or by manually removing the output directory. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Put tearDown()'s logic into a new _CleanupOutputDir() function so that it can be called from elsewhere. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present binman cannot replace data within a CBFS since it does not allow rewriting of the files in that CBFS. Implement this by using the new WriteData() method to handle the case. Add a header to compressed data so that the amount of compressed data can be determined without reference to the size of the containing entry. This allows the entry to be larger that the contents, without causing errors in decompression. This is necessary to cope with a compressed device tree being updated in such a way that it shrinks after the entry size is already set (an obscure case). It is not used with CBFS since it has its own metadata for this. Increase the number of passes allowed to resolve the position of entries, to handle this case. Add a test for this new logic. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
The Intel descriptor must always appear at the start of an (x86) image, so it is supposed to position itself there always. However there is no explicit test for this. Add one and fix a bug introduced by the recent change to adjust Entry to read the node in a separate call. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Sometimes an entry may shrink after it has already been packed. In that case we must repack the items. Of course it is always possible to just leave the entry at its original size and waste space at the end. This is what binman does by default, since there is the possibility of the entry changing size every time binman calculates its contents, thus causing a loop. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Sometimes entries shrink after packing. As a start towards supporting this, update the _testing entry to handle the test case. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
So far we don't allow entries to change size when repacking. But this is not very useful since it is common for entries to change size after an updated binary is built, etc. Add support for this, respecting the original offset/size/alignment constraints of the image layout. For this to work the original image must have been created with the 'allow-repack' property. This does not support entry types with sub-entries such as files and CBFS, but it does support sections. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
The positioning does not currently work correctly if at the end of an image with no fixed size. Also if the header is in the middle of an image it can cause a gap in the image since the header position is normally at the image end, so entries after it are placed after the end of the image. Fix these problems and add more tests to cover these cases. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
While it is useful and efficient to build images in a single pass from a unified description, it is sometimes desirable to update the image later. Add support for replace an existing file with one of the same size. This avoids needing to repack the file. Support for more advanced updates will come in future patches. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present EnsureCompiled() uses an file from the 'output' directory (in the tools module) when compiling the device tree. This is fine in most cases, allowing useful inspection of the output files from binman. However in functional tests, _SetupDtb() creates an output directory and immediately removes it afterwards. This serves no benefit and just confuses things, since the 'official' output directory is supposed to be created and destroyed in control.Binman(). Add a new parameter for the optional temporary directory to use, and use a separate temporary directory in _SetupDtb(). Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
We use this same combination of properties several times in tests. Add a constant for it to avoid typos, etc. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Since binman supports multiple images it is useful to know which one created the image that has been read. Then it is possible to look up that name in the 'master' device tree (containing the description of all images). Add a property for this. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 25 7月, 2019 21 次提交
-
-
由 Simon Glass 提交于
Current test coverage is likely sufficient for the logic used to place sections in the image. However it seems useful to add a test specifically for nested sections, since these could have some unusual interactions. Add a new test for this and aligned sections. This test failed before the refactor to drop the bsection.py file (Section class), but passes now. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
It is useful to be able to extract all binaries from the image, or a subset of them. Add a new 'extract' command to handle this. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
It is useful to be able to extract entry contents from an image to see what is inside. Add a simple function to read the contents of an entry, decompressing it by default. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add support for listing the entries in an image. This relies on the image having an FDT map. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: 8f1da50c "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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
It is possible to read an Image, locate its FDT map and then read it into the binman data structures. This allows full access to the entries that were written to the image. Add support for this. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add support for locating an image header in an image. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add support for locating an image's Fdt map which is used to determine the contents and structure of the image. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
It is useful to be able to summarise all the entries in an image, e.g. to display this to this user. Add a new ListEntries() method to Entry, and set up a way to call it through the Image class. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Detect when an unknown or unsupported file type is specified and report an error. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
It is useful to add the CBFS file information (offset, size, etc.) into the FDT so that the layout is complete. Add support for this. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present the logic skips the blob class' handling of compression, so this is not supported with device tree entries. Fix this. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add support for detecting entries that change size after they have already been packed, and re-running packing when it happens. This removes the limitation that entry size cannot change after PackEntries() is called. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This function raises an exception with its arguments around the wrong way so the message is incorrect. Fix this as well as a few minor comment problems. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This class is the new way to handle arguments in Python. Convert binman over to use it. At the same time, introduce commands so that we can separate out the different parts of binman functionality. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Quite a few tests will use a real device tree and need it updated with the binman metadata. Add a helper function for this. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
An Integrated Firmware Image is used to hold various binaries used for booting with Apollolake and some later devices. Add support for this. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-