1 Star 0 Fork 2

leo / u-boot-MT7621

forked from 隨風飛翔 / u-boot-MT7621 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mt7621_ddr.sh 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
Vitaliy Nimych 提交于 2019-11-04 12:16 . first commit
#!/bin/sh
VAR=$4
DDR3=$(echo ${VAR##*DDR3})
if [ "$DDR3" = "$4" ]; then
ddr_param_offset=200
else
ddr_param_offset=96
fi
LINE_NUM=$(cat ./$3|sed -n "/$4/=")
LINE_NUM=$(echo $LINE_NUM + "1"|bc)
if [ "$5" = "IN_NAND" ]; then
offset=$ddr_param_offset
sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc
offset=$(echo $offset + "32"|bc)
LINE_NUM=$(echo $LINE_NUM + "1"|bc)
sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc
offset=$(echo $offset + "32"|bc)
LINE_NUM=$(echo $LINE_NUM + "1"|bc)
sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc
else
offset=$(echo "(($(stat -c %s uboot.bin)+$ddr_param_offset))" |bc)
sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc
LINE_NUM=$(echo $LINE_NUM + "1"|bc)
offset=$(echo $offset + "32"|bc)
sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc
LINE_NUM=$(echo $LINE_NUM + "1"|bc)
offset=$(echo $offset + "32"|bc)
sed -n "${LINE_NUM}p" ./$3|xxd -r -c 32|dd bs=1 count=32 seek=$offset of=$2 conv=notrunc
fi
1
https://gitee.com/leolee1043/u-boot-MT7621.git
git@gitee.com:leolee1043/u-boot-MT7621.git
leolee1043
u-boot-MT7621
u-boot-MT7621
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891