Debian笔记(4) - 内核编译

传入编译所需变量
% MAKEFLAGS=”CC=gcc-3.2″ make-kpkg …

/etc/mkinitrd/mkinitrd.conf中更改initrd使用cramfs之外的其他fs
$Get_Root make-kpkg –revision=custom.1.0 kernel_image
$Get_Root make-kpkg –initrd –revision=custom.1.0 kernel_image

make-kpkg clean
make-kpkg -rootcmd fakeroot –append-to-version -custom.${VER} \
–revision custom.${VER} kernel_image modules-image

To create a source or header package, run
% make-kpkg clean
% $Get_Root make-kpkg –revision=custom.1.0 kernel_source
% $Get_Root make-kpkg –revision=custom.1.0 kernel_headers

Similarly, the documentation package is built by:
% $Get_Root make-kpkg –revision=custom.1.0 kernel_doc

Or if you want to generate the whole package,
% $Get_Root make-kpkg –revision=custom.1.0 \
–pgpsign=”Your pgp ID” buildpackage
Note that this needs a pgp key.
(Get_Root is whatever you need to become root — fakeroot or
sudo are examples that come to mind).
Here is a nice, practical example:
% make-kpkg -rfakeroot –append-to-version $(hostname) \
–revision $(date +’%Y%m%d’)

/etc/kernel-pkg.conf

摘自:
http://debian.linuxsir.org/book/reference/lyoo/ch-kernel.html
/usr/share/doc/kernel-package/README.gz


相关文章

Speak Your Mind

If you want a pic to show with your comment, go get a gravatar!