Kompilirovanie yadra Linux
Ustanovka patchej v yadro
Ran'she yadro dolzhno bylo raspolagat'sya v kataloge /usr/src/linux
cd /usr/src
zcat /path/to/patch-1.2.31.gz | patch -s -p0
zcat /path/to/patch-1.2.32.gz | patch -s -p0
Teper' yadro dolzhno raspolagat'sya v kataloge /usr/src/linux-2.4.{version_number}
cd /usr/src
ln -s linux linux-2.4.18
bzcat /path/to/patch-2.4.19.bz2 | patch -s -p0
ln -s linux linux-2.4.19
bzcat /path/to/patch-2.4.20.bz2 | patch -s -p0
. . .
CHtob yadro perekompilirovat' nuzhno
cd /usr/src/linux
make xconfig # v graficheskom rezhime
ili
make config # v tekstovom rezhime
zapolnit' v graficheskom rezhime parametry i vybrat' nuzhnye dravery
make dep ; make clean ;
MAKE='make -j2' make -j2
make zlilo ili, esli yadro poluchilos' slishkom bol'shim
make bzlilo
vozmozhno pridetsya sdelat' komandu
cp /vmlinux /boot/vmlinuz
lilo
Kak uvelichit' skorost' kompilyacii na SMP-mashine
MAKE='make -j2' make -j2 # -j zadaet maksimal'noe kolichestvo parallel'nyh jobs
Kak zadat' svoyu versiyu v yadre
vi /usr/src/linux/Makefile
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 18
EXTRAVERSION = YouNameIt
Kak vosproizvesti defoltnye ustanovki distributivnogo yadra
cd /usr/src/linux
cp /boot/config-2.6.18-3 /usr/src/linux/.config
make silentoldconfig
### make oldconfig
make xconfig
MAKE='make -j2' make -j2 # -j zadaet maksimal'noe kolichestvo parallel'nyh jobs
Kompilyaciya i ustanovka modulej
cd /usr/src/linux
make modules # v 2.6-j versii ne nuzhen
make modules_install
ls -l /lib/modules/2.4.18-3-YouNameIt
Izgotovlenie init-ram-diska
Ispolnyat' posle installyacii modulej:
mkinitrd -f /boot/initrd-2.4.18-3-YourNameIt 2.4.18-3-YourNameIt
vi /etc/lilo
###############################################################
image=/boot/vmlinuz-2.4.18-YouNameIt
label=new
initrd=/boot/initrd-YouNameIt
read-only
root=/dev/hda2
append="hdc=ide-scsi"
###############################################################
lilo
Kompilirovanie yadra Linux
# cd /usr/src/linux/
# make xconfig ili # make { menuconfig | config }
Smysl konfiguracionnyh parametrov yadra raz®yasnyaetsya zdes'
# make dep
# make clean
# make bzlilo
# make modules
# make modules_install
# reboot
|to vse.
Kompilirovanie yadra s podderzhkoj avtozagruzki modulej
0) cd /usr/src/linux
1) make menuconfig
Where I enable the features I want as odules
(for vfat support you should answer M for FAT and VFAT)
Besides, the kernel must be compiled with modversion
and kerneld support enabled.(This is the second submenu in
the config - select all the 3 items).
2) make install
At the end the old kernel (if it's /vmlinuz) will be renamed
/vmlinuz.old and the new will be /vmlinuz.
This option calls the script /usr/src/linux/arch/i386/boot/install.sh
which does the above renaming and runs lilo.If you don't want lilo just
comment out the last line in that script.
3) make modules
4) rm /lib/modules/2.0.0 (or move to another location)
5) make modules_install
6) VERY IMPORTANT to make linux boot the new kernel.
If you use lilo do not edit /usr/src/linux/arch/i386/boot/install.sh,
it will install it automaticly,if not then you are using either
loadlin or bootdisk.Either way update your bootdisk or loadlin kernel
(on your dos partition I guess).
7) Reboot linux.
# prosmotr:
sysctl -a | grep tcp # prosmotr
cat /proc/sys/net/ipv4/tcp_max_syn_backlog
sysctl net.ipv4.tcp_max_syn_backlog
# ustanovka znacheniya
sysctl -w net.ipv4.tcp_max_syn_backlog=1024
# ustanovka znachenij pri zagruzke
/etc/sysctl.conf
net.ipv4.tcp_max_syn_backlog = 1024
Last-modified: Thu, 21 Dec 2006 21:39:40 GMT