diff options
| author | Richard Genoud <[email protected]> | 2026-03-13 11:42:27 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-03-26 11:04:28 -0600 |
| commit | fb0df3552892ff150edaf7579989fd4750ee85ee (patch) | |
| tree | 9bbcabbe009a21ca976b3f529e1030e068e8b0e9 /common | |
| parent | 6494e823b46ced400764b6203d7480c9e3badc20 (diff) | |
spl: mmc: support squashfs
spl_mmc_do_fs_boot supports now loading an image from squashfs.
Also, convert #if defined(CONFIG_SPL_xx) to if (CONFIG_IS_ENABLED(xx))
Signed-off-by: Richard Genoud <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Reviewed-by: João Marcos Costa <[email protected]>
Diffstat (limited to 'common')
| -rw-r--r-- | common/spl/spl_mmc.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 47cfe4aef58..cc16709dc9b 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -226,6 +226,11 @@ static int __maybe_unused spl_mmc_fs_load(struct spl_image_info *spl_image, if (!err) return 0; } + if (CONFIG_IS_ENABLED(FS_SQUASHFS)) { + err = spl_load_image_sqfs(spl_image, bootdev, blk_dev, part, file); + if (!err) + return 0; + } return err; } @@ -284,13 +289,15 @@ static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, u32 __weak spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device) { -#if defined(CONFIG_SPL_FS_FAT) || defined(CONFIG_SPL_FS_EXT4) - return MMCSD_MODE_FS; -#elif defined(CONFIG_SUPPORT_EMMC_BOOT) - return MMCSD_MODE_EMMCBOOT; -#else + if (CONFIG_IS_ENABLED(FS_FAT) || + CONFIG_IS_ENABLED(FS_EXT4) || + CONFIG_IS_ENABLED(FS_SQUASHFS)) + return MMCSD_MODE_FS; + + if (IS_ENABLED(CONFIG_SUPPORT_EMMC_BOOT)) + return MMCSD_MODE_EMMCBOOT; + return MMCSD_MODE_RAW; -#endif } #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION |
