CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 7714|回复: 4

双卡版MMC2 U-boot 源码

[复制链接]
发表于 2015-2-5 11:22:15 | 显示全部楼层 |阅读模式
$mkdir ~/sunxi
$cd ~/sunxi
$git clone https://github.com/linux-sunxi/u-boot-sunxi.git
$cd u-boot-sunxi

默认从卡 0 启动改为为卡 2 启动:

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index a0c41ac..49a19c5 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -104,7 +104,7 @@
#define CONFIG_CMD_MMC
#define CONFIG_MMC_SUNXI
#ifndef CONFIG_MMC_SUNXI_SLOT
-#define CONFIG_MMC_SUNXI_SLOT 0
+#define CONFIG_MMC_SUNXI_SLOT 2
#endif
#define CONFIG_MMC_SUNXI_USE_DMA
#define CONFIG_ENV_IS_IN_MMC
编译出来的u-boot-sunxi-with-spl.bin 能够启动双卡版bootcard

$sudo dd if=/dev/zero of=$card bs=1M count=5 //去目标卡的分区表
$sudo dd if=u-boot-sunxi-with-spl.bin of=$card bs=1024 seek=8  //写入uboot到卡头部
$sudo sync

这时候卡应该可以进入u-boot
Log 如下:
U-Boot SPL 2014.01-rc1-09165-gb4590df-dirty (May 09 2014 - 15:40:36)
Board: Cubieboard2
dram: 1024 MiB
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600
U-Boot 2014.01-rc1-09165-gb4590df-dirty (May 09 2014 - 15:40:36) Allwinner Technology
CPU:   Allwinner A20 (SUN7I)
Board: Cubieboard2
I2C:   ready
DRAM:  1 GiB
WARNING: Caches not enabled
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
In:    serial
Out:   serial
Err:   serial
Net:   mii0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0
** Invalid partition 1 **
** Invalid partition 1 **
** Invalid partition 1 **
** Invalid partition 1 **
** Invalid partition 1 **
** Invalid partition 1 **
** Invalid partition 1 **
** Invalid partition 1 **
** Invalid partition 1 **
sun7i#

回复

使用道具 举报

发表于 2015-7-29 19:02:17 | 显示全部楼层
请问mainline的u-boot如何修改呢?双卡版资料太少了
回复 支持 反对

使用道具 举报

发表于 2016-1-20 16:43:45 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

发表于 2016-1-22 13:54:17 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-4-29 12:41 , Processed in 0.025960 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部