KernelNewbiesTW:

我該如何編譯核心?

(這份操作說明假定我們正安裝的是2.6.0核心版本, 以你正在試著建構的版本取代所有的實例. 這些操作說明同樣也是x86特有; 其它架構的建構程序可能有所不同.)

If your distribution uses lilo:

If your distribution uses grub:

Note: This will work for lilo, too, but you still have to run /sbin/lilo after every install.

If you get modversion problems (symbols ending in _Rxxxxxxxx), have a look at this question in the linux-kernel mailing list FAQ to solve the problem.

Still not getting it? Try this more indepth tutorial

If you're just trying out this procedure, do the unpacking and building in your home directory as discussed above. In a professional environment, though, the source would be stored in /usr/src or /usr/local/src, where compiling would also be done. To allow this, and at the same time avoid becoming root for the entire procedure, use your favorite GNOME or KDE utilities to create a group "devel" (or "hack" or whatever) and add yourself to that group. Then change the group owner of /usr/src to the new group and grant write privileges to the group.

That way you can unpack the kernel tarball into /usr/src (or whatever) and configure and build there without doing everything as root. Of course, you'll still need to sudo or become root when you install the new kernel and edit the lilo/grub configuration files.

This will help keep the kernel source separate from your resume, diary, and jpegs of your Main Squeeze.

CategoryFAQ

KernelNewbiesTW: FAQ/KernelCompilation (last edited 2017-12-30 07:19:28 by localhost)