kernel 移植笔记(从omap linux-02.01.03.11 到 fred 版本kernel 学习)

1、make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_adv_defconfig,执行之后.config与omap3_adv_defconfig无关问题???
参考:
文章:再次深入研究kernel的Makefile

.config的产成
----------------------------------
make ${PLATFORM}_defconfig  命令执行后
.config 和 arch/$ARCH/configs/${PLATFORM}_defconfig之间的关系?


make defconfig            
创建一个包含全部默认选项的.config文件,从arch/$ARCH/defconfig或
arch/$ARCH/configs/${PLATFORM}_defconfig获取,依赖于体系结构。
如果没有defconfig就去找${PLATFORM}_defconfig,前提是变量PLATFORM
和ARCH已经赋值。如果PLATFORM没有赋值,最好用下面的命令。


make ${PLATFORM}_defconfig    
从arch/$ARCH/configs/${PLATFORM}_defconfig创建一个.config.

最终生成的.config依赖于${PLATFORM}_defconfig,但并不是${PLATFORM}_defconfig的
简单拷贝;就此说明生成.config还依赖其他文件,需要继续研究,找出其他神秘文件!

 "make defconfig"   Create a ./.config file by using the default
      symbol values from either arch/$ARCH/defconfig
      or arch/$ARCH/configs/${PLATFORM}_defconfig,
      depending on the architecture.

 "make ${PLATFORM}_defconfig"
     Create a ./.config file by using the default
     symbol values from
     arch/$ARCH/configs/${PLATFORM}_defconfig.
     Use "make help" to get a list of all available
     platforms of your architecture.


为什么修改了${PLATFORM}_defconfig后,再次运行make ${PLATFORM}_defconfig
,修改内容在新生成的.config中并没有反应出来?

.config的生成依赖于defconfig和arch/$(ARCH)/Kconfig,defconfig决定是否配置某个选项,Kconfig决定该选项的配置值。所以修改COFNIG_TASK_SIZE,需要修改Kconfig,才能最终生效。 


比如Kconfig中添加如下选项,来决定.config中的CONFIG_MACH_OMAP3ADV=y或者=n,否则.config无法预期生成 
config MACH_OMAP3ADV 
        bool "Advantech SOM-C3530 board" 
        depends on ARCH_OMAP3 && ARCH_OMAP34XX && !MACH_OMAP3EVM 



2、从omap psp中获取linux kernel linux-02.01.03.11,配置:
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm omap3_adv_defconfig
然后直接编译:
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm  uImage,出错:
n file included from drivers/usb/host/ehci-hcd.c:1018:
drivers/usb/host/ehci-omap.c:44:7: warning: "CONFIG_OMAP3430SDP_750_2083_001" is not defined
In file included from drivers/usb/host/ehci-hcd.c:1018:
drivers/usb/host/ehci-omap.c: In function 'omap_start_ehc':
drivers/usb/host/ehci-omap.c:243: error: 'EXT_PHY_RESET_GPIO_PORT2' undeclared (first use in this function)
drivers/usb/host/ehci-omap.c:243: error: (Each undeclared identifier is reported only once
drivers/usb/host/ehci-omap.c:243: error: for each function it appears in.)
drivers/usb/host/ehci-omap.c:243: error: 'omap3_ehci_phy_reset_gpio' undeclared (first use in this function)
drivers/usb/host/ehci-omap.c: In function 'omap_stop_ehc':
drivers/usb/host/ehci-omap.c:465: error: 'EXT_PHY_RESET_GPIO_PORT2' undeclared (first use in this function)
make[3]: *** [drivers/usb/host/ehci-hcd.o] 错误 1
make[2]: *** [drivers/usb/host] 错误 2
make[1]: *** [drivers/usb] 错误 2
make: *** [drivers] 错误 2

于是,开始修改代码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值