wok view syslinux/stuff/iso2exe/mktazboot @ rev 24892

Down libtmp (1.1.17), 1.1.19 doesn't detect smartphones (?)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Apr 07 15:38:15 2022 +0000 (2022-04-07)
parents
children
line source
1 #!/bin/sh
3 words2bin()
4 {
5 for i in $@ ; do
6 printf '\\\\x%02X\\\\x%02X' $(($i&255)) $((($i>>8)&255))
7 done | xargs echo -en
8 }
10 S=$(($(stat -c %s $1)+12))
11 P=$((($S+511)/512))
12 E=$((4096-(32*$P)))
13 words2bin 0x5A4D $(($S%512)) $P 0 2 $E -1 -16 \
14 -2 0 256 -16 28 0x6C53 0x5469 0x7A61 > $2
15 dd if=$1 bs=1 count=$(($(stat -c %s $1)-1)) >> $2 2> /dev/null
16 echo -en '@tazboot.cmd\0' >> $2