Skip to contentSkip to conversation

fs: Allow to compile CMD_UBIFS when SPL is enabled

PATCH In review Pali Rohár 2 participants 2 messages Apr 5, 2022 – Apr 15, 2022 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: Allow to compile CMD_UBIFS when SPL is enabled

Currently there is no UBIFS support in SPL. But macro CONFIG_CMD_UBIFS is defined also when building SPL. when both CMD_UBIFS and SPL are enabled then build process throw compile error.

Fix check for ubifs code in fstypes[] to allow compiling CMD_UBIFS only in proper U-Boot.

---
 fs/fs.c | 2 ++
 1 file changed, 2 insertions(+)
fs/fs.c +2 -0
index 5c3b1ac09e53..7bf8c440886a 100644
@@ -246,6 +246,7 @@ static struct fstype_info fstypes[] = {
 		.ln = fs_ln_unsupported,
 	},
 #endif
+#ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_CMD_UBIFS
 	{
 		.fstype = FS_TYPE_UBIFS,
@@ -265,6 +266,7 @@ static struct fstype_info fstypes[] = {
 		.ln = fs_ln_unsupported,
 	},
 #endif
+#endif
 #ifdef CONFIG_FS_BTRFS
 	{
 		.fstype = FS_TYPE_BTRFS,
Signature · 1 line
2.20.1
#1 lore raw
Quoted 8 lines · Pali Rohár

Currently there is no UBIFS support in SPL. But macro CONFIG_CMD_UBIFS is defined also when building SPL. when both CMD_UBIFS and SPL are enabled then build process throw compile error.

Fix check for ubifs code in fstypes[] to allow compiling CMD_UBIFS only in proper U-Boot.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom