diff options
author | Hiago De Franco <hiago.franco@toradex.com> | 2024-09-16 15:03:36 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-10-02 13:35:31 -0600 |
commit | a280368b4874f44304c14bc117815855dea1969a (patch) | |
tree | 03c9b83c1d6cd9f0d912bc99eb8148dd43273d25 | |
parent | eeeb35bfb66525dc8be9fc76b1931f2488c2b264 (diff) |
fs: Fix SPL build if SPL_FS_LOADER is enabled and FS_LOADER is disabled
When SPL_FS_LOADER is set to y and FS_LOADER is not enabled, the SPL build
fails with the following errors:
AR spl/boot/built-in.o
LD spl/u-boot-spl
arm-none-linux-gnueabihf-ld.bfd: drivers/misc/fs_loader.o: in function
`fw_get_filesystem_firmware':
/u-boot/drivers/misc/fs_loader.c:162: undefined reference to
`fs_set_blk_dev'
arm-none-linux-gnueabihf-ld.bfd: /home/frh/tdx/src/u-boot/drivers/misc/
fs_loader.c:185: undefined reference to `fs_read'
arm-none-linux-gnueabihf-ld.bfd: drivers/misc/fs_loader.o: in function
`select_fs_dev':
/u-boot/drivers/misc/fs_loader.c:89: undefined reference to
`fs_set_blk_dev_with_part'
make[1]: *** [scripts/Makefile.spl:527: spl/u-boot-spl] Error 1
make: *** [Makefile:2055: spl/u-boot-spl] Error 2
Fix it by replacing the FS_LOADER with SPL_FS_LOADER in the Makefile, so
the fs.c with the necessary function definitions are compiled.
Fixes: b071a07743d4 ("drivers: misc: Makefile: Enable fs_loader compilation at SPL Level")
Suggested-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
-rw-r--r-- | configs/sandbox_noinst_defconfig | 1 | ||||
-rw-r--r-- | drivers/block/Kconfig | 2 | ||||
-rw-r--r-- | fs/Makefile | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/configs/sandbox_noinst_defconfig b/configs/sandbox_noinst_defconfig index eb0f064ad28..4424eae79ef 100644 --- a/configs/sandbox_noinst_defconfig +++ b/configs/sandbox_noinst_defconfig @@ -187,6 +187,7 @@ CONFIG_P2SB=y CONFIG_PWRSEQ=y CONFIG_SPL_PWRSEQ=y CONFIG_FS_LOADER=y +CONFIG_SPL_FS_LOADER=y CONFIG_MMC_SANDBOX=y CONFIG_DM_MTD=y CONFIG_MTD_CONCAT=y diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 48529a6982f..5283d8981e0 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -109,7 +109,7 @@ config EFI_MEDIA config SPL_BLK_FS bool "Load images from filesystems on block devices" - depends on SPL_BLK + depends on SPL_BLK && SPL_FS_LOADER help Use generic support to load images from fat/ext filesystems on different types of block devices such as NVMe. diff --git a/fs/Makefile b/fs/Makefile index 7b05c79e0cc..a3ee0a361d3 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -5,7 +5,7 @@ # Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. ifdef CONFIG_SPL_BUILD -obj-$(CONFIG_FS_LOADER) += fs.o +obj-$(CONFIG_SPL_FS_LOADER) += fs.o obj-$(CONFIG_SPL_FS_FAT) += fat/ obj-$(CONFIG_SPL_FS_EXT4) += ext4/ obj-$(CONFIG_SPL_FS_CBFS) += cbfs/ |