We should forget about small efficiencies — Donald Knuth
2 Aug
If you try to re-build kernel in RHEL 4, but encounter this error message:
This is because RHEL4 doesn’t install kernel source package by default, but install a package including minimum kernel header and source file (kernel-devel-$(uname -r).i686.rpm).
This package provides kernel headers and makefiles sufficient to build modules against the kernel package. Hence it cannot be used to build kernel source.
To re-build kernel, please to see the “kernel” section in the release-notes in RHEL 4.
In order to eliminate the redundancy inherent in providing a separate package for the kernel source code when that source code already exists in the kernel’s .src.rpm file, Red Hat Enterprise Linux 4 no longer includes the kernel-source package. Users that require access to the kernel sources can find them in the kernel.src.rpm file.
To create an exploded source tree from this file, perform the following steps:
You can then proceed as usual.
Popularity: 20% [?]
One Response for "How to re-compile linux kernel source in RHEL 4"
hi
i am a newbie in rhel 4 having difficulty following your instruction. can you please give a sample variable from the syntax below; i also encounter the same error when make bzImage command executed.
Obtain the kernel-$(uname -r).src.rpm file from one of the following sources:
The SRPMS directory on the appropriate “SRPMS” CD iso image
By running the following command:
up2date –get-source kernel
Install kernel-$(uname -r).src.rpm
rpm -Uvh /var/spool/up2date/kernel-$(uname -r).src.rpm (if kernel.src.rpm is gained by up2date)
Change directory to /usr/src/redhat/SPECS/ (sample varialble please)
rpmbuild -bp –target=$(uname -m) kernel-2.6.spec (sample varialble please)
Leave a reply