git: 9front

Download patch

ref: 0ab83df844a2c9dd23d02b145667ed7dcf84378b
parent: 9eadc90c497ef090ffa427c6da6a020bbe87d962
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Oct 30 23:15:15 EDT 2014

efi: add test targets for iso and fat (for documentation only)

--- a/sys/src/boot/efi/mkfile
+++ b/sys/src/boot/efi/mkfile
@@ -10,9 +10,6 @@
 	cp bootia32.efi /386
 	cp bootx64.efi /386
 
-clean:V:
-	rm -f *.[68] *.out $TARG
-
 bootia32.efi:	pe32.8 efi.8 fs.8 pxe.8 sub.8
 	8l -l -H3 -T$IMAGEBASE -o $target $prereq
 
@@ -54,3 +51,27 @@
 	6c $CFLAGS sub.c
 
 %.6:	$HFILES
+
+
+test.fat:D:	bootia32.efi bootx64.efi
+	s = $target.$pid
+	rm -f /srv/$s $target
+	dd -if /dev/zero -of $target -bs 65536 -count 256
+	disk/format -xd -t hard $target
+	dossrv -f $target $s
+	mount -c /srv/$s /n/esp
+	mkdir /n/esp/efi
+	mkdir /n/esp/efi/boot
+	cp bootia32.efi /n/esp/efi/boot
+	cp bootx64.efi /n/esp/efi/boot
+	cp /386/9pcf /n/esp
+	echo 'bootfile=9pcf' >/n/esp/plan9.ini
+	unmount /n/esp
+	rm /srv/$s
+
+test.iso:D:	test.fat
+	disk/mk9660 -E test.fat -p <{echo test.fat} -s . $target
+
+
+clean:V:
+	rm -f *.[68] *.out $TARG test.* 
--