u-boot/test/image
Sean Anderson 11f834614e spl: Convert nand to spl_load
This converts the nand load method to use spl_load. nand_page_size may not
be valid until after nand_spl_load_image is called (see e.g. fsl_ifc_spl),
so we set bl_len in spl_nand_read. Since spl_load reads the header for us,
we can remove that argument from spl_nand_load_element.

There are two possible regressions which could result from this commit.
First, we ask for a negative address from spl_get_load_buffer. That is,
instead of

	header = spl_get_load_buffer(0, sizeof(*header));

we do

	header = spl_get_load_buffer(-sizeof(*header), sizeof(*header));

this could cause a problem if spl_get_load_buffer does not return valid
memory for negative offsets. Second, we now set bl_len for legacy images.
This can cause memory up to a bl_len - 1 before the image load address to
be written, which might not have been the case before. If this turns out to
be a problem, we can add an option for a bounce buffer.

We can't load FITs with external data with SPL_LOAD_FIT_FULL, so disable the
test in that case. No boards enable SPL_NAND_SUPPORT and SPL_LOAD_FIT_FULL, so
this is not a regression.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-16 13:49:14 -05:00
..
Kconfig spl: Only support bl_len when we have to 2023-11-16 13:49:14 -05:00
Makefile test: spl: Add a test for NAND 2023-11-16 12:43:49 -05:00
spl_load.c test: spl: Support testing LEGACY_LZMA filesystem images 2023-11-16 13:49:14 -05:00
spl_load_fs.c spl: Convert mmc to spl_load 2023-11-16 13:49:14 -05:00
spl_load_nand.c spl: Convert nand to spl_load 2023-11-16 13:49:14 -05:00
spl_load_net.c test: spl: Add a test for the NET load method 2023-10-17 20:50:52 -04:00
spl_load_nor.c test: spl: Add a test for the NOR load method 2023-10-17 20:50:52 -04:00
spl_load_os.c spl: Only support bl_len when we have to 2023-11-16 13:49:14 -05:00
spl_load_spi.c test: spl: Add a test for the SPI load method 2023-10-17 20:50:52 -04:00
test-imagetools.sh test: Update test-imagetools.sh to match new syntax 2019-03-08 11:31:44 -05:00