Compiling 2.4.20 kernel in (CentOS 6.5) 2.6.32 kernel - linux

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.

Related

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

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?

Can I use old kernel module on newer kernel version

I'm trying to replace centos 6.6 system with centos 7.2, but my kernel module for centos 6.6(kernel 2.6.32) dose not work on centos 7.2(kernel 3.10.0).
There is no source code and I am just a server engineer, not a programmer.
Could you please help me... is there any good solution?
For example, kernel module converter 2.6.32 => 3.10.0, or some hacks to force loading old kernel module...
You can, depending on the kernels.
You can also force load it. But if you force load it your system might crash, depending on how you do it.
I tried that with mint 17 and mint 18.

Building for PowerPC 405 machine running Linux 2.4.18 with a Mac G4 running 2.4.27

I presently run Linux 2.4.27 (Debian Sarge) on a PowerPC Mac G4 machine. I need to write software for Linux 2.4.18 running on a PowerPC 405 machine, and the binaries I am producing on my Mac G4 running 2.4.27 with both GCC 3.3.5 and GCC 2.95.3 (I have both installed) are having problems; I have built a static version of cURL with both compilers that segfaults when run on this 2.4.18 PowerPC 405 machine. I have noticed that binaries built on a 2.4.18 kernel with a cross compiler work (x86->PPC), however. Unfortunately, the machine that makes those binaries is unavailable to me, and I am really trying to get the Mac to be the "one stop shop" in this development effort (I want to be able to test and run on this machine).
I cannot find a 2.4.18 distribution of Linux for PowerPC anywhere. What can I do to build binaries that will work on a PowerPC 405 machine running Linux 2.4.18 given a PowerPC Mac G4 running a 2.4.27 kernel? Is building GLIBC for 2.2.5 and setting the compilers to use it the answer, or do I have to somehow build a whole kernel of 2.4.18 to support what I am trying to do?
Several weeks later, it appears that the solution suggested by user sessyargc.jp was indeed to use a cross compiler. I am accepting my answer only because I want to close this question out and I can find no way to give sessyargc.jp credit, since he/she only made a comment. Still, thank you sessyargc.jp for pointing the way!
I solved a similar problem in the past, I used the QEMU emulator on my x86 machine.
QEMU emulates the PowerPC-405 CPU too, here is the list of emulated PowerPC CPUs https://github.com/hackndev/qemu/blob/master/target-ppc/STATUS.
QEMU turns your PC in an hypervisor i.e. works like VirtualBox. But QEMU can also emulate CPUs that are different from the host PC one.
You can install and run a PowerPC Linux VM on a standard(cheap) x86 PC and compile your binaries directly in that VM. CPU emulation is a bit slow, but it works.
Regards

Install 2.4.33 kernel in Debian Wheezy

I need to install old kernel into Kali (Debian like) distro. I need to run program which requires older kernel.
I downloaded kernel but the installation gives me too many errors. I was reading similar topics and watch the videos, but so far I am not successful.
I do not have experience with kernels. Is there .deb package for kernels or any other easier way to do it?
Can I use such old kernel for this distribution?
Thank you
The 2.4.33 kernel is pretty old. According to Debian's packaging files installing that old a kernel doesn't seem to be doable in wheezy. Attempting to install and run an old kernel outside the packaging system is not going to to work. All the "modern" libraries and applications will be broken when running the 2.4 kernel, as will the program (you need more than just a kernel for your program). If it were me, I'd set up a virtualization environment like VirtualBox or something similar and pick an old distro like CentOS 3.9 or an older Debian release (sarge or later). If that's not an option, you could always try and port the program to a more recent kernel.

kdb debugging in Ubuntu 11.04

in kernel module programming how we can debug using Kdb? I tried with ubuntu 11.04 but I am not getting correct kdb patch for 2.6.38 kernel version so can any one suggest how to proceed
with kdb debugging under this kernel version?
KDB must be turned on in your kernel. I suspect it is compiled off on Ubuntu default release.
Here the details. I expecting you know how to rebuild kernel.

Resources