[PATCH v2 09/11] configs: sandbox: enable imagemap and its storage backends
Daniel Golle <[email protected]>
| Newsgroups | org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <f30c04e65dc0da58322a6c62a33540b112658b9f.1787673209.git.daniel@makrotopia.org> |
Enable CONFIG_IMAGEMAP and, so the end-to-end unit tests can exercise the real block paths, the storage that feeds them: CONFIG_MTD_BLOCK and CONFIG_SPI_FLASH_MTD (a bare non-NAND MTD reached via mtd_blk) and CONFIG_CMD_UBI / CONFIG_UBI_BLOCK (a UBI volume reached via ubi_blk). Give the sandbox SPI-NOR two device-tree partitions for the mtd_blk test and add a clean sandbox NAND chip (nand@2, no injected errors) so UBI can format on it for the ubiblock test. Signed-off-by: Daniel Golle <[email protected]> --- arch/sandbox/dts/test.dts | 29 +++++++++++++++++++++++++++++ configs/sandbox_defconfig | 6 ++++++ 2 files changed, 35 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index bed2a4b65ab..b794a44a4e1 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -1623,6 +1623,22 @@ compatible = "spansion,m25p16", "jedec,spi-nor"; spi-max-frequency = <40000000>; sandbox,filename = "spi.bin"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "nor-fit"; + reg = <0x0 0x100000>; + }; + + partition@100000 { + label = "nor-spare"; + reg = <0x100000 0x100000>; + }; + }; }; spi.bin@1 { reg = <1>; @@ -2232,6 +2248,19 @@ sandbox,err-count = <3>; sandbox,err-step-size = <512>; }; + + /* Clean chip (no injected errors) for UBI/ubiblock tests */ + nand@2 { + reg = <2>; + nand-ecc-mode = "soft"; + sandbox,id = [00 e3]; + sandbox,erasesize = <(8 * 1024)>; + sandbox,oobsize = <16>; + sandbox,pagesize = <512>; + sandbox,pages = <0x2000>; + sandbox,err-count = <0>; + sandbox,err-step-size = <512>; + }; }; graph1 { diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index f65e50590a3..05876cb36ba 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -30,6 +30,7 @@ CONFIG_BOOTMETH_RAUC=y CONFIG_UPL=y CONFIG_LEGACY_IMAGE_FORMAT=y CONFIG_MEASURED_BOOT=y +CONFIG_IMAGEMAP=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y CONFIG_BOOTSTAGE_FDT=y @@ -399,3 +400,8 @@ CONFIG_UTHREAD=y CONFIG_UNIT_TEST=y CONFIG_UT_TIME=y CONFIG_UT_DM=y +CONFIG_MTD_BLOCK=y +CONFIG_SPI_FLASH_MTD=y +CONFIG_CMD_UBI=y +CONFIG_MTD_UBI=y +CONFIG_UBI_BLOCK=y -- 2.55.0