
This series adds generic board support to sandbox and switches to use this always.
With sandbox it was noticed that turning CONFIG_SYS_GENERIC_BOARD off can cause a build failure if a previous autoconf.mk exists which indicates that generic board is not supported, so a patch is provided to fix this.
It is useful to convert a pointer into an 'address' in the sandbox RAM buffer - the opposite of map_sysmem(). This is added in this series and used in several places.
With sandbox it is easier to read a file from the host than to use the CONFIG_OF_SEPARATE option, since this option requires knowledge of the executable image structure which is not really appropriate on the host system. A new CONFIG_OF_HOSTFILE provides this.
A few related FDT changes are included in this series also.
The -c option is enhanced to support passing entire scripts to sandbox. This is useful when writing non-trivial test code.
Most of these patches were previously submitted as part of the verified boot effort. This series collects the independent sandbox-related patches together to make it easier to review. THe whole series is marked as version 3 for this reason.
Changes in v3: - Rebase on master, to take account of generic board - Add CONFIG_OF_HOSTFILE support to generic board instead of sandbox - Remove #ifdefs which are not needed now that we have generic global_data
Changes in v2: - Use gd->arch.ram_buf instead of gd->ram_buf (now that generic board is in) - Fix typo "os defined" -> "is defined" - Use gd->arch.ram_buf instead of gd->ram_buf (now that generic board is in) - Fix checkpatch warnings about split strings - fdt_valid() sets the FDT pointer to NULL on error, to simplify callers - Allow the control FDT to be set even if there is currently no control FDT - Correct bug in setting control FDT - Fix checkpatch checks about parenthesis alignment - Rebase to use updated fdt_valid() function - Fix checkpatch checks about parenthesis alignment - Revert the whole change including the set_working_fdt_addr() part - Move sandbox's command list patch from a later series
Simon Glass (17): Trigger generic board error only when building sandbox: Provide a way to map from host RAM to U-Boot RAM sandbox: Add support for generic board sandbox: Use generic board init sandbox: Remove old board init code sandbox: Add CONFIG_OF_HOSTFILE to read FDT from host file fdt: Add a parameter to fdt_valid() Add getenv_hex() to return an environment variable as hex fdt: Allow fdt command to check and update control FDT sandbox: fdt: Support fdt command for sandbox fdt: Skip checking FDT if the pointer is NULL Revert "fdt- Tell the FDT library where the device tree is" sandbox: Allow -c argument to provide a command list sandbox: Support 'source' command fs: Add support for saving data to filesystems sandbox: fs: Add support for saving files to host filesystem sandbox: config: Enable CONFIG_FIT and CONFIG_CMD_FIT
Makefile | 10 ++ arch/sandbox/config.mk | 5 +- arch/sandbox/cpu/cpu.c | 5 + arch/sandbox/cpu/start.c | 9 +- arch/sandbox/include/asm/io.h | 8 ++ arch/sandbox/include/asm/state.h | 1 + arch/sandbox/include/asm/u-boot.h | 22 +-- arch/sandbox/lib/Makefile | 1 - arch/sandbox/lib/board.c | 285 -------------------------------------- board/sandbox/sandbox/sandbox.c | 2 +- common/board_f.c | 106 ++++++++++++-- common/board_r.c | 8 +- common/cmd_fdt.c | 87 ++++++++---- common/cmd_nvedit.c | 15 ++ common/cmd_sandbox.c | 18 ++- common/cmd_source.c | 11 +- common/main.c | 8 -- config.mk | 4 +- doc/README.fdt-control | 6 +- fs/fs.c | 75 ++++++++++ fs/sandbox/sandboxfs.c | 33 +++++ include/asm-generic/sections.h | 2 +- include/common.h | 18 +++ include/configs/sandbox.h | 11 +- include/fs.h | 2 + include/sandboxfs.h | 1 + lib/fdtdec.c | 5 +- 27 files changed, 383 insertions(+), 375 deletions(-) delete mode 100644 arch/sandbox/lib/board.c