All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU
@ 2013-08-09 19:23 Gustavo Zacarias
  2013-08-09 19:23 ` [Buildroot] [PATCH 2/3] uclibc: set MMU usage accordingly Gustavo Zacarias
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Gustavo Zacarias @ 2013-08-09 19:23 UTC (permalink / raw)
  To: buildroot

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>
---
 package/busybox/busybox.mk | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index acc9008..ad8bdaf 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -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)" \
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/3] uclibc: set MMU usage accordingly
  2013-08-09 19:23 [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU Gustavo Zacarias
@ 2013-08-09 19:23 ` Gustavo Zacarias
  2013-08-09 19:23 ` [Buildroot] [PATCH 3/3] eglibc: needs MMU Gustavo Zacarias
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Gustavo Zacarias @ 2013-08-09 19:23 UTC (permalink / raw)
  To: buildroot

On architectures that lack a MMU (like blackfin) uclibc just undefined
ARCH_HAS_MMU which disabled ARCH_USE_MMU.
But for other architectures which may or may not have one like ARM we
need to set this according to user choice.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/uclibc/uclibc.mk | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 36a5001..39877bb 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -242,6 +242,20 @@ endef
 endif
 
 #
+# MMU
+#
+
+ifeq ($(BR2_USE_MMU),y)
+define UCLIBC_MMU_CONFIG
+	$(call UCLIBC_OPT_SET,ARCH_USE_MMU,y,$(@D))
+endef
+else
+define UCLIBC_MMU_CONFIG
+	$(call UCLIBC_OPT_UNSET,ARCH_USE_MMU,$(@D))
+endef
+endif
+
+#
 # IPv6
 #
 
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 3/3] eglibc: needs MMU
  2013-08-09 19:23 [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU Gustavo Zacarias
  2013-08-09 19:23 ` [Buildroot] [PATCH 2/3] uclibc: set MMU usage accordingly Gustavo Zacarias
@ 2013-08-09 19:23 ` Gustavo Zacarias
  2013-08-10  2:08 ` [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU Axel Lin
  2013-08-10 19:26 ` Thomas Petazzoni
  3 siblings, 0 replies; 6+ messages in thread
From: Gustavo Zacarias @ 2013-08-09 19:23 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 toolchain/toolchain-buildroot/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 396a434..7a26441 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -22,6 +22,7 @@ config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
 		   BR2_mips64 || BR2_mips64el || BR2_powerpc || \
 		   BR2_sh     || BR2_sh64     || BR2_sparc   || \
 		   BR2_x86_64
+	depends on BR2_USE_MMU
 	select BR2_TOOLCHAIN_USES_GLIBC
 	# our eglibc.mk enables RPC support
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU
  2013-08-09 19:23 [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU Gustavo Zacarias
  2013-08-09 19:23 ` [Buildroot] [PATCH 2/3] uclibc: set MMU usage accordingly Gustavo Zacarias
  2013-08-09 19:23 ` [Buildroot] [PATCH 3/3] eglibc: needs MMU Gustavo Zacarias
@ 2013-08-10  2:08 ` Axel Lin
  2013-08-10 11:12   ` Gustavo Zacarias
  2013-08-10 19:26 ` Thomas Petazzoni
  3 siblings, 1 reply; 6+ messages in thread
From: Axel Lin @ 2013-08-10  2:08 UTC (permalink / raw)
  To: buildroot

2013/8/10 Gustavo Zacarias <gustavo@zacarias.com.ar>:
> 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>

Hi Gustavo,

I try to build for noMMU with below patches:
[PATCH 1/3] busybox: set/unset CONFIG_NOMMU
[PATCH 2/3] uclibc: set MMU usage accordingly

However, I still got ELF executable:
$ file output/target/bin/busybox
output/target/bin/busybox: setuid ELF 32-bit LSB executable, ARM,
version 1 (SYSV), statically linked, stripped

Regards,
Axel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU
  2013-08-10  2:08 ` [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU Axel Lin
@ 2013-08-10 11:12   ` Gustavo Zacarias
  0 siblings, 0 replies; 6+ messages in thread
From: Gustavo Zacarias @ 2013-08-10 11:12 UTC (permalink / raw)
  To: buildroot

On 08/09/2013 11:08 PM, Axel Lin wrote:

> Hi Gustavo,
> 
> I try to build for noMMU with below patches:
> [PATCH 1/3] busybox: set/unset CONFIG_NOMMU
> [PATCH 2/3] uclibc: set MMU usage accordingly
> 
> However, I still got ELF executable:
> $ file output/target/bin/busybox
> output/target/bin/busybox: setuid ELF 32-bit LSB executable, ARM,
> version 1 (SYSV), statically linked, stripped

Hi Axel.
It's not ready, these are patches just to fix obvious problems.
More will possibly follow unless unless i get pissed off by your
continuous one bit comments.
I already know it's still doing ELF binaries - the toolchain isn't
configured appropiately and without hardware finding the exact way of
doing so isn't easy (seems very likely that it'll require gcc patching).
Thanks and regards.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU
  2013-08-09 19:23 [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU Gustavo Zacarias
                   ` (2 preceding siblings ...)
  2013-08-10  2:08 ` [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU Axel Lin
@ 2013-08-10 19:26 ` Thomas Petazzoni
  3 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2013-08-10 19:26 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Fri,  9 Aug 2013 16:23:39 -0300, Gustavo Zacarias wrote:
> 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>

Committed your three !MMU patches, thanks.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-10 19:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-09 19:23 [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU Gustavo Zacarias
2013-08-09 19:23 ` [Buildroot] [PATCH 2/3] uclibc: set MMU usage accordingly Gustavo Zacarias
2013-08-09 19:23 ` [Buildroot] [PATCH 3/3] eglibc: needs MMU Gustavo Zacarias
2013-08-10  2:08 ` [Buildroot] [PATCH 1/3] busybox: set/unset CONFIG_NOMMU Axel Lin
2013-08-10 11:12   ` Gustavo Zacarias
2013-08-10 19:26 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.