tiny4412 --uboot移植(2) 点灯
开发环境: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。
代码,原理都与裸板相同,就不多做介绍。
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) 点灯的更多相关文章
- X-007 FriendlyARM tiny4412 u-boot移植之内存初始化
<<<<<<<<<<<<<<<<<<<<<<<<< ...
- X-004 FriendlyARM tiny4412 uboot移植之点亮指路灯
<<<<<<<<<<<<<<<<<<<<<<<<< ...
- X-003 FriendlyARM tiny4412 uboot移植之添加相应目录文件
X-003 FriendlyARM tiny4412 uboot移植之添加相应目录文件 <<<<<<<<<<<<<< ...
- tiny4412 --Uboot移植(5) DDR3内存
开发环境:win10 64位 + VMware12 + Ubuntu14.04 32位 工具链:linaro提供的gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-g ...
- X-010 FriendlyARM tiny4412 uboot移植之移植网卡驱动TFTP用起来
<<<<<<<<<<<<<<<<<<<<<<<<< ...
- Tiny4412 U-BOOT移植(转)
http://blog.csdn.net/eshing/article/details/37520291(转) 一.移植前说明: 1. 特别声明:此文档是我的学习文档,里面肯定有错误地方,仅供参考! ...
- 第一章、Tiny4412 U-BOOT移植一 说明【转】
本文转载自:http://blog.csdn.net/eshing/article/details/37520291 一.移植前说明: 1. 特别声明:此文档是我的学习文档,里面肯定有错误地方,仅供 ...
- 第四章、TIny4412 U-BOOT移植四 配置时钟频率源码分析【转】
本文转载自:http://blog.csdn.net/eshing/article/details/37542459 版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[+] 上 ...
- X-008 FriendlyARM tiny4412 uboot移植之copy u-boot到DDR内存
<<<<<<<<<<<<<<<<<<<<<<<<< ...
随机推荐
- django基础 -- 10.form , ModelForm ,modelformset
一.生成页面可用的 HTML标签 1.form 所有内置字段 Field required=True, 是否允许为空 widget=None, HTML插件 label=None, 用于生成Label ...
- 阿里云centos5升级yum源为6
升级后出现Errno -3] Error performing checksum 需要安装 python-hashlib Python 2.4 安装 hashlib 2012年11月13日 14:29 ...
- 6.3.4 新的_Bool类型
如果把其他非零数值赋给_Bool类型的变量,该变量会被设置为1.这反映了C把所有的非零值都视为真. input_is_good = (scanf("%ld", &num) ...
- [UE4]RichTextBlock
RichTextBlock:富文本 一.新建一个名为“TestRichTextBlock_0”的UserWidget,并添加名为RichTextBlock_0的RichTextBlock控件,并设置T ...
- c# 抽象类 抽象函数 接口
抽象类与抽象方法: 被abstract关键字修饰的类叫做抽象类 被abstract关键字修饰的方法叫做抽象方法 1.抽象方法必须放在抽象类中 2.抽象方法不可以实现代码,用空语句替代 3.抽象方法可以 ...
- shell循环(两个日期比较,改变某个特定日期来改变当前比较值)
需求:从当前时间前6个月开始执行某个语句,直到执行到当前日期的前一天. shell脚本如下: #!/bin/bash yesterday=`date -d -1day +%Y%m%d` sixmon ...
- Java 基础测试题
一.选择题 1.下面哪些是合法的变量名? ( DEG ) A.2variable B. .variable2 C. ._whatavariable D._3_ E.$anothervar F.#my ...
- Android仿淘宝继续上拉进入商品详情页的效果,使用双Fragment动画切换;
仿淘宝继续上拉进入商品详情页的效果,双Fragment实现: 动画效果: slide_above_in.xml <?xml version="1.0" encoding=&q ...
- hive mysql元数据,报错 Specified key was too long; max key length is 767 bytes
Specified key was too long; max key length is 767 bytes 此错误为hive 元数据mysql 字符集编码问题 如 show create tabl ...
- orcal 程序自动和手动项
orcal在电脑开机后,为了可以使用 这两个服务设置为自动(为了使用),其他设置为手动(减少电脑压力):