Typo
[linux_from_scratch_hints.git] / OLD / kernel-2.6-how-to.txt
blob7c506570ec2ffb15c90242e8fcede9b10f040a1f
1 AUTHOR: zippo zippo752001@comcast.net or #lfs-support
2 DATE: 2004-01-25
3 LICENSE: GNU General Public License
4 SYNOPSIS: Build LFS with the 2.6.* kernel
5 Primary URL: zippo01.ath.cx
6 DESCRIPTION: This is a most wonder How-to for LFS users that want the new 2.6.0
7 Kernel from build. If you want it but don't want the hassile just build
8 it with the 2.4.* kernel and upgrade to the 2.6.0 kernel. 
10 PREREQUISITES:
12 First you will need a few different things.
13 The kernel: www.kernel.org
15 Nice clean headers: Here you can make our own or use the ones on my
16 http."they might or might not be up todate".
18 http://zippo01.ath.cx/glibc-kernheaders.tar.bz2
20 To make them: 
22 get: http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS
23 you will need the glibc-kernheaders-* file. 
24 get: http://www.iagora.com/~espel/rpm2cpio 
25 run: perl rpm2cpio glib* > glibc-kernelheaders.tmp //converts the
26 src.rpm to a cpio
27 Then run: cpio -d -i < ./glibc-kernelheaders.tmp //makes it into a nice bz2
28 file
29 All you will need is the glibc-kernelheaders.tar.bz2 file
31 Modules-utils: ftp://ftp.kernel.org/pub/linux/kernel/people/rusty/modules/
33 thats all you will need.
35 HINT:
37 Chapter 5 -- Installing 2.6 kernel
38 Use "make include/asm" instead of "make symlinks"
40 Chapter 6 -- Installing 2.6 kernel
41         make mrproper &&
42         make include/linux/version.h &&
43         make include/asm &&
44         mkdir /usr/src/glibcheaders &&
45         cp -HR include/asm /usr/src/glibcheaders &&
46         cp -R include/asm-generic /usr/src/glibcheaders &&
47         cp -R include/linux /usr/src/glibcheaders &&
48         touch /usr/src/glibcheaders/linux/autoconf.h
50 Chapter 6 -- Installing Glibc
51 Use this to configure the Glibc
52         ../glibc-2.3.2/configure --prefix=/usr \
53         --disable-profile --enable-add-ons \
54         --libexecdir=/usr/lib --with-headers=/usr/src/glibcheaders
56 Chapter 6 -- Installing sanitized kernel headers
57 After you install the glibc you should do this.
58         tar jxvf glibc-kernelheaders.tar.bz2
59         cd usr/include
60         ***NOTE*** if your arch is something other then i386 then you
61 should change the next line to fit. EX. asm-ppc, to see all possible
62 ones just ls. :-p       
63         cp -R asm-i386 /usr/include/asm    
64         cp -R linux /usr/include
66 Chapter 6 -- Installing Modutils
67 Instead of Modutils we will use Module-init-tools
68         ./configure --prefix=/
69         make
70         make install
72 Chapter 8 -- Makeing the Kernel:
73 With 2.6.* The kernel build is somewhat different. 
74         cd /usr/src #this is where i put my kernel source, so should you
75         tar -jxvf /path/to/soutce/linux-2.6.X.tar.bz2
76         cd linux-2.6.X
77         make mrproper
78         make menuconfig
79         make CC=/opt/gcc-2.95.3/bin/gcc bzImage
80         make CC=/opt/gcc-2.95.3/bin/gcc modules
81         make CC=/opt/gcc-2.95.3/bin/gcc modules_install         
82         make mandocs
83         cp -a Documentation/man /usr/share/man/man9
84         cp arch/i386/boot/bzImage /boot/lfskernel260
85         cp System.map /boot
87 Other then that Follow the book.
89 Acknowledgements: J_MAN!!!      
91 CHANGELOG:
93         3/24/04 0.0.3
94                 *fixed link for headers
95                 *added kernel how-to
96         1/27/04 0.0.2
97                 *fixed format
98                 *added how-to for different arches
100         1/25/04 0.0.1