]> git.dujemihanovic.xyz Git - u-boot.git/commit
fs: Fix SPL build if SPL_FS_LOADER is enabled and FS_LOADER is disabled
authorHiago De Franco <hiago.franco@toradex.com>
Mon, 16 Sep 2024 13:03:36 +0000 (15:03 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 2 Oct 2024 19:35:31 +0000 (13:35 -0600)
commita280368b4874f44304c14bc117815855dea1969a
tree03c9b83c1d6cd9f0d912bc99eb8148dd43273d25
parenteeeb35bfb66525dc8be9fc76b1931f2488c2b264
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>
configs/sandbox_noinst_defconfig
drivers/block/Kconfig
fs/Makefile