admin 管理员组文章数量: 1087678
【TINY4412】U
【TINY4412】U-BOOT移植笔记:(9)SD卡启动U-BOOT
宿主机 : 虚拟机 Ubuntu 16.04 LTS / X64
目标板[底板]: Tiny4412SDK - 1506
目标板[核心板]: Tiny4412 - 1412
U-BOOT版本: 2017.03
交叉编译器: gcc-arm-none-eabi-5_4-2016q3
日期: 2017-4-28 22:11:22
作者: SY
设置正确的时钟频率
参考Android_Exynos4412_iROM_Secure_Booting_Guide_Ver.1.00.00.pdf
提示:
Warning: The frequency of clocks supplied to SDMMC and eMMC are 20Mhz at the Booting time. MPLL is thesource of these clocks
因此,根据原理图可以得知,开发板使用SDMMC2,需要设置SDMMC2的时钟为20MHz。
root@ubuntu:/opt/u-boot-2017.03# git diff 565d 1071 diff --git a/arch/arm/mach-exynos/clock_init_exynos4412.c b/arch/arm mach-exynos/clock_init_exynos4412.c
index d1b4de5..b07fb2d 100644
--- a/arch/arm/mach-exynos/clock_init_exynos4412.c
+++ b/arch/arm/mach-exynos/clock_init_exynos4412.c
@@ -298,9 +298,9 @@ void system_clock_init(void)
* DOUTmmc3 = MOUTmmc3 / (ratio + 1) = 100 (7)
* sclk_mmc3 = DOUTmmc3 / (ratio + 1) = 50 (1)
* DOUTmmc2 = MOUTmmc2 / (ratio + 1) = 100 (7)
- * sclk_mmc2 = DOUTmmc2 / (ratio + 1) = 50 (1)
+ * sclk_mmc2 = DOUTmmc2 / (ratio + 1) = 20 (4)
*/
- set = MMC2_RATIO(7) | MMC2_PRE_RATIO(1) | MMC3_RATIO(7) |
+ set = MMC2_RATIO(7) | MMC2_PRE_RATIO(4) | MMC3_RATIO(7) |
MMC3_PRE_RATIO(1);clrsetbits_le32(&clk->div_fsys2, clr, set);
TZSW
- 必须关掉 tzpc_init(),否则从SPL跳转到UBOOT执行时死机。
diff --git a/arch/arm/mach-exynos/lowlevel_init.c b/arch/arm/mach-exynos/lowlevel_init.c
index 3dd4645..596f6a7 100644
--- a/arch/arm/mach-exynos/lowlevel_init.c
+++ b/arch/arm/mach-exynos/lowlevel_init.c
@@ -224,7 +224,7 @@ int do_lowlevel_init(void)
#endif
#endif
mem_ctrl_init(actions & DO_MEM_RESET);
- tzpc_init();
+ /* tzpc_init(); */
}return actions & DO_WAKEUP;
修改其他文件
diff --git a/include/configs/tiny4412.h b/include/configs/tiny4412.h
index f65affc..081d1b5 100644
--- a/include/configs/tiny4412.h
+++ b/include/configs/tiny4412.h
@@ -96,15 +96,26 @@#define CONFIG_CLK_1000_400_200-/* MIU (Memory Interleaving Unit) */
#define CONFIG_MIU_2BIT_21_7_INTERLEAVED+/*
+ * SD MMC layout:
+ * +------------+------------------------------------------------------------+
+ * | |
+ * | | | | | |
+ * | 512B | 8K(bl1) | 16k(bl2) | 16k(ENV) | 512k(u-boot) |
+ * | | | | | |
+ * | |
+ * +------------+------------------------------------------------------------+
+ *
+ */
#define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0
+#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */
#define RESERVE_BLOCK_SIZE (512)
-#define BL1_SIZE (8 << 10) /* 8K reserved for BL1*/
-#define CONFIG_ENV_OFFSET (RESERVE_BLOCK_SIZE + BL1_SIZE)
+#define BL1_SIZE (8 << 10) /* 8K reserved for BL1*/
+#define BL2_SIZE (16 << 10) /* 16K reserved for BL2 */
+#define CONFIG_ENV_OFFSET (RESERVE_BLOCK_SIZE + BL1_SIZE + BL2_SIZE)#define CONFIG_SPL_LDSCRIPT "board/samsung/common/exynos-uboot-spl.lds"
#define CONFIG_SPL_MAX_FOOTPRINT (14 * 1024)
@@ -116,3 +127,6 @@
#define BL2_START_OFFSET ((CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)/512)
#define BL2_SIZE_BLOC_COUNT (COPY_BL2_SIZE/512)
#endif /* __CONFIG_H */
+
+
+
diff --git a/sd_fuse/tiny4412/sd_fusing.sh b/sd_fuse/tiny4412/sd_fusing.sh
index f210d2f..bedf4d4 100755
--- a/sd_fuse/tiny4412/sd_fusing.sh
+++ b/sd_fuse/tiny4412/sd_fusing.sh
@@ -62,8 +62,8 @@ ${MKBL2} ${E4412_UBOOT} bl2.bin 14336signed_bl1_position=1
bl2_position=17
-uboot_position=49
-tzsw_position=705
+uboot_position=81
+tzsw_position=1105#<BL1 fusing>
echo "---------------------------------------"
@@ -82,9 +82,9 @@ echo "u-boot fusing"
dd iflag=dsync oflag=dsync if=${E4412_UBOOT} of=$1 seek=$uboot_position#<TrustZone S/W fusing>
-#echo "---------------------------------------"
-#echo "TrustZone S/W fusing"
-#dd iflag=dsync oflag=dsync if=./E4412_tzsw.bin of=$1 seek=$tzsw_position
+echo "---------------------------------------"
+echo "TrustZone S/W fusing"
+dd iflag=dsync oflag=dsync if=./E4412_tzsw.bin of=$1 seek=$tzsw_position#<flush to disk>
sync
(END)
- 测试
U-Boot 2017.03-g1071979-dirty (Apr 28 2017 - 18:23:36 -0700) for TINY4412CPU: Exynos4412 @ 1.4 GHzModel: Tiny4412 based on Exynos4412Board: Tiny4412 based on Exynos4412DRAM: 1 GiBWARNING: Caches not enabledMMC: process_nodes: failed to decode dev 0 (-22)process_nodes: failed to decode dev 1 (-22)process_nodes: failed to decode dev 2 (-22)process_nodes: failed to decode dev 3 (-22)DWMMC56: Can't get the dev indexexynos_dwmci_process_node: failed to decode dev 0MMC Device 0 not found*** Warning - No MMC card found, using default environmentHit any key to stop autoboot: 0 No MMC device availableMMC Device 0 not foundMMC Device 0 not found** Bad device mmc 0 **Wrong Image Format for bootm commandERROR: can't get kernel image!TINY4412#
本文标签: TINY4412U
版权声明:本文标题:【TINY4412】U 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1687420631a100598.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论