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@marvell.com Signed-off-by: Kedar Sovani kedars@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
On Thu, Jan 22, 2009 at 10:42:02AM +0530, Kedar Sovani wrote:
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.
Signed-off-by: Lennert Buytenhek buytenh@marvell.com Signed-off-by: Kedar Sovani kedars@marvell.com
Groovy! Just one comment that jwb brought up:
+%ifarch %{arm} +%define nobuildarches i386 s390 sparc %{arm}
I assume the %arm is defined by rpm to expand to the arm5xxxx bits? Is this in upstream rpm now?
regards, Kyle
On Thu, 2009-01-22 at 13:01 -0500, Kyle McMartin wrote:
On Thu, Jan 22, 2009 at 10:42:02AM +0530, Kedar Sovani wrote:
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.
Signed-off-by: Lennert Buytenhek buytenh@marvell.com Signed-off-by: Kedar Sovani kedars@marvell.com
Groovy! Just one comment that jwb brought up:
+%ifarch %{arm} +%define nobuildarches i386 s390 sparc %{arm}
I assume the %arm is defined by rpm to expand to the arm5xxxx bits? Is this in upstream rpm now?
Yes, it is available.
# grep -nrs %arm /usr/lib/rpm/* macros:1195:%arm armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l
regards, Kyle
Thanks, Kedar.
On Fri, Jan 23, 2009 at 10:06:41AM +0530, Kedar Sovani wrote:
I applied it, but there wasn't enough in config-arm to make it build. Rather than just ignore it, I filled in some of the blanks that seemed relevant.
I have no idea what your specific machtype is, but I assumed the versatile thingy so I turned things on/off as Kconfig help text seemed to indicate were for this platform.
Here's a diff, shout or plz send a diff against devel/config-arm if anything seems out of place to you folks.
cheers, Kyle
Index: config-arm =================================================================== RCS file: /cvs/pkgs/rpms/kernel/devel/config-arm,v retrieving revision 1.1 diff -u -p -r1.1 config-arm --- config-arm 26 Jan 2009 07:19:13 -0000 1.1 +++ config-arm 26 Jan 2009 20:23:45 -0000 @@ -5,6 +5,31 @@ CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_ARCH_VERSATILE=y +CONFIG_ARCH_VERSATILE_PB=y +CONFIG_MACH_VERSATILE_AB=y + +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +# CONFIG_CPU_CACHE_ROUND_ROBIN is not set + +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 + +# CONFIG_XIP_KERNEL is not set + +CONFIG_ATAGS_PROC=y + +# CONFIG_FPE_NWFPE is not set +CONFIG_FPE_FASTFPE=y +CONFIG_VFP=y + +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +# CONFIG_PM_TRACE is not set +CONFIG_SUSPEND=y +# CONFIG_PM_TEST_SUSPEND is not set +CONFIG_APM_EMULATION=y
CONFIG_ARM_THUMB=y
@@ -13,3 +38,56 @@ CONFIG_OABI_COMPAT=y
CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/sda1 rootdelay=20"
+CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y + +# CONFIG_CPU_IDLE is not set + +CONFIG_LEDS=y +CONFIG_LEDS_CPU=y + +CONFIG_MTD_AFS_PARTS=y +CONFIG_MTD_ARM_INTEGRATOR=y +CONFIG_MTD_IMPA7=y + +CONFIG_AX88796=m +CONFIG_AX88796_93CX6=y +CONFIG_SMC91X=m +CONFIG_DM9000=m +CONFIG_DM9000_DEBUGLEVEL=4 +# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set +CONFIG_SMC911X=m +CONFIG_SMSC911X=m + +CONFIG_SERIO_AMBAKMI=m + +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y + +CONFIG_I2C_VERSATILE=y + +CONFIG_THERMAL=y + +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set + +CONFIG_FB_ARMCLCD=m + +CONFIG_SND_ARM=y +CONFIG_SND_ARMAACI=m + +CONFIG_USB_MUSB_HDRC=m +# CONFIG_MUSB_PIO_ONLY is not set +CONFIG_USB_TUSB6010=y +# CONFIG_USB_MUSB_DEBUG is not set + +CONFIG_MMC_ARMMMCI=m + +CONFIG_RTC_DRV_PL030=m +CONFIG_RTC_DRV_PL031=m + +# CONFIG_SGI_IOC4 is not set + +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_LL is not set
kernel@lists.fedoraproject.org