wok-6.x rev 20803

syslinux/iso2exe: fix gpt/efi case
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 16 12:52:08 2019 +0100 (2019-02-16)
parents 4bb30a43d4e7
children 0d54617661f0
files syslinux/stuff/iso2exe/iso2exe.sh
line diff
     1.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh	Fri Feb 15 17:40:45 2019 +0100
     1.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh	Sat Feb 16 12:52:08 2019 +0100
     1.3 @@ -7,6 +7,7 @@
     1.4  
     1.5  store()
     1.6  {
     1.7 +	local i
     1.8  	n=$2; for i in $(seq 8 8 ${4:-16}); do
     1.9  		printf '\\\\x%02X' $(($n & 255))
    1.10  		n=$(($n >> 8))
    1.11 @@ -91,8 +92,9 @@
    1.12  		ddq if=$2 bs=512 skip=1 of=$1 seek=1 conv=notrunc
    1.13  		i=3; [ -n "$mac" ] && i=9
    1.14  		ddq if=/tmp/exe$$ bs=512 skip=1 of=$1 seek=$i conv=notrunc
    1.15 -		for i in 12C 154 17C ; do	# always 3 UPX sections
    1.16 -			store $((0x$i)) $((1024 + $(get 0x$i $1))) $1
    1.17 +		OFS=$((512*($i-1)))
    1.18 +		for i in 18C 1B4 1DC ; do	# always 3 UPX sections
    1.19 +			store $((0x$i)) $(($OFS + $(get 0x$i $1))) $1
    1.20  		done
    1.21  	fi
    1.22  	printf "Adding bootiso head at %04X...\n" 0