日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【Tiny4412】Tiny4412烧写uboot脚本分析

發布時間:2024/4/24 编程问答 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【Tiny4412】Tiny4412烧写uboot脚本分析 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

00. 目錄

文章目錄

    • 00. 目錄
    • 01. sd_fusing.sh腳本分析
    • 02. 附錄

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 ] thenecho "usage: ./sd_fusing.sh <SD Reader's device file>"exit 0 fi#-b 判斷傳遞的第一個參數是否為塊設備 if [ -b $1 ] thenecho "$1 reader is identified." elseecho "$1 is NOT identified."exit 0 fi#################################### #<verify device> #basename /dev/sdb ---> sdb BDEV_NAME=`basename $1` #獲取磁盤的大小 BDEV_SIZE=`cat /sys/block/${BDEV_NAME}/size`#表示沒有插入SD卡 if [ ${BDEV_SIZE} -le 0 ]; thenecho "Error: NO media found in card reader."exit 1 fi#SD卡的大小不能超過32000000 if [ ${BDEV_SIZE} -gt 32000000 ]; thenecho "Error: Block device size (${BDEV_SIZE}) is too large"exit 1 fi#################################### # check files#u-boot.bin的文件 E4412_UBOOT=../../u-boot.bin #工具 MKBL2=../mkbl2#判斷u-boot.bin是否存在 if [ ! -f ${E4412_UBOOT} ]; thenecho "Error: u-boot.bin NOT found, please build it & try again."exit -1 fi#判斷mkbl2工具是否存在 if [ ! -f ${MKBL2} ]; thenecho "Error: can not find host tool - mkbl2, stop."exit -1 fi#生成bl2 #<make bl2> ${MKBL2} ${E4412_UBOOT} bl2.bin 14336#################################### # fusing imagessigned_bl1_position=1 bl2_position=17 uboot_position=49 tzsw_position=705#燒寫bl1 #<BL1 fusing> echo "---------------------------------------" echo "BL1 fusing" #dsync表示同步 dd iflag=dsync oflag=dsync if=./E4412_N.bl1.bin of=$1 seek=$signed_bl1_position#燒寫bl2 #<BL2 fusing> echo "---------------------------------------" echo "BL2 fusing" #dsync表示同步 dd iflag=dsync oflag=dsync if=./bl2.bin of=$1 seek=$bl2_position#燒寫uboot #<u-boot fusing> echo "---------------------------------------" echo "u-boot fusing" dd iflag=dsync oflag=dsync if=${E4412_UBOOT} of=$1 seek=$uboot_position#燒寫信任區域 #<TrustZone S/W fusing> echo "---------------------------------------" echo "TrustZone S/W fusing" dd iflag=dsync oflag=dsync if=./E4412_tzsw.bin of=$1 seek=$tzsw_position#同步 #<flush to disk> sync#################################### #<Message Display> echo "---------------------------------------" echo "U-boot image is fused successfully." echo "Eject SD card and insert it again."

02. 附錄

sd_fusing.sh在uboot目錄中。

總結

以上是生活随笔為你收集整理的【Tiny4412】Tiny4412烧写uboot脚本分析的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。