# HG changeset patch # User Pascal Bellard # Date 1610140305 0 # Node ID 42a48dc164f3728d6c585e69443523216ff1bf55 # Parent c91b0729c39d022d861dc64800a2041112b55b6a linld: add iso support (again) diff -r c91b0729c39d -r 42a48dc164f3 syslinux/receipt --- a/syslinux/receipt Fri Jan 08 20:36:59 2021 +0000 +++ b/syslinux/receipt Fri Jan 08 21:11:45 2021 +0000 @@ -43,6 +43,7 @@ $i > kbd/$(basename $i .map.gz) done cp -a $stuff/iso2exe . + cp $LINLD/*/linld.com iso2exe make -C iso2exe } diff -r c91b0729c39d -r 42a48dc164f3 syslinux/stuff/iso2exe/Makefile --- a/syslinux/stuff/iso2exe/Makefile Fri Jan 08 20:36:59 2021 +0000 +++ b/syslinux/stuff/iso2exe/Makefile Fri Jan 08 21:11:45 2021 +0000 @@ -13,10 +13,10 @@ objcopy -O binary meminfo.o meminfo.exe chmod +x $@ -iso2exe: iso2exe.sh boot.com bootiso.bin win32.exe +iso2exe: iso2exe.sh bootiso.bin win32.exe cp iso2exe.sh $@ chmod +x $@ - ./$@ --build boot.com bootiso.bin win32.exe init + ./$@ --build bootiso.bin win32.exe init isohybrid.res: isohybrid.rc isohybrid.ico i586-pc-mingw32-windres $< -O coff -o $@ @@ -35,8 +35,8 @@ ./iso2exe.sh --exe mvcom.bin iso2exe.com iso2exe.exe > $@ chmod +x $@ -tazboot.exe: boot.com - com2exe $< > $@ +tazboot.exe: taziso.built linld.com + ./mktazboot linld.com $@ chmod +x $@ win32.res: win32.rc win32.ico diff -r c91b0729c39d -r 42a48dc164f3 syslinux/stuff/iso2exe/mktazboot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/syslinux/stuff/iso2exe/mktazboot Fri Jan 08 21:11:45 2021 +0000 @@ -0,0 +1,16 @@ +#!/bin/sh + +words2bin() +{ + for i in $@ ; do + printf '\\\\x%02X\\\\x%02X' $(($i&255)) $((($i>>8)&255)) + done | xargs echo -en +} + +S=$(($(stat -c %s $1)+12)) +P=$((($S+511)/512)) +E=$((4096-(32*$P))) +words2bin 0x5A4D $(($S%512)) $P 0 2 $E -1 -16 \ + -2 0 256 -16 28 0x6C53 0x5469 0x7A61 > $2 +dd if=$1 bs=1 count=$(($(stat -c %s $1)-1)) >> $2 2> /dev/null +echo -en '@tazboot.cmd\0' >> $2