我对内核进行整体编译以后,drives/mtd/nand和drives/mtd/onenand 下都会编译生成omap2.o的文件,为什么会生成两个?是两个omap.c 文件都会用吗?
而我从nandflash启动系统以后,dmesg打印log可以看出只初始化了one nand,请问这样就可以说明我用的am335x开发板上用的是one nand吗?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我是在onenand和nand下边的omap2.c里的probe函数里都有打印,然后编译完成以后,我是把编译好的文件拷贝到SD卡中,从sd卡中启动,然后我在这两个probe函数中打印的语句都没有打印出来,是不是从SD卡启动,内核driver层只登记nand的platform_driver,然后会打印出来init函数中的 OneNAND driver initializing ,omap2-nand driver initializing ,是因为这里没有使用到nand所以没有指定对应的platform_device, 所以也不会执行probe()函数吗??
[ 0.715683] bone-capemgr bone_capemgr.9: loader: after slot-4 BB-BONE-EMMC-2)
[ 0.715706] bone-capemgr bone_capemgr.9: slot #4: Requesting firmware 'cape-'
[ 0.715724] bone-capemgr bone_capemgr.9: slot #4: dtbo 'cape-bone-2g-emmc1.de
[ 0.715919] bone-capemgr bone_capemgr.9: slot #4: #2 overlays
[ 0.716511] bone-capemgr bone_capemgr.9: slot #4: Applied #2 overlays.
[ 0.716530] bone-capemgr bone_capemgr.9: loader: done slot-4 BB-BONE-EMMC-2G)
[ 0.717958] OneNAND driver initializing
[ 0.718170] bone-capemgr bone_capemgr.9: loader: after slot-5 BB-BONELT-HDMI)
[ 0.718196] bone-capemgr bone_capemgr.9: slot #5: Requesting firmware 'cape-'
[ 0.718224] bone-capemgr bone_capemgr.9: slot #5: dtbo 'cape-boneblack-hdmi-e
[ 0.718775] bone-capemgr bone_capemgr.9: slot #5: #4 overlays
上边这个是我从nand中启动的log,从log中可以看出对onenand进行了初始化,
[ 1.072998] to AC power is recommended.
[ 1.116973] omap_hsmmc.0: alias fck already exists
[ 1.122375] omap_hsmmc.1: alias fck already exists
[ 1.127746] omap_i2c.3: alias fck already exists
[ 1.132904] omap_i2c omap_i2c.3: bus 3 rev2.4.0 at 100 kHz
[ 1.140380] registered am33xx_sr device
[ 1.145843] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.152862] omap2-nand driver initializing
[ 1.157318] 1234567#######OneNAND driver initializing
[ 1.163513] CAN device driver interface
[ 1.167541] CAN bus driver for Bosch D_CAN controller 1.0
[ 1.214202] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[ 1.220642] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[ 1.227752] davinci_mdio.0: probed
上边这个log是我从SD卡中启动的,可以看到对nand和onenand都进行了初始化,这里可以以您分析的只是登记了platform_driver,