全志A20单独烧录内核
???? 啟動(dòng)到uboot命令行,輸入mmcinfo初始化mmc,不過(guò)提示:No MMC avaliable什么的,查找uboot源代碼,發(fā)現(xiàn),
u-boot/arch/arm/lib/board.c里面,
??? if(!storage_type){
?? ??? ?puts("NAND:? ");
?? ??? ?nand_init();?? ??? ?/* go init the NAND */
?? ?}
??? else{
?? ??? ?puts("MMC:?? ");
??????? mmc_initialize(bd);
??? }
???? 紅色代碼地方表明,uboot命令行只支持NAND或者M(jìn)MC中的一種,這沒(méi)有道理啊。于是去掉else,無(wú)論什么情況下都初始化MMC。也就是修改為:
??? if(!storage_type){
?? ??? ?puts("NAND:? ");
?? ??? ?nand_init();?? ??? ?/* go init the NAND */
?? ?}
??? //else{//modified by Antony, for the perpose of enable MMC in uboot
?? ??? ?puts("MMC:?? ");
??????? mmc_initialize(bd);
?? // }
還有個(gè)地方需要修改的:include/configs/sun7i.h,以下三處紅色的地方。
/* mmc config */
#define CONFIG_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_CMD_MMC
#define CONFIG_MMC_SUNXI
#define CONFIG_MMC_SUNXI_SLOT?? ??? ?0?? ??? ?/* which mmc slot to use, could be 0,1,2,3 */
#define CONFIG_MMC_SUNXI_USE_DMA
#define CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV?? ??? ?0/* first detected MMC controller */
#define CONFIG_STORAGE_EMMC
#define CONFIG_FASTBOOT_MMC_NO?? ??? ?0
#define CONFIG_MMC_LOGICAL_OFFSET?? (20 * 1024 * 1024/512)
啟動(dòng)系統(tǒng),可以順利識(shí)別MMC了。
執(zhí)行命令:
mmcinfo
fatload mmc 2:1 82000000 boot.img
nand erase.part boot
nand write 82000000 3000000 1000000
重新啟動(dòng)發(fā)現(xiàn)內(nèi)核確實(shí)更新了。
總結(jié)
以上是生活随笔為你收集整理的全志A20单独烧录内核的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 金融债券和企业债券哪个风险大?二者有何区
- 下一篇: MinGw+Msys搭建环境 编译ffm