make CC=your_compiler_path KERNELDIR=your_kernel_dir
举例(以hello模块为例)
编译内核时没有指定O选项
cd debug/hello
make CC=/3288androidsrc/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-gcc KERNELDIR=/3288androidsrc/kernel
编译内核时有指定O选项
cd debug/hello
make CROSS_COMPILE=/3288androidsrc/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- KERNEL_DIR=/3288androidsrc/kernel KERNEL_BUID_OUTPUT=/3288androidsrc/out/target/product/rk3288/obj/KERNEL
Description
Write Linux kernel drivers from scratch and hacking