Linux内核配置

来源:互联网 发布:田岛美工刀片 编辑:程序博客网 时间:2024/06/09 20:18

首先获取内核源码www.kernel.org

1.在/home/下家里linux 通过wget或crul或者直接下载内核源码到此文件夹下并解压。

2.内核配置

make config (从头开始)

make defconfig (默认配置)

修改配置

make menuconfig

make gconfig (GTK)

make xconfig (Qt)

 

make

 

3.使用多处理器

make -j4 (双处理器)

make -j8 (4处理器)

make -j

 

4.部分构建内核模块

drivers/usb/serial

 

make drivers/usb/serial (不会构建此文件夹中模块的最终映像 )

make M=drivers/usb/serial

make

 

make drivers/usb/serial/visor.ko (最终可用模块)

 

5.源码在此处,输出在彼处

O=告诉内核输出位置

 

cd /mnt/cdrom/linux-2.3.10

make O=~/linux/linux-2.6.30

 

6不同架构(特别适用于ARM)

 

make ARCH=x86_64 defconfig

make ARCH=arm CROSS_COMPILE=/usr/local/bin/arm-linux-

 

7非交叉

 

make CC="ccache gcc"

make CC="cache distcc"

 

 

 

原创粉丝点击