Re: kernel-package: some enhancements for all archs
> I like the subarch script. Thanks. I also like your proposal
> for multiple .config files, which allows one to compile for several
> architectures from the same source tree (I guess). However, I have
> doscovered a flaw in the rules file you have:
really possible :-)
>
> See, if the architecture is not m68k, then the first case is
> taken. So, only architectures which say m68k go to the else part, so
> the powerpc branch is never taken. This does not seem right. Is this
> closer to what is correct?
>
> ______________________________________________________________________
>
> # SILO can boot gzip'ed kernel; m68k has vmlinuz, just the kernel makefiles
> # don't seem to realise it.
> #ifneq ($(strip $(architecture)),m68k)
> ifeq ($(strip $(filter m68k ppc powerpc,$(architecture))),)
> cp arch/$(architecture)/boot/$(kimage) \
> debian/tmp-image/boot/vmlinuz-$(version)
> chmod 644 debian/tmp-image/boot/vmlinuz-$(version)
> else
> ifneq ($(strip $(filter ppc powerpc,$(architecture))),)
> SUB=`awk '/machine/ { print $3 }' /proc/cpuinfo`
> ifeq ($(strip $(SUB)),CHRP)
> cp arch/$(KERNEL_ARCH)/$(SUB)boot/$(kimage) \
> debian/tmp-image/boot/vmlinuz-$(version)
> else
> cp arch/$(KERNEL_ARCH)/$(SUBARCH)/boot/$(kimage) \
> debian/tmp-image/boot/vmlinuz-$(version)
> chmod 644 debian/tmp-image/boot/vmlinuz-$(version)
> endif
> else
> gzip -9vc vmlinux > debian/tmp-image/boot/vmlinuz-$(version)
> chmod 644 debian/tmp-image/boot/vmlinuz-$(version)
> endif
> endif
Hmmmmm ... the situation is this:
m68k use linux/vmlinux
powerpc use:
if CHRP then linux/arch/ppc/chrpboot/zImage
else linux/arch/ppc/boot/zImage
(don't know for PReP or APUS or MBX or ... i must ask for this)
alpha/sparc/mips use linux/arch/<ARCH>/boot/zImage
i386 use linux/arch/i386/boot/ zImage or bzImage
So it should be like this:
if [arch == m68k]
then
$(kimage)
elif [arch == powerpc]
then
if [subarch == CHRP]
then
arch/$(KERNEL_ARCH)/$(SUB)boot/$(kimage)
else
arch/$(KERNEL_ARCH)/boot/$(kimage)
fi
else
arch/$(architecture)/boot/$(kimage)
fi
The last one match for alpha, mips, sparc(64) and for the future arm.
If this architectures gets also SubArchs (alpha ????, sparc or sparc64, sun3, sun4, ... ),
this list must be enlarge (check /proc/cpuinfo or /proc/machine).
Bugs or TODO for the script:
- is /proc mounted ??
- .config scripts for kernel 2.0 and 2.2 (and any new changes)
Is the default config.* not the right one start `menuconfig`
or pure `make config`
- exec 'subarch' script
- ask user for which subarch should the script build the image
(example: user on i686 but he will have the generic image for all
ia32 systems or to precompile for sparc, ...)
- report the selected arch, subarch, lilo, path, kernelversion, ...
before starting
- make clean, oldconfig only once (during buildpackage)
- x11 gtk-- api :-))) (just kidding)
Thats all for now,
Hartmut
--
Hartmut Koptein EMail:
Friedrich-van-Senden-Str. 7 koptein@et-inf.fho-emden.de
26603 Aurich
Tel.: +49-4941-10390 koptein@debian.org
--
To UNSUBSCRIBE, email to debian-powerpc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: