Customize your kernel in Debian Lenny
来源:互联网 发布:ubuntu 清华源 编辑:程序博客网 时间:2024/06/07 22:15
准备:
首先,你需要安装Debian Lenny build kernel所需要的包,如下:
build-essential: essential package for building Debian packages: make, gcc, …
bzip2 : compress and decompress utilities for bz2 files.
libncurses5-dev: developer’s libraries and docs for ncurses.
git: distributed revision control system used by the linux kernel.
fakeroot: provide fakeroot environment for building package as non-root.
initramfs-tools: tool to build an initramfs (Debian specific).
kernel-package : tool to build linux kernel package (Debian specific)
module-assistant: tool to help build module packages (Debian specific)
dkms:
devscripts: helper scripts for debian package maintainer (debian specific)
linux-tree-2.6.* linux kernel source tree meta package
所有需要的package安装完成以后,就可以构建customized kernel。
linux-tree-2.6.*(我使用的是2.6.26)安装完成以后,在/usr/src下面,你会发现kernel-patches, linux-support等几个目录,以及linux-source-2.6.26.tar.bz2 源码包。
你可以将linux-source-2.6.26.tar.bz2源码包解压到你希望的位置,比如解压到/usr/src目录下,会创建/usr/src/linux-source-2.6.26.具体如下:
tar –xjvf linux-source-2.6.26.tar.bz2
然后cd到解压后源码的顶层目录:/usr/src/linux-source-2.6.26
cd /usr/src/linux-source-2.6.26
cat version.Debian
version Debian 文件存放当前debian linux source的版本和patch level。
所有patch存放在/usr/src/kernel-patches-
为了编译kernel最好先从/boot/config-$(uname -r) 当源码顶层目录
cp /boot/config-$(uname -r) .config
然后customize 你的kernel配置,通过make menuconfig 命令。
接下来执行make-kpkg clean
最好执行fakeroot make-kpkg --append_to_version -amd64 --initrd --revision=1.0 kernel_image modules_image 编译你自己的kernel。
--append_to_version 选项用于指定suffix,等同于在kernel Makefile里德EXTRAVERSION 参数。
成功执行完成后,在当前目录的上一层目录会有编译好的新的linux kernel 的debian 安装包。
dpkg –i linux-image*.deb
提示:可以通过设置export CONCURRENCY_LEVEL=NUM 其中NUM是你的CPU的数量,其效果等同于make –jNUM
指定kernel source code的源码级别
/usr/src/kernel-patches/all/2.6.26/apply/debian orig 可以unapply所有当前source code已经打的patch。
/usr/src/kernel-patches/all/2.6.26/apply/debian 2 为当前的source code打level 1和level 2 的patch
/usr/src/kernel-patches/all/2.6.26/unpatch/debian unpatch当前的linux source code
- Customize your kernel in Debian Lenny
- Step by Step tutorial howto compile kernel in Debian 5.0 (Lenny)
- How to customize a link at your desktop in LINUX
- Debian lenny -- Init
- 升级debian到lenny
- Debian lenny字体设置
- Debian(lenny)安装SVN
- Debian Lenny - Installing MySQL
- Debian lenny 安装KDE4
- Milestone/A853/XT702/umts_sholes Compile your own Android ROM and Customize your own linux kernel
- Customize Your Own Linux
- Customize your JAXB bindings
- (OK) how to customize the kernel for your hardware for Android-x86
- Debian lenny amd64 硬盘安装
- Debian Lenny安装Xen笔记
- Project Management with dotProject: Implement, Configure, Customize, and Maintain your DotProject In
- Customize web.config sections and register your own configuration then get values in asp.net
- Customize your own MFC message
- mfc socket get提交
- Meego的N9发布
- asp.net从数据库里读取二进制文件
- 可变长参数列表误区与陷阱——va_arg不可接受的类型
- VS 2008 Vector 数组奇怪事情
- Customize your kernel in Debian Lenny
- 关于android2.2地图定位的问题,程序员取得了设备所在经纬度,得不到具体的地址。这里做一下总结。
- IOS 利用多核运算-GCD开发
- 关于 frame的一些基本知识
- chkconfig命令
- coldfusion 条件表达式、循环基本用法
- 音视频同步-时间戳
- fork两次如何避免僵尸进程收藏
- iphone软件创富密码之关于Cocoa版的Hello World程序