开发环境:win10 64位 + VMware12 + Ubuntu14.04 32位

工具链:linaro提供的gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi

要移植的u-boot版本:u-boot-2016-11

Tiny4412开发板硬件版本为

  底板:  Tiny4412SDK 1312B

  核心板:Tiny4412 - 1306

 

在上一节中我们为tiny4412开发板添加相应目录文件,并且可以顺利编译通过生成.bin文件。接下来我们通过点亮tiny4412核心板上的LED灯开始调试u-boot。

4412裸板开发 (1点灯)

代码,原理都与裸板相同,就不多做介绍。

1、直接将其添加进 arch/arm/cpu/armv7/start.S

diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 7eee54b..387f2ac 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -60,7 +60,7 @@ switch_to_hypervisor_ret:
orrne r0, r0, #0x13 @ set SVC mode
orr r0, r0, #0xc0 @ disable FIQ and IRQ
msr cpsr,r0 /*
* Setup vector:
* (OMAP4 spl TEXT_BASE is not 32 byte aligned.
@@ -84,7 +84,7 @@ switch_to_hypervisor_ret:
bl cpu_init_crit
#endif
#endif
// bl_main 之前加,在cpu_init 之后
+ bl light_led
bl _main /*-----------------------------------------------------------------------------
@@ -293,3 +293,13 @@ ENTRY(cpu_init_crit)
b lowlevel_init @ go setup pll,mux,memory
ENDPROC(cpu_init_crit)
#endif
//最后面加
+ .globl light_led
+light_led:
+ ldr r0,=0x110002E0
+ ldr r1,=0x00001111
+ str r1,[r0]
+
+ ldr r0,=0x110002E4
+ mov r1,#0xF0
+ str r1,[r0]
+ mov pc,lr

2、将sd_fuse 文件夹复制到根目录下,其中包括exynos4412启动所需的二进制固件:E4412_N.bl1.bin、E4412_tzsw.bin 、sd_fuse.c、fast_fuse.sh、sd_fusing.sh

只需要修改sd_fusing.sh

#
# Copyright (C) Samsung Electronics Co., Ltd.
# http://www.samsung.com/
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version as
# published by the Free Software Foundation.
#
#################################### if [ -z $ ]
then
echo "usage: ./sd_fusing.sh <SD Reader's device file>"
exit
fi if [ -b $ ]
then
echo "$1 reader is identified."
else
echo "$1 is NOT identified."
exit
fi
#################################### #<verify device> BDEV_NAME=`basename $`
BDEV_SIZE=`cat /sys/block/${BDEV_NAME}/size` if [ ${BDEV_SIZE} -le ]; then
echo "Error: NO media found in card reader."
exit
fi
if [ ${BDEV_SIZE} -gt ]; then
echo "Error: Block device size (${BDEV_SIZE}) is too large"
exit
fi #################################### # check files #################################### # fusing images signed_bl1_position=
bl2_position=
uboot_position=
tzsw_position= #<BL1 fusing>
echo "---------------------------------------"
echo "BL1 fusing"
dd iflag=dsync oflag=dsync if=./E4412_N.bl1.bin of=$ seek=$signed_bl1_position #<tiny4412-spl.bin fusing>
echo "---------------------------------------"
echo "tiny4412-spl.bin fusing"
dd iflag=dsync oflag=dsync if=./tiny4412-spl.bin of=$ seek=$bl2_position
#<u-boot fusing>
#echo "---------------------------------------"
#echo "u-boot fusing"
#dd iflag=dsync oflag=dsync if=E4412UBOOTof= seek=$uboot_position #<TrustZone S/W fusing>
#echo "---------------------------------------"
#echo "TrustZone S/W fusing"
#dd iflag=dsync oflag=dsync if=./E4412_tzsw.bin of=1seek=tzsw_position #<flush to disk>
sync #################################### #<Message Display>
echo "---------------------------------------"
echo "U-boot image is fused successfully."
echo "Eject SD card and insert it again."

3、u-boot根目录下添加编译脚本文件build-tiny4412.sh

   echo "****clean****"
make clean echo "----config tiny4412----"
make ARCH=arm tiny4412_defconfig echo "----building----"
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-

在完成前两部后,在根目录执行build-tiny4412.sh ,正常会在spl下生成tiny4412-spl.bin。这就是通过board/samsung/tiny4412/tools/mktiny4412spl.h生成的bl2。然后把tiny4412-spl.bin拷入sd_fuse ,用sd_fusing.sh 烧入SD卡即可。

tiny4412 --uboot移植(2) 点灯的更多相关文章

  1. X-007 FriendlyARM tiny4412 u-boot移植之内存初始化

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

  2. X-004 FriendlyARM tiny4412 uboot移植之点亮指路灯

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

  3. X-003 FriendlyARM tiny4412 uboot移植之添加相应目录文件

    X-003 FriendlyARM tiny4412 uboot移植之添加相应目录文件 <<<<<<<<<<<<<< ...

  4. tiny4412 --Uboot移植(5) DDR3内存

    开发环境:win10 64位 + VMware12 + Ubuntu14.04 32位 工具链:linaro提供的gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-g ...

  5. X-010 FriendlyARM tiny4412 uboot移植之移植网卡驱动TFTP用起来

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

  6. Tiny4412 U-BOOT移植(转)

    http://blog.csdn.net/eshing/article/details/37520291(转) 一.移植前说明: 1.  特别声明:此文档是我的学习文档,里面肯定有错误地方,仅供参考! ...

  7. 第一章、Tiny4412 U-BOOT移植一 说明【转】

    本文转载自:http://blog.csdn.net/eshing/article/details/37520291 一.移植前说明: 1.  特别声明:此文档是我的学习文档,里面肯定有错误地方,仅供 ...

  8. 第四章、TIny4412 U-BOOT移植四 配置时钟频率源码分析【转】

    本文转载自:http://blog.csdn.net/eshing/article/details/37542459 版权声明:本文为博主原创文章,未经博主允许不得转载.   目录(?)[+]   上 ...

  9. X-008 FriendlyARM tiny4412 uboot移植之copy u-boot到DDR内存

    <<<<<<<<<<<<<<<<<<<<<<<<< ...

随机推荐

  1. Java面向对象 第2节 Scanner 类和格式化输出printf

    §Scanner 类 java.util.Scanner 是 Java5 的新特征,我们可以通过 Scanner 类来获取用户的输入. 1.创建 Scanner 对象的基本语法:Scanner s = ...

  2. Python脚本模拟僵尸进程与孤儿进程

    最近一台机器的systemd内存高达30%多,一直不变,后来排查是僵尸进程,什么是僵尸进程呢,只能google,百度等先了解,然后自己总结了一下,虽然这是基础的东西,但是对于我来说就如新大陆一样.花了 ...

  3. USB HID设备报告描述符详解(转)

    转自:http://group.ednchina.com/93/198.aspx. 参考:USB HID usage table 概述:   报告在这里意思是数据传输(data transfer),而 ...

  4. 1131(★、※)Subway Map

    思路:DFS遍历 #include <iostream> #include <map> #include <vector> #include <cstdio& ...

  5. [TFS教程]TFS: Get Command

    Get Command Visual Studio 2012   Gets (downloads) either the latest version or a specified version o ...

  6. python开发计算器

    1 业务需求 1.1 用户输入 1 - 2 * ( (60-30 +(-40/5) * (9-2*5/3 + 7 /3*99/4*2998 +10 * 568/14 )) - (-4*3)/ (16- ...

  7. iOS之iOS11、iPhone X、Xcode9 适配指南

    更新iOS11后,发现有些地方需要做适配,整理后按照优先级分为以下三类: 1.单纯升级iOS11后造成的变化: 2.Xcode9 打包后造成的变化: 3.iPhoneX的适配 一.单纯升级iOS11后 ...

  8. 涂抹mysql笔记-InnoDB/MyISAM及其它各种存储引擎

    存储引擎:一种设计的存取和处理方式.为不同访问特点的表对象指定不同的存储引擎,可以获取更高的性能和处理数据的灵活性.通常是.so文件,可以用mysql命令加载它. 查看当前mysql数据库支持的存储引 ...

  9. 虚拟机克隆之后,网卡名称从eth0变成eth1之后的解决办法

    使用VMware安装了CentOS虚拟机,克隆之后使用service network restart指令来重新启动网络服务时,会看到有eth0网卡不存在的提示.出现这种现象的原因是,很多Linux d ...

  10. Dubbo源码分析

    Dubbo源码分析1 Dubbo源码分析2 dubbo源码阅读:rpc请求处理流程(1) 架构设计:系统间通信(17)——服务治理与Dubbo 中篇(分析) 13. Dubbo原理解析-注册中心之Zo ...