fs: Fix SPL build if FS_LOADER is enabled
PATCH 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.
--- fs/fs.c | 2 ++ 1 file changed, 2 insertions(+)
fs/fs.c +2 -0
@@ -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,
@@ -275,6 +276,7 @@ static struct fstype_info fstypes[] = { .ln = fs_ln_unsupported, },#endif +#endif #ifndef CONFIG_SPL_BUILD #ifdef CONFIG_CMD_UBIFS {
Signature · 1 line
2.34.1
Quoted 25 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.Reviewed-by Heinrich Schuchardt <[email protected]>Signed-off-by Mayuresh Chitale <[email protected]>--- fs/fs.c | 2 ++ 1 file changed, 2 insertions(+)fs/fs.c +0
-0
fs/fs.c static struct fstype_info fstypes[] = { · line 262
Quoted 7 lines
fs/fs.c +1
-0@@ -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).
Signature · 1 line
Tom
Quoted 25 lines · Tom Rini
Quoted 23 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.Reviewed-by Heinrich Schuchardt <[email protected]Quoted 1 line
Signed-off-by Mayuresh Chitale <[email protected]>--- fs/fs.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 14 lines
fs/fs.c static struct fstype_info fstypes[] = { · line 262
Quoted 12 lines
fs/fs.c +1
-0@@ -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).
Ok. I will update it.