[PATCH] kernel: only build kernel-headers on ARM

Kedar Sovani kedars at marvell.com
Thu Jan 22 05:12:02 UTC 2009


Since kernels for different ARM CPUs differ wildly, and since
embedded folks tend to provide their own kernels, this patch makes
the Fedora kernel package only build kernel-headers when built for
ARM.

Please consider for inclusion.

Signed-off-by: Lennert Buytenhek <buytenh at marvell.com>
Signed-off-by: Kedar Sovani <kedars at marvell.com>
---
 Makefile.config |    5 ++++-
 config-arm      |   15 +++++++++++++++
 kernel.spec     |   16 +++++++++++++---
 3 files changed, 32 insertions(+), 4 deletions(-)
 create mode 100644 config-arm

diff --git a/Makefile.config b/Makefile.config
index 09adc2e..bc1420a 100644
--- a/Makefile.config
+++ b/Makefile.config
@@ -9,7 +9,7 @@ CONFIGFILES	= \
 	$(CFG)-i686.config $(CFG)-i686-PAE.config \
 	$(CFG)-i686-debug.config $(CFG)-i686-PAEdebug.config \
 	$(CFG)-x86_64.config $(CFG)-x86_64-debug.config \
-	$(CFG)-s390x.config \
+	$(CFG)-s390x.config $(CFG)-arm.config \
 	$(CFG)-ppc.config $(CFG)-ppc-smp.config \
 	$(CFG)-sparc64.config $(CFG)-sparc64-smp.config \
 	$(CFG)-ppc64.config $(CFG)-ppc64-kdump.config $(CFG)-ppc64-debug.config \
@@ -102,6 +102,9 @@ kernel-$(VERSION)-ppc64-debug.config: config-powerpc64 temp-powerpc-debug-generi
 kernel-$(VERSION)-s390x.config: config-s390x temp-s390-generic
 	perl merge.pl $^ s390 > $@
 
+kernel-$(VERSION)-arm.config: config-arm temp-generic
+	perl merge.pl $^ arm > $@
+
 kernel-$(VERSION)-ppc.config: /dev/null temp-powerpc32-generic
 	perl merge.pl $^ powerpc > $@
 
diff --git a/config-arm b/config-arm
new file mode 100644
index 0000000..692f205
--- /dev/null
+++ b/config-arm
@@ -0,0 +1,15 @@
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_SMP is not set
+
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+
+CONFIG_ARCH_VERSATILE=y
+
+CONFIG_ARM_THUMB=y
+
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+
+CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/sda1 rootdelay=20"
+
diff --git a/kernel.spec b/kernel.spec
index 04fc5ee..2ce025d 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -347,6 +347,14 @@ Summary: The Linux kernel
 %define kernel_image vmlinux
 %endif
 
+%ifarch %{arm}
+%define all_arch_configs kernel-%{version}-arm*.config
+%define image_install_path boot
+%define hdrarch arm
+%define make_target vmlinux
+%define kernel_image vmlinux
+%endif
+
 %if %{nopatches}
 # XXX temporary until last vdso patches are upstream
 %define vdso_arches ppc ppc64
@@ -367,8 +375,8 @@ Summary: The Linux kernel
 # Which is a BadThing(tm).
 
 # We don't build a kernel on i386; we only do kernel-headers there,
-# and we no longer build for 31bit S390. Same for 32bit sparc.
-%define nobuildarches i386 s390 sparc
+# and we no longer build for 31bit S390. Same for 32bit sparc and arm.
+%define nobuildarches i386 s390 sparc %{arm}
 
 %ifarch %nobuildarches
 %define with_up 0
@@ -463,7 +471,7 @@ Version: %{rpmversion}
 Release: %{pkg_release}
 # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
 # SET %%nobuildarches (ABOVE) INSTEAD
-ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ia64 sparc sparc64 s390x alpha alphaev56
+ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ia64 sparc sparc64 s390x alpha alphaev56 %{arm}
 ExclusiveOS: Linux
 
 %kernel_reqprovconf
@@ -562,6 +570,8 @@ Patch00: patch-2.6.%{base_sublevel}-git%{gitrev}.bz2
 %endif
 %endif
 
+Source100: config-arm
+
 %if %{using_upstream_branch}
 ### BRANCH PATCH ###
 %endif
-- 
1.5.3.3





More information about the kernel mailing list