test: spl: Add a test for the NOR load method
Add a test for the NOR load method. Since NOR is memory-mapped we can
substitute a buffer instead. The only major complication is testing LZMA
decompression. It's too complex to implement LZMA compression in a test, and we
have no in-tree compressor, so we just include some pre-compressed data. This
data was generated through something like
generate_data(plain, plain_size, "lzma")
cat plain.dat | lzma | hexdump -C
and was cleaned up further in my editor.
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 57cbade..085cc30 100644
--- a/configs/sandbox_noinst_defconfig
+++ b/configs/sandbox_noinst_defconfig
@@ -49,6 +49,7 @@
CONFIG_SPL_I2C=y
CONFIG_SPL_MMC_WRITE=y
CONFIG_SPL_NET=y
+CONFIG_SPL_NOR_SUPPORT=y
CONFIG_SPL_RTC=y
CONFIG_CMD_CPU=y
CONFIG_CMD_LICENSE=y
@@ -257,6 +258,7 @@
CONFIG_TPM=y
CONFIG_LZ4=y
CONFIG_ZSTD=y
+CONFIG_SPL_LZMA=y
CONFIG_ERRNO_STR=y
CONFIG_EFI_CAPSULE_ON_DISK=y
CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y