【Tiny4412】Tiny4412烧写uboot脚本分析
发布日期:2021-06-29 20:47:22
浏览次数:2
分类:技术文章
本文共 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 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
能坚持,总会有不一样的收获!
[***.219.124.196]2024年04月06日 21时16分00秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
弘辽科技:什么行业适合夫妻店?适合夫妻开的店
2019-04-30
弘辽科技:淘宝保险保证金怎么开通?它和消保保证金有什么区别?
2019-04-30
弘辽科技:淘宝开店后怎么经营?步骤有哪些?
2019-04-30
弘辽科技:淘宝开店会有人主动联系吗?怎么才会有人买?
2019-04-30
从零开始搭建免费小程序商城
2019-04-30
如何快速创建个人网站
2019-04-30
立即拥有自己的商城APP,这个功能简直了
2019-04-30
黑科技!无需代码快速搭建网站的平台来了
2019-04-30
如何利用小程序降低获客成本
2019-04-30
OMG,小程序居然免费啦
2019-04-30
电商系统新功能:折扣码和折扣分享码带来更多营销新玩法
2019-04-30
快速开通百度智能小程序攻略
2019-04-30
没有设计能力,如何打造个人网站?
2019-04-30
微信公众号和小程序的深度流量玩法
2019-04-30
赋能表单数据,提升智能表单营销能力
2021-07-03
用它提升品牌力,【Design Lab】必用3大酷炫功能
2021-07-03
有了轻栈搭建小程序商城工具,小白也能零门槛开发自己的小程序商城了
2021-07-03
推广成本不菲?百度自然流量的硬核武器来啦
2021-07-03
时代发展趋势:电商+小程序
2021-07-03
没有网店经验的小商家开辟小程序商城之路
2021-07-03