tazlito rev 477

uefi support aventually... (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jan 19 21:17:10 2018 +0100 (2018-01-19)
parents 694ee477b778
children e7527f03e314
files tazlito
line diff
     1.1 --- a/tazlito	Fri Jan 19 21:06:16 2018 +0100
     1.2 +++ b/tazlito	Fri Jan 19 21:17:10 2018 +0100
     1.3 @@ -343,9 +343,9 @@
     1.4  		}' | hexdump -R > /tmp/fatbin-16-$$
     1.5  	fi
     1.6  
     1.7 -	# align fat to 2k
     1.8 -	dd of=$(ls /tmp/fatbin-*-$$) count=0 bs=2048 \
     1.9 -		seek=$((($(stat -c %s /tmp/fatbin-*-$$)-1)/2048+1)) 2>/dev/null
    1.10 +	# align fat to 512 bytes
    1.11 +	dd of=$(ls /tmp/fatbin-*-$$) count=0 bs=512 \
    1.12 +		seek=$((($(stat -c %s /tmp/fatbin-*-$$)-1)/512+1)) 2>/dev/null
    1.13  
    1.14  	# build directory records
    1.15  
    1.16 @@ -472,10 +472,10 @@
    1.17  	clusters=$(($clusters+$dclust))
    1.18  	if [ $clusters -lt 4000 ]; then
    1.19  		#     reserved   +    fat*2      +      root dir  +   dirs
    1.20 -		count=$(( 1 + (($clusters*3+4095)/4096)*2 + 1     + $dclust ))
    1.21 +		count=$(((1 + (($clusters*3+1023)/1024)*2+3)/4+1  +  $dclust ))
    1.22  	else
    1.23  		#     reserved   +    fat*2      +      root dir  +   dirs
    1.24 -		count=$(( 1 + (($clusters+1023)/1024)*2  +  1     + $dclust ))
    1.25 +		count=$(((1 + (($clusters+255)/256)*2+3)/4 +  1  + $dclust ))
    1.26  	fi
    1.27  	dd if=/dev/zero bs=2k of=$basedir/boot/isolinux/efi.img count=$count
    1.28  }