Will building older versions of the linux kernel on newer versions of Ubuntu work? - linux

Let's say that I need to port an older version of the Linux kernel (3.2 for example) to a custom board. I'll be cross-compiling from a Ubuntu environment.
Will I need to be running a certain version of Ubuntu to successfully build a certain version of the kernel, or will I be fine with any version of Ubuntu?

Related

Is there any workaround for glibc (2.28) compilation for very old kernel (older than 3.2.0) using --enable-kernel=VERSION?

I'm trying to cross-compile (from x86_64 linux to ARMv7a) for certain applications. The host was running Linux 4.4.0 and the target was running Linux 3.0.2
I was able to successfully build such application using cross-compile toolchain from Linaro
However, the problem occurred when I executed the binary
Fatal: kernel too old
After some researchs on the Internet, I discovered that workaround would be to also cross-compile glibc as well with --enable-kernel=VERSION option and another problem came with this option.
configure: WARNING: minimum kernel version reset to 3.2.0
Is there any workaround to set kernel version to the one older than 3.2.0?
Is there any workaround to set kernel version to the one older than 3.2.0?
No. Support for kernels below 3.2 was dropped in glibc-2.24, and you can't bring it back (short of reverting the commits that did it).
You will need to build glibc-2.23 or older.

Are there any limitations regarding the age of a linux distribution which can be used to create a docker base-image?

Im wondering if its possible to use very old Linux Distribution like Debian GNU/Linux 3.1 (Sarge) and create a base-image of it to run legacy code not working under "younger" distros.
Only Thing i found about it was somebody successfully using Ubuntu Feisty: Run old Linux release in a Docker container?
Are there any known limitations?
Your host needs to have a minimal version of the Linux kernel, and that version is 3.10
See
Docker minimum kernel version 3.8.13 or 3.10
extract from the previous link
There's also a shell-script to check if your system has the required dependencies in place and to check which features are available;
https://github.com/docker/docker/blob/master/contrib/check-config.sh
So you can use this to check if you will be able to use docker on this host.
From
https://wiki.debian.org/DebianSarge?action=show&redirect=Sarge
I see
kernel : linux 2.4.27 and 2.6.8
So it may not work

Compiling 2.4.20 kernel in (CentOS 6.5) 2.6.32 kernel

My target system running on top of 2.4.20 Linux kernel. Till now my host environment also has been running on the same kernel. Now i am planning to change my Host Environment to Cent OS 6.5 which is running on 2.6.32 kernel. What is the best way to successfully compile kernel 2.4.20 on it? How to customize my host environment to compile my old kernel?
It's very hard to compile 2.4.20 on CentOS 6.5.
The 2.4.20 kernel need gcc-2.95.3 and binutils-2.9.1.0.25 which are very obsolete. Besides, gcc-2.95.3 may need an older version of glibc which is impossible to be installed on CentOS 6.5. If you really need to compile kernel-2.4.20, you can download RedHat 7.3 (released in 2001) and use this system to compile the old kernel.

Is it possible to build packages for multiple versions of Red hat Linux on a single server?

I have a set of programs for analyzing radiation data and I want to build packages for Red Hat Linux versions 4.x - 6.x. Is it possible to build these packages on a single build server running a single version of Red Hat Linux or do I need to build the version 4.x package on a server running version 4.x and the version 5.x package on a server running version 5.x?
If I can build packages for several versions on a single server, must that server be running the newest version or the oldest version of the OS?
You need to build toolchain for different OS environments (toolchain for Redhat 4.x and 5.x) and with in toolchain you can build packages for specific OS. toolchain is like a chroot environments.
You can create multiple Virtual machine using KVM and build many version of packages using single node..
You can use UML (User Mode Linux) which is quite interesting... Check out following Link
http://uml.devloop.org.uk/howto.html
You can build your packages in a chroot jail. You can use mach to do so.
Here's a tutorial on building packages with mach you could refer to, though it may be outdated.

Qt-Based Application binary compatiblity issue due to glibc version

I am developing and building my QT-based application on ubuntu 12.04 LTS which uses glibc 2.15. The binary version of the application runs on some linux distributions but not on others. One of the main problem is compatibility issues caused by different versions of glibc with different linux distributions. For example, it doesn't work on centos which uses glibc 2.12 or wary pup which uses glibc 2.10.
Is there anyway to build QT against a lower version of glibc on ubuntu 12.04 LTS? Or do I have to switch to a lower version of Ubuntu to do all the devleopment?
Yes, the easiest way to support old glibc is to build the applications on a older setup.
I have no problem building a complex Qt application (including the use of QtWebKit) on CentOS 5.8 (with gblic 2.5). The application runs fine on Ubuntu, as old as 8.04 (Hardy Heron).

Resources