【Tiny4412】Tiny4412烧写uboot脚本分析
发布日期:2021-06-29 20:47:22
浏览次数:3
分类:技术文章
本文共 2324 字,大约阅读时间需要 7 分钟。
00. 目录
文章目录
01. sd_fusing.sh脚本分析
## Copyright (C) 2011 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 2 as# published by the Free Software Foundation.######################################./sd_fusing.sh /dev/sdb#-z 判断参数是否为空if [ -z $1 ]then echo "usage: ./sd_fusing.sh" exit 0fi#-b 判断传递的第一个参数是否为块设备if [ -b $1 ]then echo "$1 reader is identified."else echo "$1 is NOT identified." exit 0fi##################################### #basename /dev/sdb ---> sdbBDEV_NAME=`basename $1`#获取磁盘的大小BDEV_SIZE=`cat /sys/block/${ BDEV_NAME}/size`#表示没有插入SD卡if [ ${BDEV_SIZE} -le 0 ]; then echo "Error: NO media found in card reader." exit 1fi#SD卡的大小不能超过32000000if [ ${BDEV_SIZE} -gt 32000000 ]; then echo "Error: Block device size (${BDEV_SIZE}) is too large" exit 1fi##################################### check files#u-boot.bin的文件E4412_UBOOT=../../u-boot.bin#工具MKBL2=../mkbl2#判断u-boot.bin是否存在if [ ! -f ${E4412_UBOOT} ]; then echo "Error: u-boot.bin NOT found, please build it & try again." exit -1fi#判断mkbl2工具是否存在if [ ! -f ${MKBL2} ]; then echo "Error: can not find host tool - mkbl2, stop." exit -1fi#生成bl2# ${MKBL2} ${E4412_UBOOT} bl2.bin 14336##################################### fusing imagessigned_bl1_position=1bl2_position=17uboot_position=49tzsw_position=705#烧写bl1# echo "---------------------------------------"echo "BL1 fusing"#dsync表示同步dd iflag=dsync oflag=dsync if=./E4412_N.bl1.bin of=$1 seek=$signed_bl1_position#烧写bl2# echo "---------------------------------------"echo "BL2 fusing"#dsync表示同步dd iflag=dsync oflag=dsync if=./bl2.bin of=$1 seek=$bl2_position#烧写uboot# echo "---------------------------------------"echo "u-boot fusing"dd iflag=dsync oflag=dsync if=${E4412_UBOOT} of=$1 seek=$uboot_position#烧写信任区域# echo "---------------------------------------"echo "TrustZone S/W fusing"dd iflag=dsync oflag=dsync if=./E4412_tzsw.bin of=$1 seek=$tzsw_position#同步# sync##################################### echo "---------------------------------------"echo "U-boot image is fused successfully."echo "Eject SD card and insert it again."
02. 附录
sd_fusing.sh在uboot目录中。
转载地址:https://dengjin.blog.csdn.net/article/details/106554542 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
路过,博主的博客真漂亮。。
[***.116.15.85]2024年04月15日 20时58分31秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
sql数据库语句问题及总结
2019-04-30
sql数据库触发器
2019-04-30
Could not reserve enough space
2019-04-30
2020-09-27 优秀的毕业生 罗升阳
2019-04-30
定时器ScheduledExecutorService与Timer
2019-04-30
【原文翻译】Android应用程序集成SQLCipher实现SQLite加密
2019-04-30
AndroidStudio Gradle依赖管理 - 不包括传递依赖exclude(一)
2019-04-30
Android Studio代码迁移问题小汇总
2019-04-30
weightSum与layout_weight属性使用
2019-04-30
NDK项目构建错误 ABIs [mips64, x86_64, arm64-v8a] are not available for platform and will be excluded from
2019-04-30
Android CheckBox自定义图片文字居中
2019-04-30
UI界面编程思考
2019-04-30
SQLite Room问题汇总
2019-04-30
linux下多路由器本地配置
2019-04-30
eclipse4.2版本下面安装ADT,安装已经完成了,但没有ADT的那个图标显示
2019-04-30
svn快速教程
2019-04-30
xset使用详解
2019-04-30