test: spl: Add functions to create filesystems
Add some functions for creating fat/ext2 filesystems with a single file and
a test for them. Filesystems require block devices, and it is easiest to
just use MMC for this. To get an MMC, we must also pull in the test device
tree. SPL_TIMER is necessary for SPL_MMC, perhaps because it uses a timeout.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/configs/sandbox_noinst_defconfig b/configs/sandbox_noinst_defconfig
index 908155b..0a542cf 100644
--- a/configs/sandbox_noinst_defconfig
+++ b/configs/sandbox_noinst_defconfig
@@ -6,10 +6,12 @@
CONFIG_ENV_SIZE=0x2000
CONFIG_DEFAULT_DEVICE_TREE="sandbox"
CONFIG_DM_RESET=y
+CONFIG_SPL_MMC=y
CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
CONFIG_SPL_SYS_MALLOC_F_LEN=0x8000
CONFIG_SPL=y
+CONFIG_SPL_FS_FAT=y
CONFIG_SYS_LOAD_ADDR=0x0
CONFIG_PCI=y
CONFIG_SANDBOX_SPL=y
@@ -39,7 +41,9 @@
CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0xa000000
CONFIG_SPL_SYS_MALLOC_SIZE=0x4000000
CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_FS_EXT4=y
CONFIG_SPL_I2C=y
+CONFIG_SPL_MMC_WRITE=y
CONFIG_SPL_RTC=y
CONFIG_CMD_CPU=y
CONFIG_CMD_LICENSE=y
@@ -97,6 +101,7 @@
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_SPL_OF_PLATDATA=y
+CONFIG_SPL_OF_REAL=y
CONFIG_ENV_IS_NOWHERE=y
CONFIG_ENV_IS_IN_EXT4=y
CONFIG_ENV_EXT4_INTERFACE="host"
@@ -159,6 +164,7 @@
CONFIG_P2SB=y
CONFIG_PWRSEQ=y
CONFIG_SPL_PWRSEQ=y
+CONFIG_FS_LOADER=y
CONFIG_MMC_SANDBOX=y
CONFIG_SPI_FLASH_SANDBOX=y
CONFIG_SPI_FLASH_ATMEL=y
@@ -220,6 +226,7 @@
CONFIG_SPL_SYSRESET=y
CONFIG_DM_THERMAL=y
CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
CONFIG_TIMER_EARLY=y
CONFIG_SANDBOX_TIMER=y
CONFIG_USB=y