wok-current rev 24228
syslinux: add apple partitions (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jan 01 11:57:50 2022 +0000 (2022-01-01) |
parents | 77dd7f0592b5 |
children | 99179f7971d4 |
files | syslinux/stuff/iso2exe/iso2exe.sh |
line diff
1.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh Sat Jan 01 10:31:50 2022 +0000 1.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh Sat Jan 01 11:57:50 2022 +0000 1.3 @@ -184,9 +184,11 @@ 1.4 c=$(custom_config_sector "$ISO") 1.5 SIZE=0; OFFSET=0 1.6 case "$1" in 1.7 + APT) [ $(get 2048 "$ISO") -eq 19792 ] && OFFSET=2048 && SIZE=2560;; 1.8 + GPT) [ $(get 512 "$ISO") -eq 17989 ] && OFFSET=512 && 1.9 + SIZE=$((512+$(get 592 "$ISO")*$(get 596 "$ISO")));; 1.10 win32.exe) [ $x -eq 2048 ] && 1.11 - x=$((40*$(get 0x86 "$ISO")+\ 1.12 - 0x98-24+$(get 0x94 "$ISO"))) && 1.13 + x=$((40*$(get 0x86 "$ISO")+0x98-24+$(get 0x94 "$ISO"))) && 1.14 x=$(($(get $x "$ISO")+$(get $((x+4)) "$ISO"))) 1.15 [ $x -eq 1024 ] || SIZE=$x;; 1.16 syslinux.mbr) [ $x -eq 1024 ] || OFFSET=$((x - 512)); SIZE=336;; 1.17 @@ -272,7 +274,7 @@ 1.18 list() 1.19 { 1.20 HEAP=0 1.21 - for f in win32.exe syslinux.mbr flavor.info floppy.boot isoboot.com \ 1.22 + for f in win32.exe GPT syslinux.mbr APT flavor.info floppy.boot isoboot.com \ 1.23 rootfs.gz dosstub boot.md5 fs.iso custom.magic custom.append \ 1.24 custom.initrd; do 1.25 fileofs $f 1.26 @@ -322,11 +324,7 @@ 1.27 1.28 clear_custom_config() 1.29 { 1.30 - start=$(custom_config_sector $1) 1.31 - cnt=$((512 - (start % 512))) 1.32 - [ $(($(stat -c %s $1)/2048 - $start)) -ge $cnt ] && ### Do not enlarge iso ! 1.33 - [ $cnt -ne 512 ] && 1.34 - ddq if=/dev/zero of=$1 bs=2k seek=$start count=$cnt 1.35 + ddq of=$1 bs=2k seek=$start count=$(custom_config_sector $1) 1.36 } 1.37 case "$1" in 1.38 --build)