Linux Kernel 技术手册笔记

Building Faster on Mulitprocessor Machines

To build the kernel in a multithreaded way, use the –j option (twice the number of processors) to the make program.For a machine with two processors present, use:

$make –j4

And for a machine with four processors, use:

       $make –j8

Source in One Place, Output in Another

For example,if the kernel source is located on a CD-ROM mounted on  /mnt/cdrom/ and you wish to place the built files in your local directory, entry:

$cd /mnt/cdrom/linux-2.6.17.11

$make 0=~/linux/linux-2.6.17.11

All of the built files will be created in the ~/linux/linux-2.6.17.11/ directory. Please note that this 0=option should also be passed to the configuration options of the build so that the configuration is correctly placed in the output directory and not in the directory containing the source code.

Different Architectures

To get the default kernel configuration of the x86_64 architecture, you would enter:

$make ARCH=x86_64 defconfig

To build the whole kernel with an ARM toolchain located in /usr/local/bin/ ,you would enter:

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

实在是读不下去了……

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值