linux 编译单独的.ko

ARM 166浏览

写一个脚本

-C 后面跟当前目录

M 后面写需要编写模块的目录

下面的脚本属于编写wifi的单独模块

HOME_PATH=`pwd`

make CONFIG_BCMD=m -C kernel_imx M=drivers/net/wireless/bcmdhd/ modules ARCH=arm CROSS_COMPILE=$HOME_PATH/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-