如何交叉编译 linux kernel 内核

Compilation

We first need to move the config file by running

cp arch/arm/configs/bcmrpi_cutdown_defconfig .config     # 看情况
Then configure the kernel build

make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- oldconfig     # 看情况
Optional: Customise the build using menuconfig

make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- menuconfig
Then run the compilation

make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k

原文地址:https://www.cnblogs.com/welhzh/p/6903562.html