From Funtoo
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search
Note: This page describes how to use a non-Funtoo, unofficial kernel. For official Funtoo Linux kernels, see Funtoo Linux Kernels.


[edit] Introduction

This HOWTO will show you how to get a sys-kernel/openvz-rhel6-stable kernel running on a Funtoo Linux system.

[edit] Step 1: Dependencies

In kernel.spec from kernel-2.6.32-71.18.2.el6.src.rpm:

# grep BuildRequires kernel.spec 
BuildRequires: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar
BuildRequires: bzip2, findutils, gzip, m4, perl, make >= 3.78, diffutils, gawk
BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config
BuildRequires: net-tools, patchutils, rpm-build >= 4.8.0-7
BuildRequires: xmlto
BuildRequires: asciidoc
BuildRequires: sparse >= 0.4.1
BuildRequires: elfutils-libelf-devel zlib-devel binutils-devel
BuildRequires: gnupg
BuildRequires: python
BuildRequires: hmaccalc
BuildRequires: glibc-static

# grep BuildConflicts kernel.spec 
BuildConflicts: rhbuildsys(DiskFree) < 7Gb

It is advised to update sys-fs/udev, sys-fs/lvm2, and sys-devel/gcc if they are not at their latest revision:

# emerge -av1 sys-fs/udev sys-fs/lvm2 sys-devel/gcc

These are the packages that would be merged, in order:

Calculating dependencies                 ... done!
[ebuild   R   ] sys-devel/gcc-4.4.5  USE="fortran mudflap (multilib) nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -graphite -gtk (-hardened) (-libffi) -multislot (-n32) (-n64) -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla" 0 kB
[ebuild   R   ] sys-fs/udev-160-r1  USE="extras (-selinux)" 0 kB
[ebuild   R   ] sys-fs/lvm2-2.02.75  USE="rc_enable" 0 kB

Total: 3 packages (3 reinstalls), Size of downloads: 0 kB

[edit] Step 2: Install kernel sources

The process for installing an RHEL6 kernel has been drastically simplified. Simply perform the following steps:

# emerge -av layman && layman -a init6

Or copy the ebuilds from github.

# emerge sys-kernel/rh-sources

Next, download the latest src.rpm (at the time of writing this page is kernel-2.6.32-71.18.2.el6.src.rpm) uncompresses the source code and add some patches:

To use this font, enable:

-> Graphics support
      -> Console display driver support
              -> Select compiled-in fonts (FONTS [=y]) 
                      [*]   VGA 8x16 font

or simply enable CONFIG_FONT_8x16 in kernel config.

I have not tested "Module ELF structure verification" CONFIG_MODULE_VERIFY_ELF or "Module signature verification" CONFIG_MODULE_SIG. Everything besides including the nvidia-drivers, nouveau, broadcom-sta works fine.

[edit] Step 3: Build it

Build it as you build any other kernel. There is nothing extraordinary. No special startup options in the grub is required. That's all kids ;) And may the source/force be with you.