1.先使用configuration tools,配置内核。
a:make menuconfig ARCH=arm
b: 然后:make ARCH==arm CROSS_COMPILE=arm-linux- (应该是内核出来之后,再次运行的吧??)
2.选择配置内核
3.生成.config文件,其中包含着配置信息。
4.make bzImage
5.root Makefile 读.config 文件
6.读入.config之后,顶层的 Makefile
(1)更新 include/linux/version.h
(2)把符号连接include/asm 指向我们正在编译的体系结构对应的文件!这里是include/asm-arm
(3)建立include/linux/autoconf.h它和.config的内容一样!!
(4)建立include/linux/config.h
7.然后 kbuild就可以进入子文件夹,调用其中的子Makefile ,用.c .s文件,建立目标文件
生成内核映像!
还有更详细的就不在这里讨论了!!!!
obj-$ (CONFIG_XXX) +=XXX.o
看到上面这个应该想到很多吧!!! YNM