kernel package

Oliver Falk oliver at linux-kernel.at
Mon May 14 07:53:45 UTC 2007


On 05/11/2007 02:01 PM, David Woodhouse wrote:
> Readable diff attached. And the answer (at least from me) is no -- I'm
> not happy about applying it with all the ifdefs. We can apply the clean
> bits though -- obviously it won't actually build, but then we can set
> about actually _fixing_ exec-shield, etc.

OK. If you enable alpha and apply the patches that are really needed, I 
can build it and tell you where and how it breaks then.

> Can you explain each ifarch?

Sure.

 > And show Patch701? Why at the end?

--- drivers/net/Kconfig.no_fec_mpc52xx_for_alpha.patch  2007-05-03 
14:18:50.000000000 +0200
+++ drivers/net/Kconfig 2007-05-03 14:18:55.000000000 +0200
@@ -1889,7 +1889,6 @@
           controller on the Renesas H8/300 processor.

  source "drivers/net/fec_8xx/Kconfig"
-source "drivers/net/fec_mpc52xx/Kconfig"
  source "drivers/net/fs_enet/Kconfig"

  endmenu

linux-2.6-mpc52xx-fec.patch adds it and I wasn't able to disable it via 
config as far as I can remember; So I had to patch it out at the end...

> Once upon a time the folks at HP were threatening to send me SMP Alpha
> boxen -- not sure if I could still pull that off...

Anyone from HP here? Jay, do you have any good contacts?

> Index: kernel-2.6.spec
> ===================================================================
> RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
> retrieving revision 1.3148
> diff -u -r1.3148 kernel-2.6.spec
> --- kernel-2.6.spec	10 May 2007 23:26:42 -0000	1.3148
> +++ kernel-2.6.spec	11 May 2007 11:57:12 -0000
> @@ -167,6 +167,16 @@
>  %define usesparse 0
>  %endif
>  
> +%ifarch alpha alphaev5 alphaev56 alphaev6 alphaev67
> +%define with_smp 0
> +%define with_pae 0
> +%define with_xen 0
> +%define with_kdump 0
> +%define with_debug 0
> +%define usesparse 0
> +%define with_modsign 0
> +%endif
> +

This part is needed for sure. We will enable SMP after the normal up 
kernel compiles fine and I found someone with a smp-capable box who can 
do the testing.

>  # Per-arch tweaks
>
>  %ifarch %{all_x86}
> @@ -238,6 +248,13 @@
>  %define xen_image vmlinux.gz
>  %endif
>  
> +%ifarch alpha alphaev6 alphaev67
> +%define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-alpha*.config
> +%define image_install_path boot
> +%define make_target boot
> +%define kernel_image vmlinux
> +%endif
> +

Also quite clear I think.

>  # To temporarily exclude an architecture from being built, add it to
>  # %nobuildarches. Do _NOT_ use the ExclusiveArch: line, because if we
>  # don't build kernel-headers then the new build system will no longer let
> @@ -290,13 +307,13 @@
>  Group: System Environment/Kernel
>  License: GPLv2
>  Version: %{rpmversion}
> -Release: %{release}
> +Release: %{release}axp

Of course we do not need this. It's just because I intentionally wanted 
to build an new kernel for AlphaCore and we have the convention to add 
axp to the release, so people know, it's coming from Fedora, but is 
modified for AC.

>  %if 0%{?olpc}
>  ExclusiveArch: i386 i586
>  %else
>  # DO NOT CHANGE THIS LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
>  # SET %nobuildarches (ABOVE) INSTEAD
> -ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ia64 sparc sparc64 s390 s390x
> +ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ia64 sparc sparc64 s390 s390x alpha alphaev6 alphaev67
>  %endif
>  ExclusiveOS: Linux
>  Provides: kernel-drm = 4.3.0
> @@ -363,6 +380,9 @@
>  #Source67: kernel-%{kversion}-sparc64.config
>  #Source68: kernel-%{kversion}-sparc64-smp.config
>  
> +Source50: kernel-%{kversion}-alpha.config
> +Source50: kernel-%{kversion}-alpha-smp.config

I don't have a smp config at the moment. So we need to put this out, 
else up will no build clean.

>  Source80: config-rhel-generic
>  Source81: config-rhel-x86-generic
>  Source82: config-olpc-generic
> @@ -452,6 +472,9 @@
>  
>  # 600 - 699   sparc(64)
>  
> +# 700 - 799   alpha
> +Patch701: linux-2.6-no_fec_for_alpha.patch
> +

See above notes.

>  #
>  # Patches 800 through 899 are reserved for bugfixes to the core system
>  # and patches related to how RPMs are build
> @@ -1001,7 +1024,9 @@
>  # Patches 10 through 100 are meant for core subsystem upgrades
>  
>  # Roland's utrace ptrace replacement.
> +%ifnarch alpha alphaev5 alphaev56 alphaev6 alphaev67
>  %patch10 -p1
> +%endif
>  %patch11 -p1

Compile errors.

>  # Power management fixes
> @@ -1106,7 +1131,9 @@
>  %patch800 -p1
>  
>  # Exec shield
> +%ifnarch alpha alphaev5 alphaev56 alphaev6 alphaev6
>  %patch810 -p1
> +%endif

Even more compile errors. :-)

>  #
>  # GPG signed kernel modules
> @@ -1181,7 +1208,9 @@
>  %patch1018 -p1
>  %patch1019 -p1
>  %patch1020 -p1
> +%ifnarch alpha alphaev5 alphaev56 alphaev6 alphaev6
>  %patch1021 -p1
> +%endif

Don't remember why. Must have been a compile error as well.

>  %patch1022 -p1
>  %if %{includexen}
>  %patch1023 -p1
> @@ -1198,7 +1227,9 @@
>  #
>  # /dev/crash driver for the crashdump analysis tool
>  #
> +%ifnarch alpha alphaev5 alphaev56 alphaev6 alphaev67
>  %patch1060 -p1
> +%endif

Compile error.

>  %if %{includexen}
>  %patch1061 -p1
>  %endif
> @@ -1258,7 +1289,9 @@
>  # DVB spinlock bug
>  %patch1700 -p1
>  # setuid /proc/self/maps fix.
> +%ifnarch alpha alphaev5 alphaev56 alphaev6 alphaev67
>  %patch1720 -p1
> +%endif

Compile error.

>  # Add a safety net to softlockup so that it doesn't prevent installs.
>  %patch1740 -p1
>  # Speed up spinlock debug.
> @@ -1346,7 +1379,9 @@
>  #
>  
>  # Pull in the new firewire stack
> +%ifnarch alpha alphaev5 alphaev56 alphaev6 alphaev67
>  %patch5000 -p1
> +%endif

Compile error.

>  #
>  # final stuff
> @@ -1360,6 +1395,9 @@
>  %patch10002 -p1
>  %patch10003 -p1
>  
> +# alpha related, but must be done at the end...
> +%patch701 -p0
> +
>  # END OF PATCH APPLICATIONS

See above note.

There are not *many* ifnarchs at the moment, but it makes the kernel 
compile for alpha. Last run was successful, but packaging was a problem 
because smp config is missing...

Best,
  Oliver




More information about the fedora-devel-list mailing list