aaron 发表于 2015-2-5 11:22:15

双卡版MMC2 U-boot 源码

$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#

jump 发表于 2015-7-29 19:02:17

请问mainline的u-boot如何修改呢?双卡版资料太少了

错过不是错 发表于 2016-1-20 16:43:45

错过不是错 发表于 2016-1-22 13:54:17

页: [1]
查看完整版本: 双卡版MMC2 U-boot 源码