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

Re: How to cross-compile a kernel for armel, not arm?



On Thu, Feb 18, 2010 at 04:32:37PM +0100, Niccolo Rigacci wrote:
> 
> I'm running Debian Lenny on my LaCie NAS, armel architecture.
> 
> I compiled a new kernel on my i386 Lenny box, using the Emdebian 
> toolchain and the make-kpkg tool.
> 
> The kernel works nicely, but the resulting Debian package is for 
> "arm", not for "armel" so I cannot install it with dpkg -i

I received the right hint from Gerardo Poggio, so I post it here 
for future reference.

The solution (to make the DPKG_ARCH=armel and KERNEL_ARCH=arm) 
was to edit 
/usr/share/kernel-package/ruleset/misc/kernel_arch.mk, and add 
the following lines at the end:

ifeq ($(strip $(architecture)),armel)
  KERNEL_ARCH := arm
endif
ifeq ($(strip $(architecture)),armeb)
  KERNEL_ARCH := arm
endif

Then I run:

cd /usr/src/linux
export CROSS_COMPILE=arm-linux-gnueabi-
export ARCH=arm
make-kpkg --arch armel --cross_compile=arm-linux-gnueabi- clean
make-kpkg --revision=lacie.0.1 --initrd --arch=armel \
          --cross_compile=arm-linux-gnueabi- kernel_image
make uImage

-- 
Niccolo Rigacci
Firenze - Italy


Reply to: