Skip to contentSkip to conversation

linux: enable ubi and ubifs if we build a ubifs root filesystem

PATCH New Fabio Porcedda 3 participants 3 messages Jul 31, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux: enable ubi and ubifs if we build a ubifs root filesystem

---
 linux/linux.mk | 3 +++
 1 file changed, 3 insertions(+)
linux/linux.mk +3 -0
index ca216a3..cf43818 100644
@@ -166,6 +166,9 @@ define LINUX_CONFIGURE_CMDS
 		$(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config))
 	$(if $(BR2_PACKAGE_SYSTEMD),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config))
+	$(if $(BR2_TARGET_ROOTFS_UBIFS),
+		$(call KCONFIG_ENABLE_OPT,CONFIG_MTD_UBI,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_UBIFS_FS,$(@D)/.config))
 	yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig
 endef
 
Signature · 1 line
1.7.11.3
#1 lore raw

PATCH 1/1 linux: enable ubi and ubifs if we build a ubifs root filesystem

Quoted 10 lines · Fabio Porcedda
---
 linux/linux.mk | 3 +++
 1 file changed, 3 insertions(+)
linux/linux.mk +0 -0
index ca216a3..cf43818 100644

linux/linux.mk define LINUX_CONFIGURE_CMDS · line 174

Quoted 9 lines
linux/linux.mk +3 -0
@@ -166,6 +166,9 @@ define LINUX_CONFIGURE_CMDS
                $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config))
        $(if $(BR2_PACKAGE_SYSTEMD),
                $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config))
+       $(if $(BR2_TARGET_ROOTFS_UBIFS),
+               $(call KCONFIG_ENABLE_OPT,CONFIG_MTD_UBI,$(@D)/.config)
+               $(call KCONFIG_ENABLE_OPT,CONFIG_UBIFS_FS,$(@D)/.config))
        yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig
 endef
 

I'm a little bit concerning about post modifications to kernel configs during the build process (not only this patch).
It may not be so explicit that the kernel was "changed" when the users were only peaking and poking the root file system.

Since the Kernel may only be tested and released with certain configurations. It will be helpful if customer feedback on errors could include what they did explicitly as possible.

Would it be better to issue warnings or even fail-stop the building process after sanity checks?
If users really need to change the kernel configuration, make sure they are aware of their changes. :)

Thanks,
Roy

#2 lore raw

PATCH 1/1 linux: enable ubi and ubifs if we build a ubifs root filesystem

In reply to Fabio Porcedda

Hello,

Thanks for proposing this patch!

Le Tue, 31 Jul 2012 09:50:51 +0200,
Fabio Porcedda <[email protected]> a ?crit :

linux/linux.mk define LINUX_CONFIGURE_CMDS · line 171

Quoted 3 lines
linux/linux.mk +3 -0
+	$(if $(BR2_TARGET_ROOTFS_UBIFS),
+		$(call KCONFIG_ENABLE_OPT,CONFIG_MTD_UBI,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_UBIFS_FS,$(@D)/.config))

As Tzu-Jung said, the topic of automatically adjusting the kernel configuration depending on other configuration options is a sensitive topic. For example: should we enable Netfilter in the kernel if iptables package is enabled? Should we enable the MTD subsystem in the kernel if the mtd-utils package is enabled? Since we definitely don't want to fiddle too much with the kernel configuration of the user, we trying to limit the number of such automatic tweaks.

At the moment, I'm leaning towards not doing automatic modification of the kernel configuration depending on the root filesystem type selected in Buildroot. Let's keep this up to the user. But I'll listen to the comments of the other developers/users.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com