4

I'm doing a cross-compile Ubuntu kernel build.

I am following instructions for building Ubuntu for omap:

fakeroot debian/rules clean
do_tools=false skipabi=true skipmodule=true dpkg-buildpackage -B -aarmhf -uc -us

But the above always makes it from clean, and takes a lot of time. I just make a change in the same file, so I don't need to rebuild from clean.

I have tried to skip the line fakeroot debian/rules clean and also removed -uc, but it still does it from clean.

I then tried another method and did:

make -j3 deb-pkg

But then I got a new error:

dpkg-deb: building package `linux-firmware-image' in `../linux-firmware-image_3.4.27+-1_all.deb'.
dpkg-gencontrol: error: current host architecture 'armhf' does not appear in package's architecture list ()
make[1]: *** [deb-pkg] Error 255

Then I needed to wait ~2 hours for build to finish...

All I'm trying to do is to modify a board file (unfortunately I can't make it a module, as far as I understand).

Thank you for any idea.

Zanna
  • 70,465
ransh
  • 313

1 Answers1

3

When using Ubuntu debian packaged kernels, I build arm64 kernels much like the following (you should be able to substitute arm64 for the armhf arch specific flags that match your target and cross-compiler).

export ARCH=arm64
export $(dpkg-architecture -aarm64); export CROSS_COMPILE=aarch64-linux-gnu-

fakeroot debian/rules clean
debian/rules build
fakeroot debian/rules binary

For subsequent builds, I use:

rm debian/stamps/stamp-build*
debian/rules build
fakeroot debian/rules binary
  • Hi, I get an error ..... install -m755 debian/tools/generic /home/user/kernel/kernel-ubuntu/debian/linux-ti-omap4-tools-common/usr/sbin/hv_kvp_daemon;
    fi install: cannot stat `debian/tools/generic': No such file or directory make: *** [install-tools] Error 1
    – ransh Jul 26 '16 at 12:51
  • Worth mentioning that most users will want to build just one kernel with build-generic and binary-generic, otherwise e.g. Ubuntu-4.15.0-20.21 builds two: one for debian.master/config/arm64/config.flavour.generic and one for config.flavour.snapdragon. – Ciro Santilli OurBigBook.com Oct 08 '18 at 21:29