summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* binman: Use qemu-x86_defconfig in the exampleBin Meng2019-10-111-2/+2
| | | | | | | | | The doc currently uses sandbox_defconfig as examples of enabling debug/verbose output of binman. However during a sandbox build it does not call binman at all. Change it to qemu-x86_defconfig. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge tag 'u-boot-imx-20191009' of ↵Tom Rini2019-10-095-5/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20191009 ------------------- Travis : https://travis-ci.org/sbabic/u-boot-imx/builds/595148532 - MX6UL / ULZ - Toradex board - Allow to set OCRAM for MX6Q/D - MX7ULP - MX8: (container image, imx8mq_mek), SCU API - fix several board booting from SD/EMMC (cubox-i for example) - pico boards [trini: display5 merged manually] Signed-off-by: Tom Rini <trini@konsulko.com>
| * imx: replace CONFIG_SECURE_BOOT with CONFIG_IMX_HABStefano Babic2019-10-081-1/+1
| | | | | | | | | | | | | | | | CONFIG_SECURE_BOOT is too generic and forbids to use it for cross architecture purposes. If Secure Boot is required for imx, this means to enable and use the HAB processor in the soc. Signed-off-by: Stefano Babic <sbabic@denx.de>
| * tools: imx8m_image: align spl bin image sizePeng Fan2019-10-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loader for the DDR firmware in drivers/ddr/imx/imx8m/helper.c uses a 4-byte-aligned address to load the firmware. In cases where OF is enabled in SPL the dtb will be appended to the SPL binary and can result in a binary that is not aligned correctly. If OF is not enabled in SPL, `_end` is already aligned correctly, but this patch does not hurt. To ensure the correct alignment we use dd to create a temporary file u-boot-spl-pad.bin with the correct padding. Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
| * imx: Kconfig: Reduce default CONFIG_CSF_SIZEBreno Matheus Lima2019-10-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default CSF_SIZE defined in Kconfig is too high and SPL cannot fit into the OCRAM in certain cases. The CSF cannot achieve 0x2000 length when using RSA 4K key which is the largest key size supported by HABv4. According to AN12056 "Encrypted Boot on HABv4 and CAAM Enabled Devices" it's recommended to pad CSF binary to 0x2000 and append DEK blob to deploy encrypted boot images. As the maximum DEK blob size is 0x58 we can reduce CSF_SIZE to 0x2060 which should cover both CSF and DEK blob length. Update default_image.c and image.c to align with this change and avoid a U-Boot proper authentication failure in HAB closed devices: Authenticate image from DDR location 0x877fffc0... bad magic magic=0x32 length=0x6131 version=0x38 bad length magic=0x32 length=0x6131 version=0x38 bad version magic=0x32 length=0x6131 version=0x38 spl: ERROR: image authentication fail Fixes: 96d27fb218 (Revert "habv4: tools: Avoid hardcoded CSF size for SPL targets") Reported-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Breno Lima <breno.lima@nxp.com>
| * logos: Add the TechNexion's logoFabio Estevam2019-10-081-0/+0
| | | | | | | | | | | | | | Add the TechNexion's logo from their internal U-Boot tree. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * Revert "habv4: tools: Avoid hardcoded CSF size for SPL targets"Stefano Babic2019-10-081-4/+1
| | | | | | | | This reverts commit 62a52f3f85bf33e286632e99f0d39b2c166af0c4.
| * habv4: tools: Avoid hardcoded CSF size for SPL targetsBreno Matheus Lima2019-10-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it's not possible to authenticate the U-Boot proper of mx6ul_14x14_evk_defconfig target: Authenticate image from DDR location 0x877fffc0... bad magic magic=0x0 length=0x00 version=0x3 bad length magic=0x0 length=0x00 version=0x3 bad version magic=0x0 length=0x00 version=0x3 spl: ERROR: image authentication fail Commit 0633e134784a ("imx: hab: Increase CSF_SIZE for i.MX6 and i.MX7 devices") has increased CSF_SIZE to avoid a possible issue when booting encrypted boot images. Commit d21bd69b6e95 ("tools: mkimage: add firmware-ivt image type for HAB verification") is hardcoding the CSF and IVT sizes, the new CSF size is not being considered and u-boot-ivt.img fails to boot. Avoid hardcoded CSF and IVT size to fix this issue. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
| * imx6: spl: Reduce SPL limit size in case CONFIG_SECURE_BOOT is enabledBreno Matheus Lima2019-10-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case CONFIG_SECURE_BOOT is enabled we need to limit the SPL size to avoid a possible HAB failure event: --------- HAB Event 1 ----------------- event data: 0xdb 0x00 0x14 0x42 0x33 0x22 0x33 0x00 0x00 0x00 0x00 0x0f 0x00 0x90 0x70 0x00 0x00 0x01 0x10 0x00 STS = HAB_FAILURE (0x33) RSN = HAB_INV_ADDRESS (0x22) CTX = HAB_CTX_TARGET (0x33) ENG = HAB_ENG_ANY (0x00) As explained in Commit 23612534fe0f ("spl: imx6: Provide a SPL_SIZE_LIMIT default") the i.MX6 SPL size limit is 68KB. The ROM code is copying the image size defined in boot data to its respective load address, in case we exceed the OCRAM free region a HAB invalid address failure event is generated. The maximum CSF size is defined in CONFIG_CSF_SIZE, reduce SPL size limit based on this configuration. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
| * tools: imx8mimage: fix HDMI/FIT parsingPeng Fan2019-10-081-2/+5
| | | | | | | | | | | | | | | | | | | | Add missed break for HDMI entry. And moving FIT parsing earlier, because it does not have parameter, it will not runs into CFG_REG_SIZE. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
* | Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86Tom Rini2019-10-086-32/+47
|\ \ | | | | | | | | | | | | | | | | | | - Rename existing FSP code to fsp1 - Add fsp2 directory in preparation to support FSP 2.0 - Various x86 platform codes update - Various bug fixes and updates in dm core, sandbox and spl
| * | binman: Take account of skip-at-start with image-headerSimon Glass2019-10-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The image-header currently sets it offset assuming that skip-at-start is zero. This does not work on x86 where offsets end at 4GB. Add in this value so that the offset is correct. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Bin Meng <bmeng.cn@gmail.com>
| * | binman: Handle reading data for end-at-4gb sectionsSimon Glass2019-10-083-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some x86 sections have special offsets which currently result in empty data being returned from the 'extract' command. Fix this by taking account of the skip-at-start property. Add a little more debugging while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Bin Meng <bmeng.cn@gmail.com>
| * | binman: Add a base implementation of Entry.ReadChildData()Simon Glass2019-10-081-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | At present this function is not present in the Entry base class so it is hard to find the documentation for it. Move the docs from the section class and expand it a little. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | binman: Allow verbose output with all commandsSimon Glass2019-10-081-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the verbose flag only works for the 'build' command. This is not intended, nor is it useful. Update the code to support the verbose flag and make use of a command exception handler. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: rebase the patch against u-boot-x86/next to get it applied cleanly] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| * | binman: Allow selection of logging verbositySimon Glass2019-10-081-0/+6
| |/ | | | | | | | | | | | | | | | | Support a new BINMAN_VERBOSE option to the build, to allow passing the -v flag to binman. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* | buildman: Perform tests in a temporary directoryTom Rini2019-10-081-12/+14
| | | | | | | | | | | | | | | | | | | | We may not always be able to write to the default output directory so have a temporary directory for our output be created. Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Stephen Warren <swarren@wwwdotorg.org> Suggested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* | kconfiglib: Update to the 12.14.0 releaseTom Rini2019-10-083-3088/+6574
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A large number of changes have happened upstream since our last sync which was to 375506d. The reason to do the upgrade at this point is for improved Python 3 support. As part of this upgrade we need to update moveconfig.py and genboardscfg.py the current API. This is: - Change "kconfiglib.Config" calls to "kconfiglib.Kconfig" - Change get_symbol() calls to syms.get(). - Change get_value() to str_value. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* | genboardscfg.py: Remove "warnings" print sectionTom Rini2019-10-081-5/+1
| | | | | | | | | | | | | | | | We tell kconfiglib to not print any warnings to us so drop this code as it will be unused. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* | genboardscfg.py: Convert to Python 3Tom Rini2019-10-081-13/+13
|/ | | | | | | | | | Convert this tool to requiring Python 3. The bulk of this is done with the 2to3 tool In addition, we need to use the '//' operator to have our division result return an int rather than a float and ensure that we use UTF-8 when reading/writing files. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* fw_env: fix build errorPierre-Jean Texier2019-09-241-1/+2
| | | | | | | | | | | | | | | The following error appears: tools/env/fw_env.c:1149:25: error: lvalue required as unary ‘&’ operand rc = write(fd, &ENV_REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE)); Fixes: d3716dd ("env: Rename the redundancy flags") Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io> Tested-by: Joris Offouga <offougajoris@gmail.com> Tested-by: Heiko Schocher <hs@denx.de> Suggested-by: Heiko Schocher <hs@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* fw_env: remove duplicated definitionsPierre-Jean Texier2019-09-241-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit d3716dd ("env: Rename the redundancy flags"), the definitions of ENV_REDUND_OBSOLETE & ENV_REDUND_ACTIVE was moved to env.h. Fixes: tools/env/fw_env.c:122:22: error: ‘ENV_REDUND_ACTIVE’ redeclared as different kind of symbol static unsigned char ENV_REDUND_ACTIVE = 1; ^~~~~~~~~~~~~~~~~ In file included from tools/env/fw_env.c:13: include/env.h:63:2: note: previous definition of ‘ENV_REDUND_ACTIVE’ was here ENV_REDUND_ACTIVE = 1, ^~~~~~~~~~~~~~~~~ tools/env/fw_env.c:127:22: error: ‘ENV_REDUND_OBSOLETE’ redeclared as different kind of symbol static unsigned char ENV_REDUND_OBSOLETE; ^~~~~~~~~~~~~~~~~~~ In file included from tools/env/fw_env.c:13: include/env.h:62:2: note: previous definition of ‘ENV_REDUND_OBSOLETE’ was here ENV_REDUND_OBSOLETE = 0, Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io> Tested-by: Joris Offouga <offougajoris@gmail.com> Tested-by: Heiko Schocher <hs@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* tools: Add ifwitool to .gitignoreAndy Shevchenko2019-09-101-0/+1
| | | | | | | | | | | | Follow up fix to the commit 56bf4f863075 ("x86: Add ifwitool for Intel Integrated Firmware Image") in order to ignore created binary. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* riscv: tools: Handle addend to absolute reloc in prelink-riscvMarcus Comstedt2019-09-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Previously the handling of R_RISCV_32 and R_RISCV_64 would simply insert the value of the symbol and ignore any addend. However, there exist relocs where the addend is non-zero: 0000000080250900 R_RISCV_64 efi_runtime_services+0x0000000000000068 0000000080250910 R_RISCV_64 efi_runtime_services+0x0000000000000038 0000000080250920 R_RISCV_64 efi_runtime_services+0x0000000000000018 0000000080250930 R_RISCV_64 efi_runtime_services+0x0000000000000020 0000000080250980 R_RISCV_64 efi_runtime_services+0x0000000000000048 0000000080250990 R_RISCV_64 efi_runtime_services+0x0000000000000050 00000000802509a0 R_RISCV_64 efi_runtime_services+0x0000000000000058 0000000080250940 R_RISCV_64 systab+0x0000000000000030 0000000080250950 R_RISCV_64 systab+0x0000000000000040 0000000080250960 R_RISCV_64 systab+0x0000000000000050 0000000080250970 R_RISCV_64 systab+0x0000000000000060 In these cases the addend needs to be added to the symbol value to get the correct value for the reloc. Signed-off-by: Marcus Comstedt <marcus@mc.pp.se> Cc: Rick Chen <rick@andestech.com>
* tools: remove easylogo and include/video_logo.hWIP/2019-08-26-master-importsHeinrich Schuchardt2019-08-266-621/+0
| | | | | | | | | | include/video_logo.h once was created via the tool easylogo and than used in cpu/mpc8xx/video.c to display Tux. video_logo.h has been replaced by include/linux_logo.h and is not needed anymore. Delete the include and the tool, Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* easylogo: avoid buffer overrunHeinrich Schuchardt2019-08-201-1/+2
| | | | | | | | | | | | | | Building easylogo with `HOST_TOOLS_ALL=y make tools` results in a build warning due to a possible buffer overrun: tools/easylogo/easylogo.c:453:4: note: ‘sprintf’ output between 7 and 262 bytes into a destination of size 256 sprintf (str, "%s, 0x%02x", app, *dataptr++); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Truncate the output to fit into the destination buffer. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* riscv: tools: Add big endian target support to prelink-riscvMarcus Comstedt2019-08-152-33/+63
| | | | | | Signed-off-by: Marcus Comstedt <marcus@mc.pp.se> Cc: Rick Chen <rick@andestech.com> Reviewed-by: Rick Chen <rick@andestech.com>
* riscv: tools: Fix prelink-riscv to work on big endian hostsMarcus Comstedt2019-08-152-24/+23
| | | | | | | | | | All ELF fields whose values are inspected by the code are converted to CPU byteorder first. Values which are copied verbatim (relocation fixups) are not swapped to CPU byteorder and back as it is not needed. Signed-off-by: Marcus Comstedt <marcus@mc.pp.se> Cc: Rick Chen <rick@andestech.com> Reviewed-by: Rick Chen <rick@andestech.com>
* env: Rename environment.h to env_internal.hSimon Glass2019-08-111-1/+1
| | | | | | | | | | | | | | This file contains lots of internal details about the environment. Most code can include env.h instead, calling the functions there as needed. Rename this file and add a comment at the top to indicate its internal nature. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> [trini: Fixup apalis-tk1.c] Signed-off-by: Tom Rini <trini@konsulko.com>
* env: Rename the redundancy flagsSimon Glass2019-08-111-10/+13
| | | | | | | | Add an ENV prefix to these two flags so that it is clear what they relate to. Also move them to env.h since they are part of the public API. Use an enum rather than a #define to tie them together. Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Rename environment to embedded_environmentSimon Glass2019-08-111-2/+2
| | | | | | | | | The name 'environment' is widely used in U-Boot so is not a very useful name of a variable. Rename it to better indicate its purpose. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* env: Move env_set() to env.hSimon Glass2019-08-113-0/+3
| | | | | | | Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* tools: zynqmp_psu_init_minimize.sh: fix return lines coding styleLuca Ceresoli2019-07-301-0/+3
| | | | | | | | Remove unneeded parenthess around return value. E.g.: return (0); -> return 0; Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* arm64: zynqmp: add tool to minimize psu_init_gpl.c filesLuca Ceresoli2019-07-301-0/+145
| | | | | | | | | | | This script transforms a pair of psu_init_gpl.c and .h files produced by the Xilinx Vivado tool for ZynqMP into a smaller psu_init_gpl.c file that is almost checkpatch compliant. Based on a script by Michal Simek. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* arm64: zynqmp: add tool to convert PMU config object .c to binaryLuca Ceresoli2019-07-301-0/+301
| | | | | | | | | | | | | | | | | | | | The recently-added ZYNQMP_SPL_PM_CFG_OBJ_FILE option allows SPL to load a PMUFW configuration object from a binary blob. However the configuration object is produced by Xilinx proprietary tools as a C source file and no tool exists to easily convert it to a binary blob in an embedded Linux build system for U-Boot to use. Add a simple Python script to do the conversion. It is definitely not a complete C language parser, but it is enough to parse the known patterns generated by Xilinx tools, including: - defines - literal integers, optionally with a 'U' suffix - bitwise OR between them Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Merge tag 'dm-pull-29jul19' of ↵WIP/29Jul2019Tom Rini2019-07-2947-364/+1980
|\ | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-dm binman support for replacing files
| * binman: Add command-line support for replacing entriesSimon Glass2019-07-295-4/+327
| | | | | | | | | | | | | | Add a 'replace' command to binman to permit entries to be replaced, either individually or all at once (using a filter). Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Correct the error message for invalid pathSimon Glass2019-07-292-4/+4
| | | | | | | | | | | | | | At present this message references -o for output file. But binman uses -f now. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Split control.WriteEntryToImage() into separate functionsSimon Glass2019-07-291-17/+59
| | | | | | | | | | | | | | | | | | | | | | | | This code has three distinct phases: 1. The image is loaded and the state module is set up 2. The entry is written to the image 3. The image is repacked and written back to the file Split the code out with three separate functions, one for each phase. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Update control.WriteEntry() to support writing the mapSimon Glass2019-07-291-4/+6
| | | | | | | | | | | | | | Add the ability to write a new map file. Also tidy up a few comments and rename a misleading variable. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Move control.WriteEntry further down the fileSimon Glass2019-07-291-41/+40
| | | | | | | | | | | | | | Move this function after the extraction logic so we can keep the writing logic in one place. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Clean up all output directories in testsSimon Glass2019-07-291-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | 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: Simon Glass <sjg@chromium.org>
| * binman: Add a test function to clean up the output dirSimon Glass2019-07-291-4/+8
| | | | | | | | | | | | | | Put tearDown()'s logic into a new _CleanupOutputDir() function so that it can be called from elsewhere. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Update state when replacing device-tree entriesSimon Glass2019-07-294-0/+38
| | | | | | | | | | | | | | | | Since the state module holds references to all the device trees used by binman, it must be updated when the device trees are updated. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * patman: Reset the output directory when it is removedSimon Glass2019-07-291-0/+2
| | | | | | | | | | | | | | At present outdir remains set ever after the output directory has been removed. Fix this to avoid trying to access it when it is not present. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Support replacing data in a cbfsSimon Glass2019-07-297-9/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Simon Glass <sjg@chromium.org>
| * binman: Update Entry.WriteData() to handle special sectionsSimon Glass2019-07-293-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | At present this method assumes that the parent section does not need to recalculate its position or adjust any metadata it may contain. But when the entry changes size this may not be true. Also if the parent section is more than just a container (e.g. it is a CBFS) then the section may need to regenerate its output. Add a new WriteChildData() method to sections and call this from the WriteData() method, to handle this situation. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Update Entry.ReadEntry() to work through classesSimon Glass2019-07-294-17/+46
| | | | | | | | | | | | | | | | | | | | | | At present we simply extract the data directly from entries using the image_pos information. This happens to work on current entry types, but cannot work if the entry type encodes the data in some way. Update the ReadData() method to provide the data by calling a new ReadChildData() method in the parent. This allows the entry_Section class, or possibly any other container class, to return the correct data in all cases. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Add a prefix before CBFS hex offsetsSimon Glass2019-07-292-4/+4
| | | | | | | | | | | | Add a 0x prefix to these errors to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Add a few more features to the wishlistSimon Glass2019-07-291-0/+2
| | | | | | | | | | | | | | Add mention of a few other desirable features that may be implemented in the future. Signed-off-by: Simon Glass <sjg@chromium.org>