spacemit: write_uboot_platform: Fix the reverse logic
This commit is contained in:
parent
648bdea785
commit
323ba5234e
@ -86,14 +86,14 @@ write_uboot_platform() {
|
||||
|
||||
for f in ${!d[@]}
|
||||
do
|
||||
echo "skip\seek=${d[$f]%:*} count=${d[$f]#*:}"
|
||||
#echo "skip\seek=${d[$f]%:*} count=${d[$f]#*:}" # uncomment for debugging
|
||||
if $(dd if=${device} bs=1 skip=${d[$f]%:*} count=${d[$f]#*:} \
|
||||
conv=notrunc status=noxfer | cmp ${f})
|
||||
then
|
||||
echo "Skip $(basename $f), it is equal to the existing one"
|
||||
else
|
||||
dd if=$f of=${device} bs=1 seek=${d[$f]%:*} conv=notrunc status=noxfer
|
||||
sync
|
||||
else
|
||||
echo "Skip $f, it is equal to the existing one"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user