Skip to contentSkip to conversation

ipkg: fix ARM MMU-less build

PATCH New Baruch Siach 4 participants 6 messages Jul 26, 2016 – Jul 27, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipkg: fix ARM MMU-less build

The code incorrectly tests for __ARCH_HAS_MMU__ which is true for the ARM architecture, instead of __ARCH_USE_MMU__ which applies to this specific build. Add a patch making direct use of HAVE_FORK that configure defines when fork() is detected.

Fixes:
http://autobuild.buildroot.net/results/6cf/6cf75e08795d9ab194ce4e882c0f4858bad979c3/
http://autobuild.buildroot.net/results/964/964d8f694bc7d05b35411eabfbadf40bbf6337ae/
http://autobuild.buildroot.net/results/0f2/0f2cddf89af3ad4330556acd04ab6cb080370e24/

---
 package/ipkg/0002-fix-arm-nommu.patch | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 package/ipkg/0002-fix-arm-nommu.patch
package/ipkg/0002-fix-arm-nommu.patch new file +22 -0
new file mode 100644
index 000000000000..42279a958cc1
@@ -0,0 +1,22 @@
+libbb: fix ARM no MMU build
+
+uClibc-ng defines __ARCH_HAS_MMU__ for ARM because the architecture may
+potentially have MMU. The code should test for __ARCH_USE_MMU__. But since
+configure detects the presence of fork(), use HAVE_FORK directly.
+
+Signed-off-by: Baruch Siach <[email protected]>
+---
+Patch status: no active upstream
+
+diff -Nuar ipkg-0.99.163-orig/libbb/libbb.h ipkg-0.99.163/libbb/libbb.h
+--- ipkg-0.99.163-orig/libbb/libbb.h	2006-02-06 10:13:02.000000000 +0200
++++ ipkg-0.99.163/libbb/libbb.h	2016-07-26 13:50:09.296988855 +0300
+@@ -341,7 +341,7 @@
+ #define CONSOLE_DEV "/dev/console"
+ 
+ /* Cope with mmu-less systems somewhat gracefully */
+-#if defined(__UCLIBC__) && !defined(__ARCH_HAS_MMU__)
++#if !defined(HAVE_FORK)
+ #define fork	vfork
+ #endif
+ 
Signature · 1 line
2.8.1
#1 lore raw

PATCH 1/1 ipkg: fix ARM MMU-less build

Quoted 8 lines · Baruch Siach

The code incorrectly tests for __ARCH_HAS_MMU__ which is true for the ARM architecture, instead of __ARCH_USE_MMU__ which applies to this specific build. Add a patch making direct use of HAVE_FORK that configure defines when fork() is detected.

Quoted 8 lines

Fixes:
http://autobuild.buildroot.net/results/6cf/6cf75e08795d9ab194ce4e882c0f4858bad979c3/
http://autobuild.buildroot.net/results/964/964d8f694bc7d05b35411eabfbadf40bbf6337ae/
http://autobuild.buildroot.net/results/0f2/0f2cddf89af3ad4330556acd04ab6cb080370e24/

---
package/ipkg/0002-fix-arm-nommu.patch | 22 ++++++++++++++++++++++

ipkg has been superceded by opkg. May be it should just be removed?

Quoted 34 lines
1 file changed, 22 insertions(+)

create mode 100644 package/ipkg/0002-fix-arm-nommu.patch

