This page is of historical interest only.
Last substantive modification: Sat Apr 30 21:25:04 EDT 2005
Broken link fixed 2016-02-15
Files migrated from ftp 2018-06-17
We Slackware people don't care much for fancy packaging. We just want the tarball.
Usually, we run plain old stock kernels from kernel.org. Our kernels are boring, and we like them that way. But today I find myself in need of the 4G/4G patch, because I have a 32-bit PC with 4 GiB RAM and an application that needs all of the memory it can get.
The 4G/4G split patch, a.k.a. 4g4g, is (was) by Ingo Molnar, who first released it 2003-07-08. See Ingo.txt for his original announcement describing what it does.
Ingo has two versions of the patch available at http://people.redhat.com/mingo/4g-patches/.
Parent Directory 27-Jan-2005 05:23 - 4g-2.5.74-F8 08-Jul-2003 18:13 94k 4g-2.6.6-B7 10-May-2004 11:46 126k
Unfortunately, these patches do not apply cleanly to the canonical kernel sources from kernel.org, and Ingo did not reply to my inquiry.
The only way to get kernel sources with this patch coherently applied is to unravel a source RPM from either Fedora or Red Hat Enterprise Linux (RHEL), and take all of Red Hat's other patches along with it.
4g4g was dropped by Fedora after the release of kernel-2.6.9-1.681_FC3.src.rpm, dated 2004-11-21.
Text downloaded from http://www.linuxsecurity.com/content/view/117753, 2005-04-25:
--------------------------------------------------------------------- Fedora Update Notification FEDORA-2004-582 2005-01-03 --------------------------------------------------------------------- Product : Fedora Core 3 Name : kernel Version : 2.6.9 Release : 1.724_FC3 Summary : The Linux kernel (the core of the Linux operating system) Description : The kernel package contains the Linux kernel (vmlinuz), the core of any Linux operating system. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc. A large change over previous kernels has been made. The 4G:4G memory split patch has been dropped, and Fedora kernels now revert back to the upstream 3G:1G kernel/userspace split. [...] * Fri Dec 31 2004 Dave Jones - Drop 4g/4g patch completely. [...] * Wed Dec 01 2004 Dave Jones - Disable 4G/4G for i686. [...] * Sun Nov 28 2004 Dave Jones - Move 4g/4g kernel into -hugemem.
No applicable release announcements appear in the fedora-announce-list archives between 2.6.9-1.681_FC3 and 1.724_FC3 (there were no kernels announced in December 2004).
RHEL, on the other hand, has so far retained the 4g4g patch. The latest kernel as of 2005-04-30 is kernel-2.6.9-5.0.5.EL.src.rpm, dated 2005-04-18. Check for updates at or around ftp://ftp.redhat.com/pub/redhat/linux/updates/enterprise/4WS/en/os/SRPMS/.
The following describes how kernel-2.6.9-5.0.5.EL-prep.tar.bz2 was created from the SRPM kernel-2.6.9-5.0.5.EL.src.rpm under Slackware Linux 10.1. Please note that the file kernel-2.6.9-5.0.5.EL-prep.tar.bz2 is not endorsed by Red Hat, is not part of the Fedora or RHEL distributions, and should under no circumstances be confused with the original, Red-Hat-trademark-encumbered RPM.
All files mentioned here are available at https://flaterco.com/files/4g4g/.
File date: 2005-04-18 15:02
rpm -i -vv --nosignature kernel-2.6.9-5.0.5.EL.src.rpm
Unpacking the RPM puts files in /usr/src/rpm/SOURCES and one file (kernel-2.6.spec) in /usr/src/rpm/SPECS.
See unpack_log.txt for output.
Slackware does not use RPMs and does not populate the RPM database to say what packages are available. This causes rpmbuild to refuse to run. No switch to turn off dependency checking is mentioned in the rpmbuild man page, so instead, I deleted the offending dependencies from /usr/src/rpm/SPECS/kernel-2.6.spec:
BuildPreReq: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar BuildPreReq: bzip2, findutils, gzip, m4, perl, make >= 3.78, gnupg, kernel-utils BuildRequires: gcc >= 2.96-98, binutils >= 2.12, redhat-rpm-config >= 184.108.40.206
rpmbuild -vv -bp --target noarch /usr/src/rpm/SPECS/kernel-2.6.spec
See rpmbuild_log.txt for output.
You end up with the patched kernel sources in /usr/src/rpm/BUILD.
cd /usr/src/rpm/BUILD/kernel-2.6.9 chown -R root. linux-2.6.9 chmod -R g-w linux-2.6.9 tar cjf kernel-2.6.9-5.0.5.EL-prep.tar.bz2 linux-2.6.9
I compiled two different configurations, config-2.6.9-5.0.5.EL-barebones (no modules, no sound, no network, no USB) and config-2.6.9-5.0.5.EL-bloated (all that stuff and more). Neither of these will necessarily work for anyone else, but there they are if you want them.
You have to select "Prompt for development and/or incomplete code/drivers" if you want to see SATA listed under SCSI low-level drivers.
In a barebones config, you still need to select the top-level network option and Unix domain sockets under that, or syslog won't even work.
maxmem.c: simple benchmark of how much memory a single process can allocate.
Typical results with various kernels and differing configurations (YMMV):
|Kernel 2.4.30 (kernel.org)||2933 MiB|
|Kernel 220.127.116.11 (kernel.org)||3057 MiB|
|Kernel 2.6.9 (5.0.5.EL w/ 4g4g)||4059 MiB|
Odds and ends