wok-current diff syslinux/stuff/tools/isohybrid.sh @ rev 20334
Do not use efi shell (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 02 16:13:06 2018 +0200 (2018-06-02) |
parents | f582dbc28a10 |
children | 02c70d036ea0 |
line diff
1.1 --- a/syslinux/stuff/tools/isohybrid.sh Wed May 30 11:10:35 2018 +0200 1.2 +++ b/syslinux/stuff/tools/isohybrid.sh Sat Jun 02 16:13:06 2018 +0200 1.3 @@ -187,16 +187,17 @@ 1.4 store32 440 $id 1.5 store32 508 0xAA550000 1.6 e=$(( ((${entry:-1} -1) % 4) *16 +446)) 1.7 - store32 $e 0x10080 1.8 esect=$(( ($sectors + ((($cylinders -1) & 0x300) >>2)) <<16)) 1.9 ecyl=$(( (($cylinders -1) & 0xff) <<24)) 1.10 epart=$(((($heads - 1) <<8) +$esect +$ecyl)) 1.11 - store32 $(($e + 4)) $(($partype + $epart)) 1.12 - store32 $(($e + 8)) $offset 1.13 sectorcount=$(($cylinders * $heads * $sectors)) 1.14 - store32 $(($e + 12)) $sectorcount 1.15 - if [ -n "$efi_ofs" ]; then 1.16 - lastlba=$(($sectorcount -1)) 1.17 + lastlba=$(($sectorcount -1)) 1.18 + if [ -z "$efi_ofs" ]; then 1.19 + store32 $e 0x10080 1.20 + store32 $(($e + 4)) $(($partype + $epart)) 1.21 + store32 $(($e + 8)) $offset 1.22 + store32 $(($e + 12)) $sectorcount 1.23 + else 1.24 [ $(read16 0 1024) -eq 35615 -a $(read16 11 0) -ne 35615 ] && 1.25 ddq bs=512 conv=notrunc skip=2 seek=44 count=20 if=$iso of=$iso 1.26 store32 $((446)) $((0x10000)) 1.27 @@ -244,8 +245,8 @@ 1.28 abort "invalid boot catalog." 1.29 efi_ofs= 1.30 if [ $(read8 $cat 65) -eq 239 ]; then 1.31 - [ ${entry:-2} != 2 ] && echo "$iso: efi boot ignore --entry $entry" 1.32 - entry=2 1.33 + [ ${entry:-1} != 1 ] && echo "$iso: efi boot ignore --entry $entry" 1.34 + entry=1 1.35 partype=0 1.36 efi_ofs=$((4*$(read32 $cat 104))) 1.37 efi_len=$(($(read16 $(($efi_ofs/4)) 19)))