wok rev 23935

syslinux/isohybrid: force GPT detection
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Sep 09 12:44:57 2020 +0000 (2020-09-09)
parents 833c2c04420b
children db796dcadf0a
files exfat-utils/receipt syslinux/stuff/tools/isohybrid.sh
line diff
     1.1 --- a/exfat-utils/receipt	Mon Sep 07 16:46:15 2020 +0100
     1.2 +++ b/exfat-utils/receipt	Wed Sep 09 12:44:57 2020 +0000
     1.3 @@ -9,6 +9,7 @@
     1.4  WEB_SITE="https://github.com/relan/exfat"
     1.5  TARBALL="$PACKAGE-$VERSION.tar.gz"
     1.6  WGET_URL="https://github.com/relan/exfat/archive/v$VERSION/$TARBALL"
     1.7 +PROVIDE="exfat-fuse"
     1.8  
     1.9  DEPENDS="fuse"
    1.10  BUILD_DEPENDS="autoconf automake fuse-dev"
     2.1 --- a/syslinux/stuff/tools/isohybrid.sh	Mon Sep 07 16:46:15 2020 +0100
     2.2 +++ b/syslinux/stuff/tools/isohybrid.sh	Wed Sep 09 12:44:57 2020 +0000
     2.3 @@ -183,7 +183,7 @@
     2.4  	esect=$(( ($sectors + ((($cylinders -1) & 0x300) >>2)) <<16))
     2.5  	ecyl=$(( (($cylinders -1) & 0xff) <<24))
     2.6  	epart=$(((($heads - 1) <<8) +$esect +$ecyl))
     2.7 -	sectorcount=$(($cylinders * $heads * $sectors))
     2.8 +	sectorcount=$(($size/512))
     2.9  	lastlba=$(($sectorcount -1))
    2.10  	if [ -z "$efi_ofs" ]; then
    2.11  		store32 $e 0x10080
    2.12 @@ -199,17 +199,12 @@
    2.13  		store32 $((446+12)) $lastlba
    2.14  		uudecode <<EOT | unlzma | ddq bs=512 seek=1 of=$iso conv=notrunc
    2.15  begin-base64 644 -
    2.16 -XQAAgAD//////////wAikYVN1N2VY3JXMnUMJn1TblyFehfeJH+D4/XPYFjO
    2.17 -OzQluqM2w0L9b1dJMfZHJbnNnBFhYprW0PWPY1UOgQJkhF/W2Z0lXvaSrZ7t
    2.18 -yEtpmE3Go6qt6Ezmp7CN//v9AAA=
    2.19 +XQAAgAD//////////wAikYVN1N2VY3JXMnUMJn1TblyFVNF25HoOVhrhw3Se
    2.20 +4kSBUojPrccmav59pOZXngC45IbLUHikh0qe2mYlrw/AaqRZRJRaLD2FL2dU
    2.21 +TQz7/DAViU2+RxNm5OdW//po4AA=
    2.22  ====
    2.23  EOT
    2.24 -		lastlba=$(($sectorcount -1))
    2.25 -		usablelba=34
    2.26 -		store32 $((0x218)) 1
    2.27 -		store32 $((0x220)) $lastlba
    2.28 -		store32 $((0x228)) $usablelba
    2.29 -		store32 $((0x230)) $(($lastlba-$usablelba+1))
    2.30 +		store32 $((0x230)) $lastlba
    2.31  		store32 $((0x420)) $efi_ofs
    2.32  		store32 $((0x428)) $(($efi_ofs+$efi_len-1))
    2.33  		for i in 238 410 490 ; do
    2.34 @@ -248,7 +243,8 @@
    2.35  trksz=$(( 512 * $heads * $sectors ))
    2.36  cylinders=$(( ($size + $trksz - 1) / $trksz ))
    2.37  pad=$(( (($cylinders * $trksz) - $size) / 512 ))
    2.38 -#[ $pad -eq 0 ] || ddq bs=512 count=$pad if=/dev/zero >> $iso
    2.39 +#[ $pad -ne 0 ] && size=$(($size+$pad)) && ddq bs=512 count=$pad if=/dev/zero >> $iso
    2.40 +size=$(stat -c "%s" $iso)
    2.41  if [ $cylinders -gt 1024 ]; then
    2.42  	cat 1>&2 <<EOT
    2.43  Warning: more than 1024 cylinders ($cylinders).