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

Cross build targetting old kernels on armel

Hello all,
I need to cross build statically linked executables to run on armel
systems using old kernels. For example, 3.0.35, though I'm not sure
this is the oldest in the fleet - targetting a bit lower might be good.

I've been successfully using the armel cross build toolchain on
`jessie` (brought in by crossbuild-essential-armel from emdebian.org).
It has changed positively in `stretch` - the whole toolchain is
available in main, it's no longer necessary to enable the target
architecture in `dpkg`. There's only one problem - executables fail to
start on target devices with "FATAL: kernel too old". `readelf` tells
me the executables built with the `stretch` cross toolchain have "OS:
Linux, ABI: 3.2.0" in the NT_GNU_ABI_TAG, while the `jessie` cross
toolchain used to produce 2.6.32. This seems to correspond to
MIN_KERNEL_SUPPORTED in debian/sysdeps/linux.mk [1][2]. Curiously, I
noticed the symbol is redefined to 2.6.32 for amd64 in `stretch`.

For the short term, it seems fine to continue using `jessie`-based
cross toolchain in a chroot. But it's preferable to switch to the
`stretch`-based toolchain eventually, e.g. to have access to newer

Is rebuilding libc6-dev-armel-cross with a lower MIN_KERNEL_SUPPORTED
(e.g. 2.6.32) the way to go? Is that enough? The applications are
implemented in C++, does libstdc++-6-dev-armel-cross have to be rebuilt

I would appreciate any hints and guidelines on rebuilding
libc6-dev-armel-cross (assuming that's what I need to do) and/or
anything else. I have built packages before to create a backport or
apply a patch (mostly along the lines of [3]), but the cross packages
seem a bit special - it doesn't seem to be as easy as `apt-get source`,
`apt-get build-dep`, `dpkg-buildpackage`. I won't bore you with
everything I've tried and how it failed yet as I'm not sure if I was
going in the right direction.

Looking forward to any pointers. Thanks!

[3] https://wiki.debian.org/SimpleBackportCreation

Reply to: