المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : لينكس How to compile a kernel



خالد 1424
10-01-2004, 09:24 AM
(These instructions assume we are installing version 2.4.0 of the kernel, replace all instances with the version you are trying to build. These instructions are also x86-specific; other architecture's build procedures may differ.)

Download your tarball from ftp.XX.kernel.org where XX is your country code. If there isn't a mirror for your country, just pick a near one.
Unpack the tarball in your /usr/src directory bzip2 -dc linux-2.4.0.tar.bz2 | tar xvf -
(Replace bzip2 with gzip if you downloaded the .gz)
cd into the linux directory. You'll now need to configure the kernel to select the features you want/need. There are several ways to do this.. a. make config Command line questions. b. make oldconfig (Useful only if you kept a .config from a previous kernel build) c. make menuconfig (ncurses based) d. make xconfig (TCL/TK based X-Windows configuration)
Now we can build the kernel, but first we have to build the dependencies. make dep make bzImage
Wait. When its finished, make any parts you may have selected to be modular. make modules
Become root to be able to install modules and kernel. Everything before this point can and should be done as a normal user, there is really no need to be root to compile a kernel. It's actually a very bad idea to do everything as root because root is too powerful, one single mistake is enough to ruin your system completely.
Intall the modules. make modules_install
Install the new kernel.. cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.0 cp System.map /boot/System.map-2.4.0
Edit /etc/lilo.conf, and add these lines... image = /boot/vmlinuz-2.4.0 label = 2.4.0Also copy your root=/dev/??? line here too.
Run /sbin/lilo, reboot, and enjoy. If you get modversion problems (symbols ending in _Rxxxxxxxx), have a look at this question (http://www.tux.org/lkml/#s8-8) in the linux-kernel mailing list FAQ to solve the problem.
http://kernelnewbies.org/faq/

ahmadbccline
10-01-2004, 10:46 AM
يمكنك ان تحصل علىشرح الطريقة كاملة من موقع المصادر المفتوحة للعرب
المصادر المفتوحة للعرب (http://aunyx.org)

او من الرابط التاي مباشرة

تحياتيhttp://www.aunyx.org/html/modules.php?name=News&file=article&sid=16&mode=&order=0&thold=0