Article 5EZ0C How can I build and install the 2.6 kernel on a VM?

How can I build and install the 2.6 kernel on a VM?

by
zwhitchcox
from LinuxQuestions.org on (#5EZ0C)
I'm wanting to follow along the book Linux Device Drivers, but they use the kernel 2.6 in the book.

I'm wondering what the best way to download and install the 2.6 kernel in a vm so I can follow along.

I downloaded Linux Mint, the current version, and then downloaded the source code from kernel.org.

But the commands:

Code:sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison

wget https://mirrors.edge.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.xz

tar xvf linux-2.6.39.tar.xz

cd linux-2.6.39/

cp -v /boot/config-$(uname -r) .config

make menuconfig # (I didn't change anything here)

make && sudo make modules_install && sudo make installI get the error

Code:zwhitchcox@mint:~/linux-2.6.39$ make && sudo make modules_install && sudo make install
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
warning: (GFS2_FS) selects DLM which has unmet direct dependencies (EXPERIMENTAL && INET && SYSFS && CONFIGFS_FS && (IPV6 || IPV6=n))
warning: (IMA) selects TCG_TPM which has unmet direct dependencies (HAS_IOMEM && EXPERIMENTAL)
warning: (SCHED_AUTOGROUP) selects CGROUP_SCHED which has unmet direct dependencies (CGROUPS && EXPERIMENTAL)
warning: (ACPI_HOTPLUG_CPU) selects ACPI_CONTAINER which has unmet direct dependencies (ACPI && EXPERIMENTAL)
warning: (GFS2_FS) selects DLM which has unmet direct dependencies (EXPERIMENTAL && INET && SYSFS && CONFIGFS_FS && (IPV6 || IPV6=n))
warning: (IMA) selects TCG_TPM which has unmet direct dependencies (HAS_IOMEM && EXPERIMENTAL)
warning: (SCHED_AUTOGROUP) selects CGROUP_SCHED which has unmet direct dependencies (CGROUPS && EXPERIMENTAL)
warning: (ACPI_HOTPLUG_CPU) selects ACPI_CONTAINER which has unmet direct dependencies (ACPI && EXPERIMENTAL)
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
CC kernel/bounds.s
cc1: error: code model kernel does not support PIC mode
make[1]: *** [/home/zwhitchcox/linux-2.6.39/./Kbuild:36: kernel/bounds.s] Error 1
make: *** [Makefile:959: prepare0] Error 2So, it seems to me like the problem is probably that everything on the linux system is too new to be compatible with the old kernel.

But I'm not sure. Does anyone have any suggestions on how to accomplish this?latest?d=yIl2AUoC8zA latest?i=BJOOclmfG78:GF7j3Fq3ShI:F7zBnMy latest?i=BJOOclmfG78:GF7j3Fq3ShI:V_sGLiP latest?d=qj6IDK7rITs latest?i=BJOOclmfG78:GF7j3Fq3ShI:gIN9vFwBJOOclmfG78
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments