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-

实在是读不下去了……

你可能感兴趣的:(Linux)