package/ipkg/0002-fix-arm-nommu.patch new file +22 -1
new file mode 100644
index 000000000000..42279a958cc1
@@ -0,0 +1,22 @@
+libbb: fix ARM no MMU build
+
+uClibc-ng defines __ARCH_HAS_MMU__ for ARM because the architecture may
+potentially have MMU. The code should test for __ARCH_USE_MMU__. But since
+configure detects the presence of fork(), use HAVE_FORK directly.
+
+Signed-off-by: Baruch Siach <[email protected]>
+---
+Patch status: no active upstream
+
+diff -Nuar ipkg-0.99.163-orig/libbb/libbb.h ipkg-0.99.163/libbb/libbb.h
+--- ipkg-0.99.163-orig/libbb/libbb.h	2006-02-06 10:13:02.000000000 +0200
++++ ipkg-0.99.163/libbb/libbb.h	2016-07-26 13:50:09.296988855 +0300
+@@ -341,7 +341,7 @@
+ #define CONSOLE_DEV "/dev/console"
+
+ /* Cope with mmu-less systems somewhat gracefully */
+-#if defined(__UCLIBC__) && !defined(__ARCH_HAS_MMU__)
++#if !defined(HAVE_FORK)
+ #define fork	vfork
+ #endif
+
--

2.8.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160726/426ad574/attachment.asc>

#2 lore raw

PATCH 1/1 ipkg: fix ARM MMU-less build

Hello,

Quoted 12 lines · Khem Raj
Quoted 12 lines · Baruch Siach

The code incorrectly tests for __ARCH_HAS_MMU__ which is true for the ARM architecture, instead of __ARCH_USE_MMU__ which applies to this specific build. Add a patch making direct use of HAVE_FORK that configure defines when fork() is detected.

Fixes:
http://autobuild.buildroot.net/results/6cf/6cf75e08795d9ab194ce4e882c0f4858bad979c3/
http://autobuild.buildroot.net/results/964/964d8f694bc7d05b35411eabfbadf40bbf6337ae/
http://autobuild.buildroot.net/results/0f2/0f2cddf89af3ad4330556acd04ab6cb080370e24/

Quoted 6 lines
Quoted 3 lines

---
package/ipkg/0002-fix-arm-nommu.patch | 22 ++++++++++++++++++++++

ipkg has been superceded by opkg. May be it should just be removed?

Agreed. I'm hesitating between removing entirely, or marking as deprecated.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 ipkg: fix ARM MMU-less build

Quoted 20 lines · Thomas Petazzoni

Hello,

Quoted 17 lines · Khem Raj
Quoted 15 lines · Baruch Siach

The code incorrectly tests for __ARCH_HAS_MMU__ which is true for the ARM architecture, instead of __ARCH_USE_MMU__ which applies to this specific build. Add a patch making direct use of HAVE_FORK that configure defines when fork() is detected.

Fixes:
http://autobuild.buildroot.net/results/6cf/6cf75e08795d9ab194ce4e882c0f4858bad979c3/
http://autobuild.buildroot.net/results/964/964d8f694bc7d05b35411eabfbadf40bbf6337ae/
http://autobuild.buildroot.net/results/0f2/0f2cddf89af3ad4330556acd04ab6cb080370e24/

---
package/ipkg/0002-fix-arm-nommu.patch | 22 ++++++++++++++++++++++

Quoted 4 lines
Quoted 1 line

ipkg has been superceded by opkg. May be it should just be removed?

Agreed. I'm hesitating between removing entirely, or marking as deprecated.

Just remove it, I don't think it is used anywhere these days.

#4 lore raw

PATCH 1/1 ipkg: fix ARM MMU-less build

In reply to Thomas Petazzoni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hi,

Quoted 4 lines
Quoted 1 line

ipkg has been superceded by opkg. May be it should just be removed?

Agreed. I'm hesitating between removing entirely, or marking as deprecated.

I've marked it as deprecated.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/1 ipkg: fix ARM MMU-less build

In reply to Baruch Siach

Hello,

Quoted 4 lines · Baruch Siach

The code incorrectly tests for __ARCH_HAS_MMU__ which is true for the ARM architecture, instead of __ARCH_USE_MMU__ which applies to this specific build. Add a patch making direct use of HAVE_FORK that configure defines when fork() is detected.

Your commit log and patch descriptor seems to imply it's ARM related, but it's not. m68k is equally affected. So I've changed the commit log and the patch description, and applied (even if ipkg has been marked deprecated).

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com