spacemit: write_uboot_platform: Fix the reverse logic

This commit is contained in:
The-going 2024-07-23 18:55:33 +03:00 committed by Igor
parent 648bdea785
commit 323ba5234e

View File

@ -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