Compiling custom kernel, need some help

Started by lubod, March 13, 2014, 12:39:34 PM

Previous topic - Next topic

lubod

I'm cross compiling a kernel for the Lime from the Sunxi git repository: 3.4.79
Lubuntu 13.10 x86 (32 bit)
I have what appears to be a working cross compile toolchain, it generates both a uImage and kernel and header .debs.

My problem is, I seem to be missing some environment variables. The kernel (uImage) comes out for armhf, but the .debs for arm:
This is what the Lime shows when I try to install the kernel .deb with my uImage already running:

package architecture (arm) does not match system (armhf)

So, if anyone can tell me what shell variables need to be set on the x86 cross compile system so it generates an armhf .deb to go with the armhf uImage, I'd appreciate it.

Here are the variables I've already set:

export ARCH=arm
export DEB_HOST_ARCH=armhf
export $(dpkg-architecture -aarmhf); export CROSS_COMPILE=arm-linux-gnueabihf-

P.S. If needed I can set the cross-compiling system up with another Linux distribution/version (Lubuntu 14.04, Debian Wheezy, etc.) but on the same hardware (x86 32 bit).

klausbm

On Wheezy I used the command
DEB_HOST_ARCH=armhf fakeroot make-kpkg --arch arm --cross-compile /home/wheezy/bin/arm-linux-gnueabihf- --config silentoldconfig --us --uc binary-arch
to create the Debian packages linux-headers-3.4.79+_3.4.79+-10.00.Custom_armhf.deb, linux-image-3.4.79+_3.4.79+-10.00.Custom_armhf.deb and linux-image-3.4.79+-dbg_3.4.79+-10.00.Custom_armhf.deb after I had created the uImage kernel file. (My user has got the name "wheezy" and I created links for the /usr/bin/arm-linux-gnueabihf-* files in the user directory /home/wheezy/bin.)

lubod

Vielen dank, Klaus. I suspect I will have to set up a Wheezy system to try this, since I have only Ubuntu 13.10 so far. Debian and Ubuntu are diverging, enough that some commands work only on one but not the other.