[PATCH v1] fs: Fix SPL build if FS_LOADER is enabled
Tom Rini
trini at konsulko.com
Thu Sep 14 18:39:57 CEST 2023
On Thu, Sep 14, 2023 at 09:35:15PM +0530, Mayuresh Chitale wrote:
> If FS_LOADER is enabled for the SPL then the build fails with the error:
>
> fs/fs.o:(.data.rel.fstypes+0x128):
> undefined reference to `smh_fs_set_blk_dev'
> fs/fs.o:(.data.rel.fstypes+0x140):
> undefined reference to `smh_fs_size'
> fs/fs.o:(.data.rel.fstypes+0x148):
> undefined reference to `smh_fs_read'
> fs/fs.o:(.data.rel.fstypes+0x150):
> undefined reference to `smh_fs_write'
>
> Fix the error by populating the semihosting entry in the fs_types array
> only for non-SPL builds.
>
> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> Signed-off-by: Mayuresh Chitale <mchitale at ventanamicro.com>
> ---
> fs/fs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/fs.c b/fs/fs.c
> index 2b815b1db0..074db4b20f 100644
> --- a/fs/fs.c
> +++ b/fs/fs.c
> @@ -256,6 +256,7 @@ static struct fstype_info fstypes[] = {
> .ln = fs_ln_unsupported,
> },
> #endif
> +#ifndef CONFIG_SPL_BUILD
> #ifdef CONFIG_SEMIHOSTING
> {
> .fstype = FS_TYPE_SEMIHOSTING,
This should be CONFIG_IS_ENABLED(SEMIHOSTING).
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230914/ecbc3e8b/attachment.sig>
More information about the U-Boot
mailing list