Welcome, Guest

Author Topic: Compiling custom kernel, need some help  (Read 2223 times)

lubod

  • Newbie
  • *
  • Posts: 15
  • Karma: +1/-0
Compiling custom kernel, need some help
« on: March 13, 2014, 12:39:34 PM »
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:

Code: [Select]
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).
« Last Edit: March 13, 2014, 12:43:59 PM by lubod »

klausbm

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
Re: Compiling custom kernel, need some help
« Reply #1 on: March 13, 2014, 06:40:30 PM »
On Wheezy I used the command
Code: [Select]
DEB_HOST_ARCH=armhf fakeroot make-kpkg --arch arm --cross-compile /home/wheezy/bin/arm-linux-gnueabihf- --config silentoldconfig --us --uc binary-archto 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

  • Newbie
  • *
  • Posts: 15
  • Karma: +1/-0
Re: Compiling custom kernel, need some help
« Reply #2 on: March 13, 2014, 10:58:04 PM »
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.