From 5ace1873f142e05a21fe5c1c71f6abcbfef6563c Mon Sep 17 00:00:00 2001 From: Jitesh Shah Date: Wed, 10 Jun 2009 08:00:04 +0200 Subject: [PATCH] Build the kernel rpm on ARM. Since ARM kernels vary widely based on the boards, only a placeholder rpm is created to satisfy the dependencies. the patch should go nowhere near upstream. We should simply build a qemu versatile kernel instead. Signed-off-by: Jitesh Shah Signed-off-by: Kedar Sovani --- Makefile.config | 4 ++-- config-arm | 2 ++ kernel.spec | 21 ++++++++++++++++++--- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Makefile.config b/Makefile.config index fe92eb6..f801ecd 100644 --- a/Makefile.config +++ b/Makefile.config @@ -8,7 +8,7 @@ CONFIGFILES = \ $(CFG)-i586.config $(CFG)-i586-debug.config \ $(CFG)-i686-PAE.config $(CFG)-i686-PAEdebug.config \ $(CFG)-x86_64.config $(CFG)-x86_64-debug.config \ - $(CFG)-s390x.config $(CFG)-arm.config \ + $(CFG)-s390x.config $(CFG)-arm.config $(CFG)-armv5tel.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 \ @@ -98,7 +98,7 @@ 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 +kernel-$(VERSION)-armv5tel.config kernel-$(VERSION)-arm.config: config-arm temp-generic perl merge.pl $^ arm > $@ kernel-$(VERSION)-ppc.config: /dev/null temp-powerpc32-generic diff --git a/config-arm b/config-arm index 18b8437..5941782 100644 --- a/config-arm +++ b/config-arm @@ -91,3 +91,5 @@ CONFIG_RTC_DRV_PL031=m # CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_ERRORS is not set # CONFIG_DEBUG_LL is not set +# CONFIG_PROCESS_TRACER is not set +# CONFIG_DRM is not set diff --git a/kernel.spec b/kernel.spec index c667908..05ada93 100644 --- a/kernel.spec +++ b/kernel.spec @@ -346,6 +346,7 @@ Summary: The Linux kernel %define hdrarch arm %define make_target vmlinux %define kernel_image vmlinux +%define with_debuginfo 0 %endif %if %{nopatches} @@ -369,7 +370,7 @@ Summary: The Linux kernel # 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 and arm. -%define nobuildarches i386 s390 sparc %{arm} +%define nobuildarches i386 s390 sparc %ifarch %nobuildarches %define with_up 0 @@ -461,7 +462,7 @@ Group: System Environment/Kernel License: GPLv2 URL: http://www.kernel.org/ Version: %{rpmversion} -Release: %{pkg_release} +Release: %{pkg_release}.fa1 # 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 %{arm} @@ -1539,6 +1540,15 @@ BuildKernel() { echo USING ARCH=$Arch make -s ARCH=$Arch %{oldconfig_target} > /dev/null +%ifarch %{arm} + make -s ARCH=$Arch V=1 init/main.o + # Copy dummy files as arm kernels vary greatly from board-to-board + echo placeholder > $RPM_BUILD_ROOT/boot/config-$KernelVer + echo placeholder > $RPM_BUILD_ROOT/boot/System.map-$KernelVer + echo placeholder > $RPM_BUILD_ROOT/boot/initrd-$KernelVer.img + echo placeholder > $RPM_BUILD_ROOT/boot/vmlinuz-$KernelVer + mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/kernel +%else make -s ARCH=$Arch V=1 %{?_smp_mflags} $MakeTarget %{?sparse_mflags} make -s ARCH=$Arch V=1 %{?_smp_mflags} modules %{?sparse_mflags} || exit 1 @@ -1557,7 +1567,6 @@ BuildKernel() { $CopyKernel $KernelImage \ $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer chmod 755 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer - mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer # Override $(mod-fw) because we don't want it to install any firmware # We'll do that ourselves with 'make firmware_install' @@ -1580,6 +1589,7 @@ hwcap 0 nosegneg" %{__install} -D -m 444 ldconfig-kernel.conf \ $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-$KernelVer.conf %endif +%endif # And save the headers/makefiles etc for building modules against # @@ -1598,11 +1608,13 @@ hwcap 0 nosegneg" mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/weak-updates # first copy everything cp --parents `find -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build +%ifnarch %{arm} cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build cp System.map $RPM_BUILD_ROOT/lib/modules/$KernelVer/build if [ -s Module.markers ]; then cp Module.markers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build fi +%endif # then drop all but the needed Makefiles/Kconfig files rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Documentation rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts @@ -2019,6 +2031,9 @@ fi # and build. %changelog +* Thu Jun 11 2009 Kedar Sovani - 2.6.4.167.fa1 +- Build dummy kernel rpm for ARM. + * Wed May 27 2009 Kristian Høgsberg - 2.6.4.167 - Actually disable drm-intel-disable-kms-i8xx.patch. -- 1.5.5.6