全志A20单独烧录内核
???? 啟動到uboot命令行,輸入mmcinfo初始化mmc,不過提示:No MMC avaliable什么的,查找uboot源代碼,發現,
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或者MMC中的一種,這沒有道理啊。于是去掉else,無論什么情況下都初始化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);
?? // }
還有個地方需要修改的: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)
啟動系統,可以順利識別MMC了。
執行命令:
mmcinfo
fatload mmc 2:1 82000000 boot.img
nand erase.part boot
nand write 82000000 3000000 1000000
重新啟動發現內核確實更新了。
總結
以上是生活随笔為你收集整理的全志A20单独烧录内核的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 金融债券和企业债券哪个风险大?二者有何区
- 下一篇: 信用卡临时额度还款日是哪一天