wok-next diff syslinux/stuff/iso2exe/iso2exe.sh @ rev 13698
syslinux/iso2exe: tiny edits
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Fri Dec 14 22:52:32 2012 +0000 (2012-12-14) |
parents | 87a217af01ea |
children | 9d2380009b81 |
line diff
1.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh Thu Dec 13 18:22:00 2012 +0000 1.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh Fri Dec 14 22:52:32 2012 +0000 1.3 @@ -66,8 +66,17 @@ 1.4 OFS=$(( $OFS - $SIZE )) 1.5 printf "Adding DOS boot file at %04X...\n" $OFS 1.6 $0 --get lzcom.bin boot.com.lzma | ddq of=$1 bs=1 seek=$OFS conv=notrunc 1.7 - store 36 $(($OFS+0xE0)) $1 1.8 + store 34 $(($OFS+0xE0)) $1 1.9 store 30 ${RANDOM:-0} $1 1.10 + i=34 1.11 + n=0 1.12 + echo -n "Adding checksum..." 1.13 + while [ $i -lt 32768 ]; do 1.14 + n=$(($n + $(od -j $i -N 2 -t u2 -An $1) )) 1.15 + i=$(($i + 2)) 1.16 + done 1.17 + store 32 -$n $1 1.18 + echo " done." 1.19 } 1.20 1.21 main $@ <<EOT