fs: Fix SPL build if FS_LOADER is enabled
PATCH v2 1/1 fs: Fix SPL build if FS_LOADER is enabled
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.
---
Changes in v2:
- Use CONFIG_IS_ENABLED instead of CONFIG_SPL_BUILD
fs/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fs.c +1 -1
@@ -256,7 +256,7 @@ static struct fstype_info fstypes[] = { .ln = fs_ln_unsupported, },#endif -#ifdef CONFIG_SEMIHOSTING +#if CONFIG_IS_ENABLED (SEMIHOSTING ) { .fstype = FS_TYPE_SEMIHOSTING, .name = "semihosting",
Signature · 1 line
2.34.1
Quoted 11 lines · Mayuresh Chitale
If
FS_LOADERis 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'
Quoted 4 lines
Fix the error by populating the semihosting entry in the
fs_typesarray only for non-SPL builds.Signed-off-by Mayuresh Chitale <[email protected]>
Signature · 1 line
Tom
Quoted 27 lines · Mayuresh Chitale
If
FS_LOADERis 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_typesarray only for non-SPL builds.Signed-off-by Mayuresh Chitale <[email protected]>---
Changes in v2:
- UseCONFIG_IS_ENABLEDinstead ofCONFIG_SPL_BUILDfs/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/fs.c +0
-0
fs/fs.c static struct fstype_info fstypes[] = { · line 262
Quoted 8 lines
fs/fs.c +1
-1@@ -256,7 +256,7 @@ static struct fstype_info fstypes[] = { .ln = fs_ln_unsupported, },#endif -#ifdef CONFIG_SEMIHOSTING +#if CONFIG_IS_ENABLED (SEMIHOSTING ) { .fstype = FS_TYPE_SEMIHOSTING, .name = "semihosting",
Quoted 11 lines · Mayuresh Chitale
If
FS_LOADERis 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'
Quoted 6 lines
Fix the error by populating the semihosting entry in the
fs_typesarray only for non-SPL builds.Signed-off-by Mayuresh Chitale <[email protected]>Reviewed-by Tom Rini <[email protected]>Reviewed-by Sean Anderson <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom