wok-next rev 21096

Update SliTaz syslinuxes
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Jan 01 13:15:54 2019 +0200 (2019-01-01)
parents ac50637642b7
children 27d8c72c641f
files syslinux-slitaz-extra-repack/receipt syslinux-slitaz-repack/receipt syslinux/receipt syslinux/stuff/iso2exe/iso2exe.sh syslinux/stuff/iso2exe/taziso syslinux/stuff/isolinux.cfg syslinux/stuff/patches/fixes-4.07.u syslinux/stuff/patches/lzop-1.03-gcc6.u syslinux/stuff/patches/series syslinux/stuff/slitaz-next/miniacc.h syslinux/stuff/tools/isohybrid.sh
line diff
     1.1 --- a/syslinux-slitaz-extra-repack/receipt	Tue Jan 01 04:17:55 2019 +0200
     1.2 +++ b/syslinux-slitaz-extra-repack/receipt	Tue Jan 01 13:15:54 2019 +0200
     1.3 @@ -1,26 +1,25 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="syslinux-slitaz-extra-repack"
     1.7 -VERSION="4.06"
     1.8 +# check the timestamps on the cooker page http://cook.slitaz.org/index.cgi?pkg=syslinux-extra
     1.9 +VERSION="181231-1226" # YYmmdd-HHMM
    1.10  CATEGORY="base-system"
    1.11  SHORT_DESC="MBR/FAT/EXT3/PXE bootloader: SliTaz fork, repacked from SliTaz-5"
    1.12  MAINTAINER="al.bobylev@gmail.com"
    1.13  LICENSE="GPL2"
    1.14 -WEB_SITE="http://hg.slitaz.org/wok/file/tip/syslinux"
    1.15 +WEB_SITE="http://cook.slitaz.org/index.cgi?pkg=syslinux-extra"
    1.16 +HOST_ARCH="i486"
    1.17  REPOLOGY="-"
    1.18  
    1.19 -TARBALL="syslinux-slitaz-extra-4.06.cpio"
    1.20 -WGET_URL="http://mirror1.slitaz.org/packages/5.0/syslinux-extra-4.06.tazpkg"
    1.21 +TARBALL="syslinux-slitaz-extra-$VERSION.cpio" # allow changes for source tarball
    1.22 +WGET_URL="http://cook.slitaz.org/index.cgi?download=syslinux-extra-4.06.tazpkg"  # this URL is always the same
    1.23 +
    1.24 +DEPENDS="syslinux-slitaz-repack posixovl"
    1.25 +PROVIDE="syslinux-extra"
    1.26  
    1.27  compile_rules() {
    1.28 -	cpio -dmF $src/$TARBALL -i
    1.29 -	lzma d $src/fs.cpio.lzma -so | cpio -idm
    1.30 +	cpio -dmF $TARBALL -i
    1.31 +	lzma -d fs.cpio.lzma -c | cpio -idm
    1.32  	mkdir $install
    1.33 -	cp -r $src/fs/* $install
    1.34 +	cp -r fs/* $install
    1.35  }
    1.36 -
    1.37 -genpkg_rules() {
    1.38 -	copy @std
    1.39 -	DEPENDS="syslinux-slitaz-repack posixovl"
    1.40 -	PROVIDE="syslinux-extra"
    1.41 -}
     2.1 --- a/syslinux-slitaz-repack/receipt	Tue Jan 01 04:17:55 2019 +0200
     2.2 +++ b/syslinux-slitaz-repack/receipt	Tue Jan 01 13:15:54 2019 +0200
     2.3 @@ -1,40 +1,37 @@
     2.4  # SliTaz package receipt.
     2.5  
     2.6  PACKAGE="syslinux-slitaz-repack"
     2.7 -VERSION="4.06"
     2.8 +# check the timestamps on the cooker page http://cook.slitaz.org/index.cgi?pkg=syslinux
     2.9 +VERSION="181231-1226" # YYmmdd-HHMM
    2.10  CATEGORY="base-system"
    2.11  SHORT_DESC="LiveCD ISO bootloader: SliTaz fork, repacked from SliTaz-5"
    2.12  MAINTAINER="al.bobylev@gmail.com"
    2.13  LICENSE="GPL2"
    2.14 -WEB_SITE="http://hg.slitaz.org/wok/file/tip/syslinux"
    2.15 +WEB_SITE="http://cook.slitaz.org/index.cgi?pkg=syslinux"
    2.16 +HOST_ARCH="any"
    2.17  REPOLOGY="-"
    2.18  
    2.19 -TARBALL="syslinux-slitaz-4.06.cpio"
    2.20 -WGET_URL="http://mirror1.slitaz.org/packages/5.0/syslinux-4.06.tazpkg"
    2.21 +TARBALL="syslinux-slitaz-$VERSION.cpio" # allow changes for source tarball
    2.22 +WGET_URL="http://cook.slitaz.org/index.cgi?download=syslinux-4.06.tazpkg" # this URL is always the same
    2.23  
    2.24 -COOKOPTS="force-arch" # different boot/
    2.25 +CONFIG_FILES="/boot/isolinux/i18n.cfg /boot/isolinux/isolinux.cfg \
    2.26 +/boot/isolinux/kbd"
    2.27 +TAGS="boot"
    2.28 +DEPENDS="ipxe memtest"
    2.29 +PROVIDE="syslinux"
    2.30  
    2.31  compile_rules() {
    2.32 -	cpio -dmF $src/$TARBALL -i
    2.33 -	lzma d $src/fs.cpio.lzma -so | cpio -idm
    2.34 +	cpio -dmF $TARBALL -i
    2.35 +	lzma -d fs.cpio.lzma -c | cpio -idm
    2.36  	mkdir $install
    2.37 -	cp -r $src/fs/* $install
    2.38 +	cp -r fs/* $install
    2.39  	sed -i 's|5\.0-RC4|Next|; s|\.jpg|\.png|; s|autologin|font=ter-v14n &|' \
    2.40  		$install/boot/isolinux/isolinux.cfg
    2.41  }
    2.42  
    2.43 -genpkg_rules() {
    2.44 -	copy @std
    2.45 -	CONFIG_FILES="/boot/isolinux/i18n.cfg /boot/isolinux/isolinux.cfg \
    2.46 -	/boot/isolinux/kbd"
    2.47 -	TAGS="boot"
    2.48 -	DEPENDS="ipxe memtest"
    2.49 -	PROVIDE="syslinux"
    2.50 -}
    2.51 -
    2.52  post_install() {
    2.53  	sed -i "/MENU TITLE SliTaz GNU\/Linux/ s| [0-9X]*$| $(date +%Y%m%d)|" \
    2.54  		"$1/boot/isolinux/isolinux.cfg"
    2.55 -	sed '/MENU TITLE/!d;s/MENU TITLE //' > $1/etc/slitaz-version \
    2.56 +	sed '/MENU TITLE/!d; s|MENU TITLE ||' > $1/etc/slitaz-version \
    2.57  		< "$1/boot/isolinux/isolinux.cfg"
    2.58  }
     3.1 --- a/syslinux/receipt	Tue Jan 01 04:17:55 2019 +0200
     3.2 +++ b/syslinux/receipt	Tue Jan 01 13:15:54 2019 +0200
     3.3 @@ -4,7 +4,7 @@
     3.4  VERSION="4.06"
     3.5  CATEGORY="base-system"
     3.6  SHORT_DESC="LiveCD ISO bootloader (isolinux)"
     3.7 -MAINTAINER="devel@slitaz.org"
     3.8 +MAINTAINER="pascal.bellard@slitaz.org"
     3.9  LICENSE="GPL2"
    3.10  WEB_SITE="https://www.syslinux.org/wiki/index.php?title=The_Syslinux_Project"
    3.11  
    3.12 @@ -15,7 +15,7 @@
    3.13  util-linux-uuid-dev advancecomp libidn linld python"
    3.14  SPLIT="$PACKAGE-extra $PACKAGE-modules $PACKAGE-tools"
    3.15  
    3.16 -COOKOPTS="skip-log-errors force-arch" # different files in boot/
    3.17 +COOKOPTS="skip-log-errors"
    3.18  LINLD="$WOK/linld/source"
    3.19  
    3.20  compile_rules() {
     4.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh	Tue Jan 01 04:17:55 2019 +0200
     4.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh	Tue Jan 01 13:15:54 2019 +0200
     4.3 @@ -116,10 +116,10 @@
     4.4  		ddq if=/tmp/exe$$ bs=1 count=3 skip=$((0x7C00)) of=$1 seek=$i conv=notrunc
     4.5  	fi
     4.6  	rm -f /tmp/exe$$ /tmp/coff$$
     4.7 -	if [ -z "$RECURSIVE_PARTITION" -a $(get 470 $1 4) -eq 0 ]; then
     4.8 -		store 464 $((1+$i/512)) $1 8
     4.9 -		store 470 $(($i/512)) $1 8
    4.10 -		store 474 $(($(get 474 $1 4) - $i/512)) $1 32
    4.11 +	if [ -z "$RECURSIVE_PARTITION" -a $(get 454 $1 4) -eq 0 ]; then
    4.12 +		store 448 $((1+$i/512)) $1 8
    4.13 +		store 454 $(($i/512)) $1 8
    4.14 +		store 458 $(($(get 458 $1 4) - $i/512)) $1 32
    4.15  	fi
    4.16  }
    4.17  
    4.18 @@ -204,19 +204,19 @@
    4.19  			printf " $i:%08X  %08X  %02X\n" $OFFSET $SIZE \
    4.20  				$(get $((446+4+16*i)) "$1" 1)
    4.21  		done
    4.22 -		if [ $(get 466 "$1") -eq 65263 ]; then
    4.23 +		if [ $(get 450 "$1") -eq 65262 ]; then
    4.24  			echo "EFI partitions :"
    4.25 -			n=$(get 584 "$1" 1)
    4.26 +			n=$(get 592 "$1")
    4.27  			s=$(get 596 "$1")
    4.28 -			o=$((($(get 552 "$1" 1)*512)-($(get 592 "$1")*$s)))
    4.29 +			o=$(($(get 584 "$1")*512))
    4.30  			i=0
    4.31 -			while [ $n -gt $i ]; do
    4.32 +			while [ $i -lt $n ]; do
    4.33  				f=$(get $(($o+0x20)) "$1" 4)
    4.34  				l=$(($(get $(($o+0x28)) "$1" 4)-$f))
    4.35  				[ $l -eq 0 ] && break
    4.36  				printf " $i:%08X  %08X  %s\n" $f $(($l+1)) \
    4.37 -				"$(od -An -N 36 -w -j $(($o+0x38)) -t a "$1" \
    4.38 -				 | sed 's/\( nul\)*//g;s/   //g;s/ sp//')"
    4.39 +				"$(od -An -N 72 -w72 -j $(($o+0x38)) -t a "$1" \
    4.40 +				 | sed 's/ nul//g;s/   //g;s/ sp//g')"
    4.41  				o=$(($o+$s))
    4.42  				i=$(($i+1))
    4.43  			done
    4.44 @@ -552,7 +552,7 @@
    4.45  	0)	[ -x /usr/bin/isohybrid ] && isohybrid -entry 2 $1;;
    4.46  	esac
    4.47  
    4.48 -	gpt= ; [ $(get 466 $1) -eq 65263 ] && gpt=1
    4.49 +	gpt= ; [ $(get 450 $1) -eq 65262 ] && gpt=1
    4.50  	mac= ; [ $(get 2048 $1) -eq 19792 ] && mac=1
    4.51  	echo "Read hybrid & tazlito data..."
    4.52  	if [ -n "$gpt" ]; then
     5.1 --- a/syslinux/stuff/iso2exe/taziso	Tue Jan 01 04:17:55 2019 +0200
     5.2 +++ b/syslinux/stuff/iso2exe/taziso	Tue Jan 01 13:15:54 2019 +0200
     5.3 @@ -234,7 +234,7 @@
     5.4  		extraargs="mount=$(getuuid) subroot=slitaz"
     5.5  	fi
     5.6  	echo -en "\nInstall boot files..."
     5.7 -	for i in $media/boot/bzImage $media/boot/*pxe* \
     5.8 +	for i in $media/boot/bzImage* $media/boot/*pxe* \
     5.9  		$media/boot/isolinux/he* $media/boot/isolinux/opt* \
    5.10  		$media/README $media/boot/memtest* ; do
    5.11  		[ -s $i ] && cp $i $mnt/slitaz/boot
    5.12 @@ -243,7 +243,8 @@
    5.13  		[ $(get 0 $i 2> /dev/null || echo 0) -eq 23117 ] &&
    5.14  		mv $i $i.exe
    5.15  	done
    5.16 -	gettazboot $mnt/slitaz/boot/tazboot.exe
    5.17 +	bzimage=$(cd $mnt/slitaz/boot ; ls bzimage*)
    5.18 +	gettazboot $mnt/slitaz/boot/tazboot.exe	# autoappend 64 suffix
    5.19  	unix2dos > $mnt/slitaz/boot/tazboot.cmd <<EOT
    5.20  kernel=/slitaz/boot/bzimage
    5.21  initrd=/slitaz/boot/$initrd
    5.22 @@ -283,11 +284,11 @@
    5.23  		grub-install --no-floppy --root-directory=$mnt $base
    5.24  	fi
    5.25  	if [ -s $mnt/boot/grub/menu.lst ] &&
    5.26 -	   ! grep -q /slitaz/boot/bzimage $mnt/boot/grub/menu.lst; then
    5.27 -		echo -en "\nUpdate /boot/grub/menu/lst..."
    5.28 +	   ! grep -q /slitaz/boot/$bzimage $mnt/boot/grub/menu.lst; then
    5.29 +		echo -en "\nUpdate /boot/grub/menu.lst..."
    5.30  		cat >> $mnt/boot/grub/menu.lst <<EOT
    5.31  title SliTaz GNU/Linux $(cat $mnt/slitaz/etc/slitaz-release)
    5.32 -	kernel /slitaz/boot/bzimage rw root=/dev/null $extraargs autologin
    5.33 +	kernel /slitaz/boot/$bzimage rw root=/dev/null $extraargs autologin
    5.34  	initrd /slitaz/boot/$initrd
    5.35  
    5.36  EOT
    5.37 @@ -1311,6 +1312,20 @@
    5.38  	isoinfo -d -i "$ISO" > /tmp/isoinfo$$
    5.39  	if [ -x "$(which iso2exe)" ]; then
    5.40  		echo "----"
    5.41 +		blkid "$ISO" | while read args; do
    5.42 +			set -- $args
    5.43 +			while [ -n "$2" ]; do
    5.44 +				case "$2" in
    5.45 +				*UUID*|PT*) echo $2;;
    5.46 +				esac
    5.47 +				shift
    5.48 +			done
    5.49 +		done
    5.50 +		if ! fdisk -l "$ISO" | grep -q 'valid partition'; then
    5.51 +			fdisk -l "$ISO" | grep heads
    5.52 +			fdisk -l "$ISO" | sed 's/^ *[^ ]* *//;s/  */ /g;$!d'
    5.53 +		fi
    5.54 +		echo "----"
    5.55  		iso2exe -l "$ISO"
    5.56  	fi >> /tmp/isoinfo$$
    5.57  	if [ "$1" ]; then
    5.58 @@ -1335,6 +1350,7 @@
    5.59  	exit
    5.60  fi
    5.61  ISO="${1:-/dev/null}"
    5.62 +[ ${ISO:0:1} != "/" ] && ISO=$(cd $(dirname $ISO); echo $PWD/$(basename $ISO))
    5.63  [ -z "$(isiso 2> /dev/null)" ] && echo "Usage : $0 file.iso" && exit 1
    5.64  media=/tmp/media$$
    5.65  mkdir -p $media
     6.1 --- a/syslinux/stuff/isolinux.cfg	Tue Jan 01 04:17:55 2019 +0200
     6.2 +++ b/syslinux/stuff/isolinux.cfg	Tue Jan 01 13:15:54 2019 +0200
     6.3 @@ -33,10 +33,6 @@
     6.4  
     6.5  INCLUDE i18n.cfg
     6.6  
     6.7 -LABEL memtest mem ram
     6.8 -	MENU LABEL Check memory
     6.9 -	KERNEL /boot/memtest
    6.10 -
    6.11  LABEL md5sum check test verify
    6.12  	MENU LABEL Check media
    6.13  	COM32 c32box.c32
    6.14 @@ -46,10 +42,6 @@
    6.15  	MENU LABEL Command Line
    6.16  	MENU QUIT
    6.17  	
    6.18 -LABEL web zeb
    6.19 -	MENU LABEL Web Boot
    6.20 -	KERNEL /boot/ipxe
    6.21 -
    6.22  LABEL reboot
    6.23  	MENU LABEL Reboot System
    6.24  	COM32 c32box.c32
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/syslinux/stuff/patches/fixes-4.07.u	Tue Jan 01 13:15:54 2019 +0200
     7.3 @@ -0,0 +1,63 @@
     7.4 +--- mbr/isohdpfx.S
     7.5 ++++ mbr/isohdpfx.S
     7.6 +@@ -167,20 +167,22 @@
     7.7 + 	   read_sector_cbios: movb $0x42, %ah ;  jmp read_common */
     7.8 + 	movl	$0xeb42b4+((read_common-read_sector_cbios-4) << 24), \
     7.9 + 		(read_sector_cbios)
    7.10 +-	jmp	1f
    7.11 ++	jmp	2f
    7.12 + 1:
    7.13 ++	xor	%cx, %cx	/* Clear EBIOS flag. */
    7.14 ++2:
    7.15 + 	popw	%dx
    7.16 + 	pushw	%cx		/* EBIOS flag */
    7.17 + 
    7.18 + 	/* Get (C)HS geometry */
    7.19 + 	movb	$0x08, %ah
    7.20 + 	int	$0x13
    7.21 +-	andw	$0x3f, %cx	/* Sector count */
    7.22 + 	popw	%bx		/* EBIOS flag */
    7.23 +-	pushw	%cx		/* -16: Save sectors on the stack */
    7.24 + 	movzbw	%dh, %ax	/* dh = max head */
    7.25 + 	incw	%ax		/* From 0-based max to count */
    7.26 +-	pushw	%ax		/* -18: Save heads on the stack */
    7.27 ++	pushw	%ax		/* -16: Save heads on the stack */
    7.28 ++	andw	$0x3f, %cx	/* Sector count */
    7.29 ++	pushw	%cx		/* -18: Save sectors on the stack */
    7.30 + 	mulw	%cx		/* Heads*sectors -> sectors per cylinder */
    7.31 + 
    7.32 + 	pushw	%bx		/* -20: EBIOS flag */
    7.33 +--- extlinux/main.c
    7.34 ++++ extlinux/main.c
    7.35 +@@ -1236,9 +1236,7 @@
    7.36 +     if (devfd < 0)
    7.37 + 	return 1;
    7.38 + 
    7.39 +-    if (opt.reset_adv)
    7.40 +-	syslinux_reset_adv(syslinux_adv);
    7.41 +-    else if (ext_read_adv(path, devfd, &filename) < 0) {
    7.42 ++    if (ext_read_adv(path, devfd, &filename) < 0) {
    7.43 + 	close(devfd);
    7.44 + 	return 1;
    7.45 +     }
    7.46 +--- core/isolinux.asm
    7.47 ++++ core/isolinux.asm
    7.48 +@@ -426,14 +426,17 @@
    7.49 + .ok:
    7.50 + 		xor bx,bx
    7.51 + 		push bp
    7.52 ++		push eax
    7.53 + 		call getlinsec
    7.54 ++		pop eax
    7.55 + 		pop cx
    7.56 +-		mov dx,cx
    7.57 ++		movzx edx,cx
    7.58 + 		pop bp
    7.59 + 		pop bx
    7.60 + 
    7.61 + 		shl cx,SECTOR_SHIFT - 4
    7.62 + 		add bx,cx
    7.63 ++		add eax,edx
    7.64 + 		sub bp,dx
    7.65 + 		jnz .more
    7.66 + 
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/syslinux/stuff/patches/lzop-1.03-gcc6.u	Tue Jan 01 13:15:54 2019 +0200
     8.3 @@ -0,0 +1,37 @@
     8.4 +gcc-6 has additional errors e.g.
     8.5 +
     8.6 +./test.c:1:12: error: variably modified '__acc_cta' at file scope
     8.7 + extern int __acc_cta[1-2*!((1l << (8*8 -1)) < 0)];
     8.8 +            ^~~~~~~~~
     8.9 +
    8.10 +This is rightly pointed out since that index is undefined
    8.11 +
    8.12 +Signed-off-by: Khem Raj <raj.khem@gmail.com>
    8.13 +Upstream-Status: Pending
    8.14 +
    8.15 +--- lzo/src/miniacc.h	2016-02-10 16:09:23.247315866 +0100
    8.16 ++++ lzo/src/miniacc.h	2016-02-10 16:12:14.973297054 +0100
    8.17 +@@ -4412,12 +4412,12 @@
    8.18 + #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
    8.19 + #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
    8.20 + #else
    8.21 +-    ACCCHK_ASSERT((1   << (8*SIZEOF_INT-1)) < 0)
    8.22 ++    ACCCHK_ASSERT((int)(1u   << (8*SIZEOF_INT-1)) < 0)
    8.23 + #endif
    8.24 +     ACCCHK_ASSERT((1u  << (8*SIZEOF_INT-1)) > 0)
    8.25 + #if 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
    8.26 + #else
    8.27 +-    ACCCHK_ASSERT((1l  << (8*SIZEOF_LONG-1)) < 0)
    8.28 ++    ACCCHK_ASSERT((long)(1ul  << (8*SIZEOF_LONG-1)) < 0)
    8.29 + #endif
    8.30 +     ACCCHK_ASSERT((1ul << (8*SIZEOF_LONG-1)) > 0)
    8.31 + #if defined(acc_int16e_t)
    8.32 +@@ -4646,7 +4646,7 @@
    8.33 + #elif 1 && (ACC_CC_LCC || ACC_CC_LCCWIN32) && !defined(ACCCHK_CFG_PEDANTIC)
    8.34 + #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
    8.35 + #elif !defined(ACC_BROKEN_INTEGRAL_PROMOTION) && (SIZEOF_INT > 1)
    8.36 +-    ACCCHK_ASSERT( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
    8.37 ++    ACCCHK_ASSERT( (int)((unsigned int)((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
    8.38 + #endif
    8.39 + #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560))
    8.40 + #  pragma option pop
     9.1 --- a/syslinux/stuff/patches/series	Tue Jan 01 04:17:55 2019 +0200
     9.2 +++ b/syslinux/stuff/patches/series	Tue Jan 01 13:15:54 2019 +0200
     9.3 @@ -2,3 +2,5 @@
     9.4  -p0|iso9660.u
     9.5  -p0|readconfig.u
     9.6  -p0|keytab-lilo.u
     9.7 +-p0|lzop-1.03-gcc6.u
     9.8 +-p0|fixes-4.07.u
    10.1 --- a/syslinux/stuff/slitaz-next/miniacc.h	Tue Jan 01 04:17:55 2019 +0200
    10.2 +++ b/syslinux/stuff/slitaz-next/miniacc.h	Tue Jan 01 13:15:54 2019 +0200
    10.3 @@ -2,7 +2,7 @@
    10.4  
    10.5     This file is part of the UPX executable compressor.
    10.6  
    10.7 -   Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
    10.8 +   Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
    10.9     All Rights Reserved.
   10.10  
   10.11     UPX and the UCL library are free software; you can redistribute them
   10.12 @@ -27,7 +27,7 @@
   10.13  
   10.14  #ifndef __ACC_H_INCLUDED
   10.15  #define __ACC_H_INCLUDED 1
   10.16 -#define ACC_VERSION     20170125L
   10.17 +#define ACC_VERSION     20170301L
   10.18  #if defined(__CYGWIN32__) && !defined(__CYGWIN__)
   10.19  #  define __CYGWIN__ __CYGWIN32__
   10.20  #endif
   10.21 @@ -639,6 +639,12 @@
   10.22  #  define ACC_CC_ARMCC          __ARMCC_VERSION
   10.23  #  define ACC_INFO_CC           "ARM C Compiler"
   10.24  #  define ACC_INFO_CCVER        __VERSION__
   10.25 +#elif defined(__clang__) && defined(__c2__) && defined(__c2_version__) && defined(_MSC_VER)
   10.26 +#  define ACC_CC_CLANG          (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0))
   10.27 +#  define ACC_CC_CLANG_C2       _MSC_VER
   10.28 +#  define ACC_CC_CLANG_VENDOR_MICROSOFT 1
   10.29 +#  define ACC_INFO_CC           "clang/c2"
   10.30 +#  define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__c2_version__)
   10.31  #elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__)
   10.32  #  if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__)
   10.33  #    define ACC_CC_CLANG        (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0))
   10.34 @@ -650,7 +656,13 @@
   10.35  #  elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
   10.36  #    define ACC_CC_CLANG_GNUC   (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
   10.37  #  endif
   10.38 -#  define ACC_INFO_CC           "clang"
   10.39 +#  if defined(__APPLE_CC__)
   10.40 +#    define ACC_CC_CLANG_VENDOR_APPLE 1
   10.41 +#    define ACC_INFO_CC         "clang/apple"
   10.42 +#  else
   10.43 +#    define ACC_CC_CLANG_VENDOR_LLVM 1
   10.44 +#    define ACC_INFO_CC         "clang"
   10.45 +#  endif
   10.46  #  if defined(__clang_version__)
   10.47  #    define ACC_INFO_CCVER      __clang_version__
   10.48  #  else
   10.49 @@ -971,6 +983,9 @@
   10.50  #elif defined(__powerpc64le__) || defined(__powerpc64le) || defined(__ppc64le__) || defined(__PPC64LE__)
   10.51  #  define ACC_ARCH_POWERPC          1
   10.52  #  define ACC_INFO_ARCH             "powerpc"
   10.53 +#elif defined(__riscv)
   10.54 +#  define ACC_ARCH_RISCV            1
   10.55 +#  define ACC_INFO_ARCH             "riscv"
   10.56  #elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x)
   10.57  #  define ACC_ARCH_S390             1
   10.58  #  define ACC_INFO_ARCH             "s390"
   10.59 @@ -1012,6 +1027,8 @@
   10.60  #      define ACC_ARCH_ARM_THUMB2   1
   10.61  #    elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4)
   10.62  #      define ACC_ARCH_ARM_THUMB2   1
   10.63 +#    elif 1 && defined(_MSC_VER) && defined(_M_THUMB) && ((_M_THUMB)+0 >= 7)
   10.64 +#      define ACC_ARCH_ARM_THUMB2   1
   10.65  #    endif
   10.66  #  endif
   10.67  #endif
   10.68 @@ -1223,7 +1240,7 @@
   10.69  #    error "unexpected configuration - check your compiler defines"
   10.70  #  endif
   10.71  #endif
   10.72 -#ifdef __cplusplus
   10.73 +#if defined(__cplusplus)
   10.74  extern "C" {
   10.75  #endif
   10.76  #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
   10.77 @@ -1246,7 +1263,7 @@
   10.78  #else
   10.79  #  error "FIXME - implement ACC_MM_AHSHIFT"
   10.80  #endif
   10.81 -#ifdef __cplusplus
   10.82 +#if defined(__cplusplus)
   10.83  }
   10.84  #endif
   10.85  #endif
   10.86 @@ -1945,6 +1962,7 @@
   10.87  #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800))
   10.88  #  define __acc_likely(e)       (__builtin_expect(!!(e),1))
   10.89  #  define __acc_unlikely(e)     (__builtin_expect(!!(e),0))
   10.90 +#elif (ACC_CC_CLANG && ACC_CC_CLANG_C2)
   10.91  #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
   10.92  #  define __acc_likely(e)       (__builtin_expect(!!(e),1))
   10.93  #  define __acc_unlikely(e)     (__builtin_expect(!!(e),0))
   10.94 @@ -2486,7 +2504,7 @@
   10.95  #  define ACC_ABI_BIG_ENDIAN        1
   10.96  #elif (ACC_ARCH_IA64) && (ACC_OS_POSIX_LINUX || ACC_OS_WIN64)
   10.97  #  define ACC_ABI_LITTLE_ENDIAN     1
   10.98 -#elif (ACC_ARCH_ALPHA || ACC_ARCH_AMD64 || ACC_ARCH_BLACKFIN || ACC_ARCH_CRIS || ACC_ARCH_I086 || ACC_ARCH_I386 || ACC_ARCH_MSP430)
   10.99 +#elif (ACC_ARCH_ALPHA || ACC_ARCH_AMD64 || ACC_ARCH_BLACKFIN || ACC_ARCH_CRIS || ACC_ARCH_I086 || ACC_ARCH_I386 || ACC_ARCH_MSP430 || ACC_ARCH_RISCV)
  10.100  #  define ACC_ABI_LITTLE_ENDIAN     1
  10.101  #elif (ACC_ARCH_AVR32 || ACC_ARCH_M68K || ACC_ARCH_S390 || ACC_ARCH_SPU)
  10.102  #  define ACC_ABI_BIG_ENDIAN        1
  10.103 @@ -2506,6 +2524,8 @@
  10.104  #  define ACC_ABI_BIG_ENDIAN        1
  10.105  #elif 1 && (ACC_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__)
  10.106  #  define ACC_ABI_LITTLE_ENDIAN     1
  10.107 +#elif 1 && (ACC_ARCH_ARM) && defined(_MSC_VER) && defined(_WIN32)
  10.108 +#  define ACC_ABI_LITTLE_ENDIAN     1
  10.109  #elif 1 && (ACC_ARCH_ARM && ACC_CC_ARMCC_ARMCC)
  10.110  #  if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN)
  10.111  #    error "unexpected configuration - check your compiler defines"
  10.112 @@ -2521,6 +2541,8 @@
  10.113  #  define ACC_ABI_BIG_ENDIAN        1
  10.114  #elif 1 && (ACC_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__)
  10.115  #  define ACC_ABI_LITTLE_ENDIAN     1
  10.116 +#elif 1 && (ACC_ARCH_ARM64) && defined(_MSC_VER) && defined(_WIN32)
  10.117 +#  define ACC_ABI_LITTLE_ENDIAN     1
  10.118  #elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
  10.119  #  define ACC_ABI_BIG_ENDIAN        1
  10.120  #elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
  10.121 @@ -2691,6 +2713,13 @@
  10.122  #    ifndef ACC_OPT_UNALIGNED32
  10.123  #    define ACC_OPT_UNALIGNED32             1
  10.124  #    endif
  10.125 +#  elif 1 && defined(_MSC_VER) && defined(_M_ARM) && ((_M_ARM)+0 >= 7)
  10.126 +#    ifndef ACC_OPT_UNALIGNED16
  10.127 +#    define ACC_OPT_UNALIGNED16             1
  10.128 +#    endif
  10.129 +#    ifndef ACC_OPT_UNALIGNED32
  10.130 +#    define ACC_OPT_UNALIGNED32             1
  10.131 +#    endif
  10.132  #  endif
  10.133  #elif (ACC_ARCH_ARM64)
  10.134  #  ifndef ACC_OPT_UNALIGNED16
  10.135 @@ -2749,6 +2778,19 @@
  10.136  #      endif
  10.137  #    endif
  10.138  #  endif
  10.139 +#elif (ACC_ARCH_RISCV)
  10.140 +#  define ACC_OPT_AVOID_UINT_INDEX          1
  10.141 +#  ifndef ACC_OPT_UNALIGNED16
  10.142 +#  define ACC_OPT_UNALIGNED16               1
  10.143 +#  endif
  10.144 +#  ifndef ACC_OPT_UNALIGNED32
  10.145 +#  define ACC_OPT_UNALIGNED32               1
  10.146 +#  endif
  10.147 +#  if (ACC_WORDSIZE == 8)
  10.148 +#    ifndef ACC_OPT_UNALIGNED64
  10.149 +#    define ACC_OPT_UNALIGNED64             1
  10.150 +#    endif
  10.151 +#  endif
  10.152  #elif (ACC_ARCH_S390)
  10.153  #  ifndef ACC_OPT_UNALIGNED16
  10.154  #  define ACC_OPT_UNALIGNED16               1
  10.155 @@ -3418,7 +3460,7 @@
  10.156  #  undef HAVE_UTIME_H
  10.157  #  undef HAVE_SYS_TIME_H
  10.158  #  define HAVE_SYS_UTIME_H 1
  10.159 -#elif (ACC_CC_CLANG_MSC || ACC_CC_GHS || ACC_CC_INTELC_MSC || ACC_CC_MSC)
  10.160 +#elif (ACC_CC_CLANG_C2 || ACC_CC_CLANG_MSC || ACC_CC_GHS || ACC_CC_INTELC_MSC || ACC_CC_MSC)
  10.161  #  undef HAVE_DIRENT_H
  10.162  #  undef HAVE_UNISTD_H
  10.163  #  undef HAVE_UTIME_H
  10.164 @@ -3721,7 +3763,7 @@
  10.165  #  endif
  10.166  #elif (ACC_CC_LCCWIN32)
  10.167  #  define utime _utime
  10.168 -#elif (ACC_CC_MSC)
  10.169 +#elif (ACC_CC_CLANG_C2 || ACC_CC_MSC)
  10.170  #  if (_MSC_VER < 600)
  10.171  #    undef HAVE_STRFTIME
  10.172  #  endif
  10.173 @@ -3921,8 +3963,6 @@
  10.174  #endif
  10.175  #if (ACC_BROKEN_CDECL_ALT_SYNTAX)
  10.176  typedef void __acc_cdecl_sighandler (*acc_sighandler_t)(acc_signo_t);
  10.177 -#elif defined(RETSIGTYPE)
  10.178 -typedef RETSIGTYPE (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
  10.179  #else
  10.180  typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
  10.181  #endif
  10.182 @@ -4542,8 +4582,6 @@
  10.183  #endif
  10.184  #if (ACC_BROKEN_CDECL_ALT_SYNTAX)
  10.185  typedef void __acc_cdecl_sighandler (*acc_sighandler_t)(acc_signo_t);
  10.186 -#elif defined(RETSIGTYPE)
  10.187 -typedef RETSIGTYPE (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
  10.188  #else
  10.189  typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
  10.190  #endif
  10.191 @@ -4834,7 +4872,7 @@
  10.192  #if (HAVE_SIGNAL_H)
  10.193  #  include <signal.h>
  10.194  #endif
  10.195 -#if (TIME_WITH_SYS_TIME)
  10.196 +#if (HAVE_SYS_TIME_H && HAVE_TIME_H)
  10.197  #  include <sys/time.h>
  10.198  #  include <time.h>
  10.199  #elif (HAVE_TIME_H)
    11.1 --- a/syslinux/stuff/tools/isohybrid.sh	Tue Jan 01 04:17:55 2019 +0200
    11.2 +++ b/syslinux/stuff/tools/isohybrid.sh	Tue Jan 01 13:15:54 2019 +0200
    11.3 @@ -187,44 +187,48 @@
    11.4  	store32 440 $id
    11.5  	store32 508 0xAA550000
    11.6  	e=$(( ((${entry:-1} -1) % 4) *16 +446))
    11.7 -	store32 $e 0x10080
    11.8  	esect=$(( ($sectors + ((($cylinders -1) & 0x300) >>2)) <<16))
    11.9  	ecyl=$(( (($cylinders -1) & 0xff) <<24))
   11.10 -	store32 $(($e + 4)) $(($partype + (($heads - 1) <<8) +$esect +$ecyl))
   11.11 -	store32 $(($e + 8)) $offset
   11.12 -	store32 $(($e + 12)) $(($cylinders * $heads * $sectors))
   11.13 -	if [ -n "$efi_ofs" ]; then
   11.14 +	epart=$(((($heads - 1) <<8) +$esect +$ecyl))
   11.15 +	sectorcount=$(($cylinders * $heads * $sectors))
   11.16 +	lastlba=$(($sectorcount -1))
   11.17 +	if [ -z "$efi_ofs" ]; then
   11.18 +		store32 $e 0x10080
   11.19 +		store32 $(($e + 4)) $(($partype + $epart))
   11.20 +		store32 $(($e + 8)) $offset
   11.21 +		store32 $(($e + 12)) $sectorcount
   11.22 +	else
   11.23  		[ $(read16 0 1024) -eq 35615 -a $(read16 11 0) -ne 35615 ] &&
   11.24  		ddq bs=512 conv=notrunc skip=2 seek=44 count=20 if=$iso of=$iso
   11.25 -		store32 $((446+16)) $((0xFFFFFE00))
   11.26 -		store32 $((446+16+4)) $((0xFFFFFEEF))
   11.27 -		store32 $((446+16+8)) $efi_ofs
   11.28 -		store32 $((446+16+12)) $efi_len
   11.29 +		store32 $((446)) $((0x10000))
   11.30 +		store32 $((446+4)) $((0xFFFFFEEE))
   11.31 +		store32 $((446+8)) 1
   11.32 +		store32 $((446+12)) $lastlba
   11.33  		uudecode <<EOT | unlzma | ddq bs=512 seek=1 of=$iso conv=notrunc
   11.34  begin-base64 644 -
   11.35 -XQAAgAD//////////wAikYVN1N2VY3JXMnUMJn1RCdQOHN33EegtIBhrUQ7Q
   11.36 -JNaW37NYVuUAmqtISPiCdgAxPRlBS0xDlmAPPOCSZXmEFz9jEkXSzmsGn6+o
   11.37 -7SMAKMfvpMa3U1bJv/napT+/NFttJSJSx0xJA3em3KJcZsO66vaYeJC5tE+3
   11.38 -T0p9AJtSH6X8SMic3vU3hYWwHsYnsmeoGmsy4EJba9Wf/0liMQA=
   11.39 +XQAAgAD//////////wAikYVN1N2VY3JXMnUMJn1TblyFehfeJH+D4/XPYFjO
   11.40 +OzQluqM2w0L9b1dJMfZHJbnNnBFhYprW0PWPY1UOgQJkhF/W2Z0lXvaSrZ7t
   11.41 +yEtpmE3Go6qt6FetOfWNMJZhtBdE0TjxFZCvh5z8hy/kRQb1XOkLxeb5VHT3
   11.42 +H4JI5S76wY0TueXYsBOJwlwW9fZ8IXP72cDO3JArS4ZhUGxbOOF2oDuf/hFM
   11.43 +zQ==
   11.44  ====
   11.45  EOT
   11.46 -		lastlba=$((($cylinders * $heads * $sectors) -1))
   11.47 +		lastlba=$(($sectorcount -1))
   11.48  		usablelba=34
   11.49  		store32 $((0x218)) 1
   11.50  		store32 $((0x220)) $lastlba
   11.51  		store32 $((0x228)) $usablelba
   11.52  		store32 $((0x230)) $(($lastlba-$usablelba+1))
   11.53 -		store32 $((0x428)) $(($lastlba-0x800))
   11.54 -		store32 $((0x4A0)) $efi_ofs
   11.55 -		store32 $((0x4A8)) $(($efi_ofs+$efi_len-1))
   11.56 -		store32 $((0x258)) $(crc32 0x400 0x4000)
   11.57 -		store32 $((0x210)) $(crc32 0x200 $(read32 0 $((0x20C))))
   11.58 +		store32 $((0x420)) $efi_ofs
   11.59 +		store32 $((0x428)) $(($efi_ofs+$efi_len-1))
   11.60  		store32sw $((0x1008)) $(($efi_ofs/4))
   11.61  		store32sw $((0x1054)) $(($efi_len/4))
   11.62  		for i in 238 410 490 ; do
   11.63  			ddq if=/dev/urandom count=16 bs=1 conv=notrunc \
   11.64  			    of=$iso seek=$((0x$i))
   11.65  		done
   11.66 +		store32 $((0x258)) $(crc32 0x400 $((128*$(read32 0 $((0x250))))))
   11.67 +		store32 $((0x210)) $(crc32 0x200 $(read32 0 $((0x20C))))
   11.68  	fi
   11.69  }
   11.70  
   11.71 @@ -241,10 +245,12 @@
   11.72  	abort "invalid boot catalog."
   11.73  efi_ofs=
   11.74  if [ $(read8 $cat 65) -eq 239 ]; then
   11.75 -	[ -n "$entry" ] && echo "$iso: efi boot ignore --entry $entry" && entry=
   11.76 +	[ ${entry:-1} != 1 ] && echo "$iso: efi boot ignore --entry $entry"
   11.77 +	entry=1
   11.78  	partype=0
   11.79 -	efi_len=$(read16 $cat 102)
   11.80  	efi_ofs=$((4*$(read32 $cat 104)))
   11.81 +	efi_len=$(($(read16 $(($efi_ofs/4)) 19)))
   11.82 +	[ $efi_len -eq 0 ] && efi_len=$(($(read32 $(($efi_ofs/4)) 32)))
   11.83  fi
   11.84  lba=$(read32 $cat 40)
   11.85  [ $(read32 $lba 64) -eq 1886961915 ] ||