开发环境: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. Session、Cookie、Cache、Token分别是什么及区别

    一.Session 1 )Session 解释 Session 是单用户的会话状态.当用户访问网站时,产生一个 sessionid.并存在于 cookies中.每次向服务器请求时,发送这个 cooki ...

  2. k8s-YAML配置文件(转)

    转自http://www.cnblogs.com/bigberg/p/9203619.html 一.YAML基础 YAML是专门用来写配置文件的语言,非常简洁和强大,使用比json更方便.它实质上是一 ...

  3. WebForm AnyWay

    项目地址 :  https://github.com/kelin-xycs/WebFormAnyWay WebForm AnyWay 用 WebForm 构建 简洁高效 的 Web 应用 WebFor ...

  4. C# datagridview大小跟随窗口动态改变(转)

    在C#中使用winform布局的时候,拖一个datagridview到窗体上面,将datagridview调整为适合窗体的大小. 但是运行之后,点击最大化按钮的时候,发现datagridview的大小 ...

  5. 让所有浏览器支持HTML5 video视频标签

    HTML5究竟需要多少种视频编码格式 当前,video 元素支持三种视频格式:Ogg = 带有 Theora 视频编码和 Vorbis 音频编码的 Ogg 文件MPEG4 = 带有 H.264 视频编 ...

  6. 执行sql语句为什么?用PreparedStatement要比Statement好用

    PreparedStatement public interface PreparedStatement extends Statement;可以看到PreparedStatement是Stateme ...

  7. ss客户端以及tcp,udp,dns代理ss-tproxy本地安装版--centos7.3 x64以上(7.3-7.6x64测试通过)

    因为下载的文件,从cn下载很慢,或者下不动,所以我弄了一个本地安装版 本地安装的文件,我是从网上单独下载了,这里就不提供了. 记得在最后设置允许访问的局域网IP段 ## iptables 配置ipta ...

  8. c# 字典

    字典 在System.Collections.Generic下, 对应HashTable,添加了泛型的特性,性能更高跟安全 在内存中是散列排布的,存储也是键值对 Dictionary<键的数据类 ...

  9. udev example -- detect usb and write test file

    之前学习了下Udev,就随便做了个测试小程序.....设计什么的也没考虑,就实现了一个基本功能,插入U盘,识别,循环检测到有特定文件后,就然后往U盘里面写数据,插拔多次,都能正常工作. 里面的warn ...

  10. Linux集群之keepalive+Nginx

    集群从功能实现上分高可用和负载均衡: 高可用集群,即“HA"集群,也常称作“双机热备”. 当提供服务的机器宕机,备胎将接替继续提供服务: 实现高可用的开源软件有:heartbeat.keep ...