ae9ace70 | 21-Jan-2018 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
libfdt: migrate fdt_rw.c to a wrapper of scripts/dtc/libfdt/fdt_rw.c
The only difference between scripts/dtc/libfdt/fdt_rw.c and lib/libfdt/fdt_rw.c is fdt_remove_unused_strings().
It is only used
libfdt: migrate fdt_rw.c to a wrapper of scripts/dtc/libfdt/fdt_rw.c
The only difference between scripts/dtc/libfdt/fdt_rw.c and lib/libfdt/fdt_rw.c is fdt_remove_unused_strings().
It is only used by fdtgrep, so we do not need to compile it for U-Boot image. Move it to tools/libfdt/fdw_rw.c so that lib/libfdt/fdt_rw.c can be a wrapper of scripts/dtc/libfdt/fdt_rw.c.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
ac020196 | 17-Jan-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
tools: provide a tool to convert a binary file to an include
For testing EFI disk management we need an in-memory image of a disk.
The tool file2include converts a file to a C include. The file is
tools: provide a tool to convert a binary file to an include
For testing EFI disk management we need an in-memory image of a disk.
The tool file2include converts a file to a C include. The file is separated into strings of 8 bytes. Only the non-zero strings are written to the include. The output format has been designed to maintain readability.
#define EFI_ST_DISK_IMG { 0x00010000, { \ {0x000001b8, "\x94\x37\x69\xfc\x00\x00\x00\x00"}, /* .7i..... */ \ {0x000001c0, "\x02\x00\x83\x02\x02\x00\x01\x00"}, /* ........ */ \ {0x000001c8, "\x00\x00\x7f\x00\x00\x00\x00\x00"}, /* ........ */ \ {0x000001f8, "\x00\x00\x00\x00\x00\x00\x55\xaa"}, /* ......U. */ \ ... {0x00006000, "\x48\x65\x6c\x6c\x6f\x20\x77\x6f"}, /* Hello wo */ \ {0x00006008, "\x72\x6c\x64\x21\x0a\x00\x00\x00"}, /* rld!.... */ \ {0, NULL} } }
As the disk image needed for testing contains mostly zeroes a high compression ratio can be attained.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
show more ...
|
3ed0de31 | 24-Dec-2017 |
Simon Glass <sjg@chromium.org> |
dtoc: Allow DTC environment variable to provide path to dtc
The system device-tree compiler may not be new enough to run the tests we use in U-Boot (e.g. with binman). Allow use of a DTC environment
dtoc: Allow DTC environment variable to provide path to dtc
The system device-tree compiler may not be new enough to run the tests we use in U-Boot (e.g. with binman). Allow use of a DTC environment variable to point to the correct dtc. If not defined, the dtc on the default PATH is used.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
2eda8e9a | 03-Dec-2017 |
Andre Przywara <andre.przywara@arm.com> |
tools: fix incorrect usage of DT node unit address
The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not t
tools: fix incorrect usage of DT node unit address
The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case. Correct the generated unit names when U-Boot's mkimage creates a FIT image.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
19790632 | 13-Nov-2017 |
Simon Glass <sjg@chromium.org> |
binman: Support accessing binman tables at run time
Binman construct images consisting of multiple binary files. These files sometimes need to know (at run timme) where their peers are located. For
binman: Support accessing binman tables at run time
Binman construct images consisting of multiple binary files. These files sometimes need to know (at run timme) where their peers are located. For example, SPL may want to know where U-Boot is located in the image, so that it can jump to U-Boot correctly on boot.
In general the positions where the binaries end up after binman has finished packing them cannot be known at compile time. One reason for this is that binman does not know the size of the binaries until everything is compiled, linked and converted to binaries with objcopy.
To make this work, we add a feature to binman which checks each binary for symbol names starting with '_binman'. These are then decoded to figure out which entry and property they refer to. Then binman writes the value of this symbol into the appropriate binary. With this, the symbol will have the correct value at run time.
Macros are used to make this easier to use. As an example, this declares a symbol that will access the 'u-boot-spl' entry to find the 'pos' value (i.e. the position of SPL in the image):
binman_sym_declare(unsigned long, u_boot_spl, pos);
This converts to a symbol called '_binman_u_boot_spl_prop_pos' in any binary that includes it. Binman then updates the value in that binary, ensuring that it can be accessed at runtime with:
ulong u_boot_pos = binman_sym(ulong, u_boot_spl, pos);
This assigns the variable u_boot_pos to the position of SPL in the image.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
7fe9173b | 13-Nov-2017 |
Simon Glass <sjg@chromium.org> |
binman: Support enabling debug in tests
The elf module can provide some debugging information to assist with figuring out what is going wrong. This is also useful in tests. Update the -D option so t
binman: Support enabling debug in tests
The elf module can provide some debugging information to assist with figuring out what is going wrong. This is also useful in tests. Update the -D option so that it is passed through to tests as well.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
f689890d | 13-Nov-2017 |
Simon Glass <sjg@chromium.org> |
binman: Adjust size of test SPL binary
This is only 3 bytes long which is not enough to hold two symbol values, needed to test the binman symbols feature. Increase it to 15 bytes.
Using very small
binman: Adjust size of test SPL binary
This is only 3 bytes long which is not enough to hold two symbol values, needed to test the binman symbols feature. Increase it to 15 bytes.
Using very small regions is useful since we can easily compare them in tests and errors are fairly easy to diagnose.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|