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

Re: Cross-compile PPC kernel on x86



On Mon, 8 Jun 2009 18:55:30 -0400
Eric Cooper <ecc@cmu.edu> wrote:

> On Mon, Jun 08, 2009 at 01:50:01PM -0700, Amit Uttamchandani wrote:
> > At this point I would like to use the make-kpkg command but how do I
> > specify the paths for the proper toolchain to use?
> > 
> > Right now I am using the command:
> > 
> > make-kpkg --initrd --cross-compile powerpc --revision=test.kernel_image
> 
> I've been using prebuilt kernels for a while, so this may be out of
> date, but I used to use this:
>     make-kpkg --arch powerpc --subarch pmac --cross-compile powerpc-linux ...
> It will look for cross-tools in your PATH that are named
> powerpc-linux-gcc, powerpc-linux-as, etc.

Thanks for the response and the tip. I was able to get it to work using
the following command:

fakeroot make-kpkg --initrd --revision=rt2x00 --arch=powerpc
--cross-compile=/home/amit/src/buildroot-2009.05/build_powerpc/staging_dir/
usr/bin/powerpc-linux- kernel_image

I used buildroot to build the cross compiler toolchain. I was going to
use emdebian but they did not have a working set for powerpc arch.

Note that above I compiled the rt2x00 kernel branch since I needed to
use the driver. However, this should work with any kernel.

And as a final step, I had to generate the initrd image manually and
set up the symbolic links for initrd and vmlinux to point to the build
kernel.

The initrd image was built using the following command:

update-initramfs -c -k 2.6.30-rc6-wl

Hope this helps somebody.

Thanks,
Amit


Reply to: