- 论坛徽章:
- 0
|
1 upgrade linux kernel:
The following commands can be used to compile a new linux kernel, e.g. 2.4.9 to 2.4.30
Download new kernel :
http://www.kernel.org/
cp linux-2.4.30 /usr/src
Prepare work :
#gcc –version
#make –version
#ld v (binutils version )
#fdformat –version (util-linux version )
# tar -xvf linux-2.4.30.tar
# rm /usr/src/linux
# tar xzpvf linux-2.4.30.tar.gz
# ln -s/usr/src/linux-2.4.30 linux
# cd /usr/src/linux-2.4.30
# make menuconfig (select equal to hardware)
# make dep
# make clean
# make modules
# make modules_install
# depmod –a
# cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.30
# cp /usr/src/linux/System.map /boot/System.map-2.4.30
# cd /boot
# rm –f system.map vmlinuz
# ln -s vmlinuz-2.4.30 vmlinuz
# ln -s System.map-.2.4.30 system.map
# mkinitrd initrd-2.4.30.img 2.4.30
# cd /etc/
# vi grub.conf
default=0
timeout=10
title Red Hat Linux Adance sever 2.1 (2.4.9-e3)
root (hd0,3)
kernel /vmlinuz-2.4.9-e3 ro root=/dev/hda3
initrd /initrd-2.4.9-e3
title Red Hat Linux Adance sever 2.1 (2.4.9-e.3.smp)
root (hd0,3)
kernel /vmlinuz-2.4.9-e.3 ro root=/dev/hda3
initrd /initrd-2.4.9-e.3.img
title Red Hat Linux Adance sever 2.1 (2.4.30) (Insert something )
root (hd0,3)
kernel /vmlinuz-2.4.30 ro root=/dev/hda3
initrd /initrd-2.4.30.img
2 network compile :
1) Create a temporary directory:
mkdir /temp
2) Change to the temporary directory:
cd /temp
2) Copy driver (dlkfet-4.24.tar.gz) from released CD,
mkdir /mnt/cdrom
mount /dev/ /mnt/cdrom
cp /cdrom/LINUX/dlkfet-4.24.tar.gz /temp
3) untar the archive file:
tar xzvf dlkfet-4.24.tar.gz
cd dlkfet-4.24
4) Compile the driver source files and it will generate rhinefet.o, and
copy it to correct driver installation path
make install
cp rhinefet.o /lib/modules/2.4.30 /kernel/drivers/net/
5) Check configuration file (/etc/modules.conf or /etc/conf.modules,it
depend on your Linux distribution)
6) Reboot now:
shutdown -r now
7) Install your driver module
insmod rhinefet
8) Use ifconfig command to assign the IP address, where # is network
interface number:
ifconfig eth#
9) Check the interface works:
ping
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/17184/showart_97311.html |
|