Skip to contentSkip to conversation

fs: Allow to compile FS_BTRFS when SPL is enabled

PATCH In review Pali Rohár 2 participants 2 messages Apr 7, 2022 – Apr 20, 2022 VFS

lore
Share & tools
lore
#0 lore raw

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

Currently there is no btrfs support in SPL. But macro CONFIG_FS_BTRFS is defined also when building SPL. When both FS_BTRFS and SPL are enabled then build process throw compile error.

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

---
 fs/fs.c | 2 ++
 1 file changed, 2 insertions(+)
fs/fs.c +2 -0
index b4306cf8499e..100a2a63810a 100644
@@ -267,6 +267,7 @@ static struct fstype_info fstypes[] = {
 	},
 #endif
 #endif
+#ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_FS_BTRFS
 	{
 		.fstype = FS_TYPE_BTRFS,
@@ -286,6 +287,7 @@ static struct fstype_info fstypes[] = {
 		.ln = fs_ln_unsupported,
 	},
 #endif
+#endif
 #if CONFIG_IS_ENABLED(FS_SQUASHFS)
 	{
 		.fstype = FS_TYPE_SQUASHFS,
Signature · 1 line
2.20.1
#1 lore raw
Quoted 8 lines · Pali Rohár

Currently there is no btrfs support in SPL. But macro CONFIG_FS_BTRFS is defined also when building SPL. When both FS_BTRFS and SPL are enabled then build process throw compile error.

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

Applied to u-boot/master, thanks!

Signature · 1 line
Tom