Tuesday, July 25, 2006

Compile kernel on Linux

Ni cara2 nak compile kernel.. Tapi untuk kernel 2.4.XX

Cara untuk Compile dan patch kernel LINUX

objektif:
-menambah support terhadap sesuatu perkakasan misalnya bagi membenarkan kernel mencapai failsistem ntfs


Compile

1) download kernel baru "linux2.X.X.tar.gz"

2) mv linux2.X.X.tar.gz /usr/src/

3) tar xpvfz linux2.X.X.tar.gz

4) cd linux2.X.X

5) make mrproper

6) make xconfig

6) make dep

7) make clean make bzImage

9) make modules

10) make modules_install

11) cd arch/i386/boot dan cp bzImage /boot/vmlinuz

12) edit /etc/lilo.conf

13) run lilo yang sudah di editkan /sbin/lilo

14) Reboot / shutdown -r now

Patch

1. letak patch-2.4.x.tar.bz2 kat /usr/src/

2. bzcat patch-2.4.x.tar.bz2 | patch -p0

3. make menuconfig (make xconfig pun bleh gak)

4. Y(untuk include) N(exclude) M(modular)

5. make dep

6. make clean

7. make bzImage

8. make modules

9. cd /lib/modules/

10. delete folder yg ada nama kernel yg lama (folder tu sebenarnya modules yg telah dicompile dan bersedia utk digunakan). kalau tak delete pun tak mengapa, but then make sure backup it first .... (utk keselamatan)...

11. cd /usr/src/linux

12. make modules_install

13. cp /usr/src/linux/arch/i386/boot/bzImage /vmlinuz-new

14. cp /usr/src/linux/System.map /boot/System.map

15. edit /etc/lilo.conf

16. run lilo

17. reboot dan lihat sekiranya ada error


1 Comments:

Anonymous Anonymous said...

good job

1:51 PM  

Post a Comment

<< Home