busybox: set/unset CONFIG_NOMMU
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Fri, 9 Aug 2013 19:23:39 +0000 (16:23 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 10 Aug 2013 08:29:42 +0000 (10:29 +0200)
Set busybox .config CONFIG_NOMMU appropiately and streamline this new
setting with the previous BUSYBOX_DISABLE_MMU_APPLETS in a single
BUSYBOX_SET_MMU definition (since it's not just applets now).

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/busybox/busybox.mk

index acc9008a340b5cb4bbc218c71205945d43b80b31..ad8bdaf7021f9615c739a20a5f793d041f1a097a 100644 (file)
@@ -75,6 +75,19 @@ define BUSYBOX_SET_MDEV
 endef
 endif
 
+ifeq ($(BR2_USE_MMU),y)
+define BUSYBOX_SET_MMU
+       $(call KCONFIG_DISABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG))
+endef
+else
+define BUSYBOX_SET_MMU
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG))
+       $(call KCONFIG_DISABLE_OPT,CONFIG_SWAPONOFF,$(BUSYBOX_BUILD_CONFIG))
+       $(call KCONFIG_DISABLE_OPT,CONFIG_ASH,$(BUSYBOX_BUILD_CONFIG))
+       $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH,$(BUSYBOX_BUILD_CONFIG))
+endef
+endif
+
 ifeq ($(BR2_LARGEFILE),y)
 define BUSYBOX_SET_LARGEFILE
        $(call KCONFIG_ENABLE_OPT,CONFIG_LFS,$(BUSYBOX_BUILD_CONFIG))
@@ -133,14 +146,6 @@ define BUSYBOX_INTERNAL_SHADOW_PASSWORDS
 endef
 endif
 
-ifeq ($(BR2_USE_MMU),)
-define BUSYBOX_DISABLE_MMU_APPLETS
-       $(call KCONFIG_DISABLE_OPT,CONFIG_SWAPONOFF,$(BUSYBOX_BUILD_CONFIG))
-       $(call KCONFIG_DISABLE_OPT,CONFIG_ASH,$(BUSYBOX_BUILD_CONFIG))
-       $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH,$(BUSYBOX_BUILD_CONFIG))
-endef
-endif
-
 ifeq ($(BR2_INIT_BUSYBOX),y)
 define BUSYBOX_SET_INIT
        $(call KCONFIG_ENABLE_OPT,CONFIG_INIT,$(BUSYBOX_BUILD_CONFIG))
@@ -172,6 +177,7 @@ endif
 BUSYBOX_POST_EXTRACT_HOOKS += BUSYBOX_COPY_CONFIG
 
 define BUSYBOX_CONFIGURE_CMDS
+       $(BUSYBOX_SET_MMU)
        $(BUSYBOX_SET_LARGEFILE)
        $(BUSYBOX_SET_IPV6)
        $(BUSYBOX_PREFER_STATIC)
@@ -179,7 +185,6 @@ define BUSYBOX_CONFIGURE_CMDS
        $(BUSYBOX_NETKITBASE)
        $(BUSYBOX_NETKITTELNET)
        $(BUSYBOX_INTERNAL_SHADOW_PASSWORDS)
-       $(BUSYBOX_DISABLE_MMU_APPLETS)
        $(BUSYBOX_SET_INIT)
        $(BUSYBOX_SET_WATCHDOG)
        @yes "" | $(MAKE) ARCH=$(KERNEL_ARCH) CROSS_COMPILE="$(TARGET_CROSS)" \