[busybox/f14] Disable linux-2.4 modules support, use systemwide uClibc

Daniel Drake dsd at fedoraproject.org
Fri Aug 26 21:59:06 UTC 2011


commit 5a0d1dabaa0cf3ef96e4585a65a57d0adb904c7c
Author: Daniel Drake <dsd at laptop.org>
Date:   Fri Aug 26 22:26:06 2011 +0100

    Disable linux-2.4 modules support, use systemwide uClibc
    
    Otherwise ARM won't build.

 busybox-static.config               |    2 +-
 busybox.spec                        |   47 ++--------
 uClibc-0.9.30.1-etc_localtime.patch |   79 -----------------
 uClibc-0.9.30.1-getline.patch       |   29 ------
 uClibc-0.9.30.1-utmp.patch          |   12 ---
 uClibc.config                       |  164 -----------------------------------
 6 files changed, 11 insertions(+), 322 deletions(-)
---
diff --git a/busybox-static.config b/busybox-static.config
index 4053775..fd3f375 100644
--- a/busybox-static.config
+++ b/busybox-static.config
@@ -452,7 +452,7 @@ CONFIG_DEPMOD=y
 #
 # Options common to multiple modutils
 #
-CONFIG_FEATURE_2_4_MODULES=y
+# CONFIG_FEATURE_2_4_MODULES is not set
 CONFIG_FEATURE_INSMOD_VERSION_CHECKING=y
 CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS=y
 # CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
diff --git a/busybox.spec b/busybox.spec
index 185942d..08d03d7 100644
--- a/busybox.spec
+++ b/busybox.spec
@@ -1,22 +1,16 @@
 Summary: Statically linked binary providing simplified versions of system commands
 Name: busybox
 Version: 1.15.1
-Release: 9%{?dist}
+Release: 10%{?dist}
 Epoch: 1
 License: GPLv2
 Group: System Environment/Shells
 Source: http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
 Source1: busybox-static.config
 Source2: busybox-petitboot.config
-Source3: http://www.uclibc.org/downloads/uClibc-0.9.30.1.tar.bz2
-Source4: uClibc.config
 Patch16: busybox-1.10.1-hwclock.patch
-# patch to avoid conflicts with getline() from stdio.h, already present in upstream VCS
-Patch22: uClibc-0.9.30.1-getline.patch
 Patch23: busybox-1.15.1-man.patch
-Patch24: uClibc-0.9.30.1-utmp.patch
 Patch25: busybox-1.15.1-uname.patch
-Patch26: uClibc-0.9.30.1-etc_localtime.patch
 Patch27: busybox-1.15.1-build_system.patch
 Obsoletes: busybox-anaconda
 URL: http://www.busybox.net
@@ -26,6 +20,7 @@ BuildRequires: libsepol-devel
 BuildRequires: libselinux-static
 BuildRequires: libsepol-static
 BuildRequires: glibc-static
+BuildRequires: uClibc-static
 
 %define debug_package %{nil}
 
@@ -47,45 +42,18 @@ bootloader used on PlayStation 3. The busybox package provides a binary
 better suited to normal use.
 
 %prep
-%setup -q -a3
+%setup -q
 %patch16 -b .ia64 -p1
-cat %{SOURCE4} >uClibc-0.9.30.1/.config1
-%patch22 -b .getline -p1
 %patch23 -b .man -p1
-%patch24 -b .utmp -p1
 %patch25 -b .uname -p1
-%patch26 -b .etc_localtime -p1
 %patch27 -b .build_system -p1
 
 %build
 # create static busybox - the executable is kept as busybox-static
 # We use uclibc instead of system glibc, uclibc is several times
 # smaller, this is important for static build.
-# Build uclibc first.
-cd uClibc-0.9.30.1
-# fixme:
-mkdir kernel-include
-cp -a /usr/include/asm kernel-include
-cp -a /usr/include/asm-generic kernel-include
-cp -a /usr/include/linux kernel-include
 # uclibc can't be built on ppc64,s390,ia64, we set $arch to "" in this case
 arch=`uname -m | sed -e 's/i.86/i386/' -e 's/ppc/powerpc/' -e 's/armv7l/arm/' -e 's/armv5tel/arm/' -e 's/ppc64//' -e 's/powerpc64//' -e 's/ia64//' -e 's/s390.*//'`
-echo "TARGET_$arch=y" >.config
-echo "TARGET_ARCH=\"$arch\"" >>.config
-%ifarch %{arm}
-  echo "CONFIG_ARM_EABI=y" >>.config
-  echo "ARCH_ANY_ENDIAN=n" >>.config
-  echo "ARCH_LITTLE_ENDIAN=y" >>.config
-  echo "ARCH_WANTS_LITTLE_ENDIAN=y" >>.config
-%endif
-cat .config1 >>.config
-if test "$arch"; then yes "" | make oldconfig; fi
-if test "$arch"; then cat .config; fi
-if test "$arch"; then make V=1; fi
-if test "$arch"; then make install; fi
-if test "$arch"; then make install_kernel_headers; fi
-cd ..
-# we are back in busybox-NN.MM dir now
 cp %{SOURCE1} .config
 # set all new options to defaults
 yes "" | make oldconfig
@@ -97,8 +65,8 @@ if test "$arch"; then \
     yes "" | make oldconfig && \
     cat .config && \
     make V=1 \
-        EXTRA_CFLAGS="-isystem uClibc-0.9.30.1/installed/include" \
-        CFLAGS_busybox="-static -nostartfiles -LuClibc-0.9.30.1/installed/lib uClibc-0.9.30.1/installed/lib/crt1.o uClibc-0.9.30.1/installed/lib/crti.o uClibc-0.9.30.1/installed/lib/crtn.o"; \
+        EXTRA_CFLAGS="-isystem %{_includedir}/uClibc" \
+        CFLAGS_busybox="-static -nostartfiles -L%{_libdir}/uClibc %{_libdir}/uClibc/crt1.o %{_libdir}/uClibc/crti.o %{_libdir}/uClibc/crtn.o"; \
 else \
     cat .config && \
     make V=1 CC="gcc $RPM_OPT_FLAGS"; \
@@ -141,6 +109,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/busybox.petitboot.1.gz
 
 %changelog
+* Fri Aug 26 2011 Daniel Drake <dsd at laptop.org> - 1:1.15.1-10
+- Remove Linux 2.4 support from insmod/modprobe/etc.
+- Use systemwide uClibc
+- Fixes build failures on ARM, where such ancient syscalls are not present
+
 * Sat Jun 11 2011 Peter Robinson <pbrobinson at gmail.com> - 1:1.15.1-9
 - Add support for ARM
 


More information about the scm-commits mailing list