1.清理内核命令
$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper
(注意:此命令会删除.config文件)
或者
$cd $make linux_clean
:此时为/home/qiuweibo/workspace/002.am335x/000.install/ti-sdk-am335x-evm-06.00.00.00
2.配置内核
2.1使用默认配置
$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
在arch/arm/configs查找
Device SDK config PSP config
AM335x/Beaglebone tisdk_am335x-evm_defconfig am335x_evm_defconfig
AM37x tisdk_am37x-evm_defconfig omap3_evm_defconfig
AM3517 tisdk_am3517-evm_defconfig am3517_evm_defconfig
Beagleboard tisdk_beagleboard_defconfig omap3_beagle_defconfig
AM180x tisdk_am180x-evm_defconfig da850_omapl138_defconfig
例如:
默认PSP配置
$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x_evm_defconfig
默认SDK配置
$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am335x-evm_defconfig
2.2裁剪内核
可以使用menuconfig或xconfig两种命令配置
menuconfig: an ncurses based configuration utility xconfig: a Qt based graphical configuration utility.
NOTE
On some systems in order to use xconfig you may need to install the libqt3-mt-dev package. For example on Ubuntu
10.04 this can be done using the command sudo apt-get install libqt3-mt-dev
i例如:使用menuconfig命令
$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
使用xconfig命令
$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- xconfig
2.3编译内核
2.3.1编译内核文件
$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage
文件生成在arch/arm/boot/下
2.3.2编译内核模块
$make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules
文件生成为.ko
2.4内核模块安装
$sudo make ARCH=arm INSTALL_MOD_PATH=modules_install
例如
For example if you are installing the modules to an NFS share located at /home/user/targetNFS you would do:
sudo make ARCH=arm INSTALL_MOD_PATH=/home/user/targetNFS modules_install