[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: attached an ugly and hacky patch which allows me to build 2.6.15 on powerpc.



Hi,
On Mon, 26 Dec 2005 21:25:15 +0100, Sven Luther <sven.luther@wanadoo.fr> said: 

> hi Manoj, about this issue, i attach a quick and dirty patch, which
> at least pinpoints the two places where we have an issue on
> powerpc. The main point is that on powerpc the debian arch is
> 'powerpc', while the kernel arch can be either ppc, ppc64 or
> powerpc, depending on the version and the choices made.

        I am not sure I follow what you think debian arch is. There is
 the architecture variable that kernel-package uses, that is set based
 on DEB_HOST_ARCH_CPU (or, if that does not exist, DEB_HOST_GNU_CPU).

        Telling make-kpkg something that does not match using --arch
 is likely to cause problems, as you found out.
        
> There is some code, with some funny mention of powerpc64 i don't
> know where it comes from, that sets KERNEL_CROSS if the debian
> architecture is different than the kernel arch, which obviously is a
> wrong assumption in this case, and the same errors shows in the
> dpkg-architecture call.

        Err, no. The idea is that if --arch is set differently from
 DEB_HOST_ARCH_CPU, you must be cross-compiling. So, --arch is used to
 tell make-kpkg that while DEB_HOST_ARCH_CPU is something, I am really
 compiling for a machine where DEB_HOST_ARCH_CPU is what I am passing
 in as --arch.

> I would say that the best solution here is to have some mapping
> between the powerpc arches (ppc, ppc64, powerpc, powerpc32 and
> powerpc64) to the debian powerpc (and powerpc64) arch, none of them
> needs a cross compiler since we have a real biarch toolchain now.

        Again, there is no real debian arch as far as kernel-package
 is concerned. Based on DEB_HOST_ARCH_CPU, we just select a make
 snippet to include, which may set the kernel arch, as you put it,
 based on tests and context.

> Hoping to see a real fix in the archive soon, which would allow me
> to build the 2.6.15-rc (and 2.6.15 once it is released, which will
> be RSN hopefully), on powerpc.

        Well, I think we need to use subarch, which tells make-kpkg
 that while DEB_HOST_ARCH_CPU is something, what sub architecture of
 that CPU we are compiling for. And then make sure that powerpc.mk,
 ppc.mk, and ppc64.mk do the right thing. Anything else is making
 powerpc CPU's do things very dofferently from the other 10
 architectures; and this divergence is not a good thing.

> The first hunk of this patch sets ARCH=ppc again for 32bit, i am not
> sure i will be going this way or not finally, since upstream
> recomends me to go with ARCH=powerpc on 32bit only for 2.6.16 and
> later.

        You are talking about KERNEL_ARCH. Sure, you are the domain
 expert about what the value for KERNEL_ARCH  should be for all sub
 architectures for the DEB_HOST_ARCH_CPU==powerpc.


        manoj
-- 
Do not underestimate the power of the Force.
Manoj Srivastava     <srivasta@acm.org>    <http://www.golden-gryphon.com/>
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: