Difference between pages "Genkernel Quick Start Tutorial" and "Forked Ebuilds"

From Funtoo
(Difference between pages)
Jump to: navigation, search
(Third step: Building and installing the kernel)
 
 
Line 1: Line 1:
Genkernel is a tool which help you to build a Linux kernel and deploy it along with a ramdisk image which contains all of the necessary modules to make the kernel being able to mount the different partitions of your harddrives in the VFS at the system startup.
+
This is the list of ebuilds we have forked so far by alphabetical name (if you are looking for the ebuilds specific to Funtoo, please refer [[Specific_Funtoo_Ebuilds|there]]):
  
= Concepts =
+
{| {{Table}}
 +
|-
 +
!Ebuild
 +
!Version
 +
!Changes/Notes
 +
!TODO
 +
|-
 +
|app-arch/tar
 +
|TBC
 +
|forked tar, tar-1.24 version has device nodes creation bugs, stage3 affected
 +
|tar-1.25 is masked for testing
 +
|-
 +
|app-portage/eix
 +
|0.22.8-r1
 +
|Removal of all options triggering an rsync to a remote portage tree.
 +
|Update the manual pages.
 +
|-
 +
|app-shells/bash
 +
|4.1_p10
 +
|Has funtoo patch to document use of /etc/bash/bashrc
 +
|QA: Impact on manual pages?
 +
|-
 +
|dev-lang/perl
 +
|5.12.3
 +
|rev-bump coming from the Gentoo side, no changes.
 +
|See for deps with libperl (2011-04-17)
 +
|-
 +
|dev-lang/python
 +
|TBC
 +
|Enable default python if none, fixes metro, and for 2.* series, create /usr/bin/python if it does not exist.
 +
|Nothing
 +
|-
 +
|dev-lang/python
 +
|2.7.1-r3
 +
|Rework of -r2. Changed some steps at deployment phase (as suggested in [https://bugs.gentoo.org/show_bug.cgi?id=374579 Gentoo bug #374579]), that revision corrects an issue with regard to the DLFCN module (not being found with Linux 3.x kernel series).
 +
|Nothing
 +
|-
 +
|media-libs/libsdl
 +
|TBC
 +
|Added use flags to enable alsa-shared and pulseaudio-shared. Gentoo bug #310793
 +
|Try to get gentoo to fix
 +
|-
 +
|media-sound/jack
 +
|TBC
 +
|Added new revision with fix for Gentoo bug #298850
 +
|Try to get gentoo to fix
 +
|-
 +
|net-misc/dhcpcd
 +
|TBC
 +
|Provide "net" removed to prevent dhcpcd from starting automatically. Initscript no longer references net.lo.
 +
|Nothing
 +
|-
 +
|net-wireless/iwl5000-ucode
 +
|8.83.5.1-r1
 +
|Forked 8.83.5.1 to a new version not in Gentoo. This version checks the kernel revision in /usr/src/linux and dies if it is < 2.6.38 and add a dependency on sys-kernel/gentoo-sources >= 2.6.38.
 +
|Nothing
 +
|-
 +
|net-misc/curl
 +
|7.22.0-r1
 +
|Changes from 7.22.0 are a set of patches in src_compile() not applied in the case of a sparc64 environment to allow the package to be properly built.
 +
|Nothing
 +
|-
 +
|sci-geosciences/googleearth
 +
|6.0.3.2197
 +
|Exact same ebuild as found in Gentoo at same revision but includes an explicit depedency to >=sys-lib/glibc-2.12 (not present in Funtoo yet)
 +
|Bring in >=sys-lib/glibc-2.12 :)
 +
|-
 +
|sci-libs/blas-atlas
 +
|TBC
 +
|Add missing dependency on sys-devel/gcc[fortran]
 +
|Gentoo working on fix
 +
|-
 +
|sci-libs/blas-reference
 +
|TBC
 +
|Add missing dependency on sys-devel/gcc[fortran]
 +
|Gentoo working on fix
 +
|-
 +
|sys-apps/sandbox
 +
|2.3
 +
|forked to have control over masking and metro building procedures
 +
|new sandbox-2.5
 +
|-
 +
|sys-apps/gptfdisk
 +
|0.6.13
 +
|improved ebuild, fixes in logical sector sizes
 +
|Nothing
 +
|-
 +
|sys-apps/tcp-wrappers
 +
|7.6-r9
 +
|sys-apps/tcp-wrappers-7.6-r8 + some patches coming from Debian. This releases, most notably, adds several manual pages and support for CIDR. 
 +
|Nothing
 +
|-
 +
|sys-block/iscsitarget (i.e. ietd)
 +
|1.4.20.2-p20120429
 +
|Matches the trunk at revision 481+a (legacy) minor patch with regards to GCC 3.x
 +
|Nothing
 +
|-
 +
|sys-block/iscsitarget (i.e. ietd)
 +
|9999
 +
|Clean up of what is on Gentoo side. Could fail on some kernels versions. As of August 2011, please use sys-block/iscsitarget-1.4.20.2_p20080820 instead.
 +
|Nothing
 +
|-
 +
|sys-fs/lvm2
 +
|TBC
 +
|TBC
 +
|Nothing
 +
|-
 +
|sys-kernel/genkernel
 +
|3.4.12.6-r5
 +
|Multiple changes - doesn't build LVM internally (uses Funtoo static version), supports external build directories, includes Sabayon patches, toolchain improvements
 +
|N/A
 +
|-
 +
|sys-libs/glibc
 +
|2.11.2-r2
 +
|Funtoo's glibc 2.11.2-r2 is equivalent to Gentoo's 2.11.2-r3, and contains a patch for GLSA 201011-01, so all Funtoo systems are fully patched even though they may at first appear to not be due to -r differences.
 +
|Nothing
 +
|-
 +
|virtual/package-manager
 +
|TBC
 +
|Remove paludis and pkgcore. Not usable on funtoo yet
 +
|Nothing
 +
|}
 +
 +
{{fancynote|Please :
 +
* report any bugs for these ebuilds to the funtoo-dev mailing list.
 +
* keep listed '''all''' versions pushed in Funtoo with the changes you made, this will help when backtracking issues or the adaptations made. }}
  
TBC
+
[[Category:Ebuilds]]
 
+
= Recompiling the Gentoo kernel sources from a SystemRescue CD chroot =
+
 
+
A second case that many Funtoo users will face to is to compile their own kernel when installing a brand new Funtoo instance from a stage 3 archive (the most common scenario is to boot the machine with SystemRescue CD).
+
 
+
{{fancynote|If you want to use the System rescue CD sources provided by Funtoo ( sys-kernel/sysrescue-std-sources ), the philosophy remains exactly the same}}
+
 
+
== First step emerging the required packages ==
+
 
+
The first step is to emerge:
+
 
+
# The Gentoo kernel sources
+
# Genkernel itself
+
 
+
This is achieved with:
+
 
+
<pre>
+
# emerge sys-kernel/gentoo-sources sys-kernel/genkernel
+
</pre>
+
 
+
Once the Gentoo kernel sources are deployed, you should find a directory named '''linux-''version''-gentoo''' (e.g. linux-2.6.39-gentoo) under '''/usr/src'''. Update the '''linux''' symlink to point on this directory:
+
<pre>
+
# cd /usr/src
+
# rm linux
+
# ln -s linux-2.6.39-gentoo linux
+
</pre>
+
 
+
== Second step: Grabbing and tweaking a configuration file ==
+
 
+
How to start your kernel configuration? Simply by using the same configuration template the running System Rescue CD kernel had been built with! Before chrooting in your Funtoo instance, you did something like:
+
 
+
<pre>
+
# mount -o bind /proc /mnt/gentoo/proc
+
</pre>
+
Or:
+
<pre>
+
# mount -t proc none /mnt/gentoo/proc
+
</pre>
+
 
+
In your chroot environment (or from a System Rescue CD virtual terminal) if you look what /proc contains you will notice a file named config.gz:
+
 
+
<pre>
+
# ls /proc
+
...
+
dr-xr-xr-x  7 root      root                    0 May 23 03:13 952
+
dr-xr-xr-x  7 root      root                    0 May 23 03:13 953
+
dr-xr-xr-x  7 root      root                    0 May 23 18:42 9834
+
...
+
-r--r--r--  1 root      root                16024 May 23 22:27 config.gz
+
-r--r--r--  1 root      root                    0 May 23 22:27 consoles
+
-r--r--r--  1 root      root                    0 May 23 22:27 cpuinfo
+
...
+
</pre>
+
 
+
config.gz holds the running kernel (System Rescue CD) configuration, just copy the gunziped content in the Gentoo sources directory:
+
 
+
<pre>
+
# cd /usr/src/linux
+
# zcat /proc/config.gz > .config
+
</pre>
+
 
+
Next, run make oldconfig to set all newly added options:
+
 
+
<pre>
+
# make oldconfig
+
</pre>
+
 
+
Next, tweak the kernel configuration in the way you prefer (manually edition of the .config file, make nconfig, make menuconfig....) if you wish. You are not ready yet! A final step is required: '''you ''must'' either set CONFIG_INITRAMFS_SOURCE to a blank value (CONFIG_INITRAMFS_SOURCE="") either delete the statement in the .config file'''. Forgotting to do that will make Genkernel abort the compilation process with a message like:
+
 
+
<pre>
+
/usr/src/linux-2.6.39-gentoo/scripts/gen_initramfs_list.sh: Cannot open '/var/tmp/genkernel/initramfs-2.6.32.14-std155-i386.cpio.gz'
+
make[1]: *** [usr/initramfs_data.cpio.lzma] Error 1
+
</pre>
+
 
+
== Third step: Building and installing the kernel ==
+
 
+
This is simply achieved by:
+
 
+
<pre>
+
# genkernel --no-mrproper all
+
</pre>
+
 
+
The same remarks written in the [[Genkernel_Quick_Start_Tutorial#Third_step:_Building_and_installing_the_kernel|third paragraph]] of the first use case are still valid here.
+
 
+
[[Category:Kernel]]
+

Latest revision as of 14:14, 29 April 2012

This is the list of ebuilds we have forked so far by alphabetical name (if you are looking for the ebuilds specific to Funtoo, please refer there):

Ebuild Version Changes/Notes TODO
app-arch/tar TBC forked tar, tar-1.24 version has device nodes creation bugs, stage3 affected tar-1.25 is masked for testing
app-portage/eix 0.22.8-r1 Removal of all options triggering an rsync to a remote portage tree. Update the manual pages.
app-shells/bash 4.1_p10 Has funtoo patch to document use of /etc/bash/bashrc QA: Impact on manual pages?
dev-lang/perl 5.12.3 rev-bump coming from the Gentoo side, no changes. See for deps with libperl (2011-04-17)
dev-lang/python TBC Enable default python if none, fixes metro, and for 2.* series, create /usr/bin/python if it does not exist. Nothing
dev-lang/python 2.7.1-r3 Rework of -r2. Changed some steps at deployment phase (as suggested in Gentoo bug #374579), that revision corrects an issue with regard to the DLFCN module (not being found with Linux 3.x kernel series). Nothing
media-libs/libsdl TBC Added use flags to enable alsa-shared and pulseaudio-shared. Gentoo bug #310793 Try to get gentoo to fix
media-sound/jack TBC Added new revision with fix for Gentoo bug #298850 Try to get gentoo to fix
net-misc/dhcpcd TBC Provide "net" removed to prevent dhcpcd from starting automatically. Initscript no longer references net.lo. Nothing
net-wireless/iwl5000-ucode 8.83.5.1-r1 Forked 8.83.5.1 to a new version not in Gentoo. This version checks the kernel revision in /usr/src/linux and dies if it is < 2.6.38 and add a dependency on sys-kernel/gentoo-sources >= 2.6.38. Nothing
net-misc/curl 7.22.0-r1 Changes from 7.22.0 are a set of patches in src_compile() not applied in the case of a sparc64 environment to allow the package to be properly built. Nothing
sci-geosciences/googleearth 6.0.3.2197 Exact same ebuild as found in Gentoo at same revision but includes an explicit depedency to >=sys-lib/glibc-2.12 (not present in Funtoo yet) Bring in >=sys-lib/glibc-2.12 :)
sci-libs/blas-atlas TBC Add missing dependency on sys-devel/gcc[fortran] Gentoo working on fix
sci-libs/blas-reference TBC Add missing dependency on sys-devel/gcc[fortran] Gentoo working on fix
sys-apps/sandbox 2.3 forked to have control over masking and metro building procedures new sandbox-2.5
sys-apps/gptfdisk 0.6.13 improved ebuild, fixes in logical sector sizes Nothing
sys-apps/tcp-wrappers 7.6-r9 sys-apps/tcp-wrappers-7.6-r8 + some patches coming from Debian. This releases, most notably, adds several manual pages and support for CIDR. Nothing
sys-block/iscsitarget (i.e. ietd) 1.4.20.2-p20120429 Matches the trunk at revision 481+a (legacy) minor patch with regards to GCC 3.x Nothing
sys-block/iscsitarget (i.e. ietd) 9999 Clean up of what is on Gentoo side. Could fail on some kernels versions. As of August 2011, please use sys-block/iscsitarget-1.4.20.2_p20080820 instead. Nothing
sys-fs/lvm2 TBC TBC Nothing
sys-kernel/genkernel 3.4.12.6-r5 Multiple changes - doesn't build LVM internally (uses Funtoo static version), supports external build directories, includes Sabayon patches, toolchain improvements N/A
sys-libs/glibc 2.11.2-r2 Funtoo's glibc 2.11.2-r2 is equivalent to Gentoo's 2.11.2-r3, and contains a patch for GLSA 201011-01, so all Funtoo systems are fully patched even though they may at first appear to not be due to -r differences. Nothing
virtual/package-manager TBC Remove paludis and pkgcore. Not usable on funtoo yet Nothing
Note: Please :
  • report any bugs for these ebuilds to the funtoo-dev mailing list.
  • keep listed all versions pushed in Funtoo with the changes you made, this will help when backtracking issues or the adaptations made.