mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
spl: test: Add a test for spl_load_simple_fit()
As an example of an SPL test, add a new test for loading a FIT within
SPL. This runs on sandbox_spl. For this to work, the text base is adjusted
so that there is plenty of space available.
While we are here, document struct spl_load_info properly, since this is
currently ambiguous.
This test only verifies the logic path. It does not actually check that
the image is loaded correctly. It is not possible for sandbox's SPL to
actually run u-boot.img since it currently includes u-boot.bin rather than
u-boot. Further work could expand the test in that direction.
The need for this was noted at:
2020121600
.2832585-3-mr.nuke.me@gmail.com/
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
891d9e84a7
commit
2e059e4a6e
6 changed files with 110 additions and 2 deletions
|
@ -222,6 +222,15 @@ struct spl_load_info {
|
|||
void *priv;
|
||||
int bl_len;
|
||||
const char *filename;
|
||||
/**
|
||||
* read() - Read from device
|
||||
*
|
||||
* @load: Information about the load state
|
||||
* @sector: Sector number to read from (each @load->bl_len bytes)
|
||||
* @count: Number of sectors to read
|
||||
* @buf: Buffer to read into
|
||||
* @return number of sectors read, 0 on error
|
||||
*/
|
||||
ulong (*read)(struct spl_load_info *load, ulong sector, ulong count,
|
||||
void *buf);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue