mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
spl: add squashfs support
Implement spl_load_image_sqfs() in spl code. This will be used in MMC to read a file from a squashfs partition. Also, loosen squashfs read checks on file size by not failing when a bigger size than the actual file size is requested. (Just read the file) This is needed for FIT loading, because the length is ALIGNed. Signed-off-by: Richard Genoud <richard.genoud@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
This commit is contained in:
@@ -1490,13 +1490,11 @@ static int sqfs_read_nest(const char *filename, void *buf, loff_t offset,
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* If the user specifies a length, check its sanity */
|
||||
if (len) {
|
||||
if (len > finfo.size) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* For FIT loading, the len is ALIGN, so it may exceed the actual size.
|
||||
* Let's just read the max.
|
||||
*/
|
||||
if (len && len < finfo.size) {
|
||||
finfo.size = len;
|
||||
} else {
|
||||
len = finfo.size;
|
||||
|
||||
Reference in New Issue
Block a user