From 225b573624549303609411ab87a6e923964a50c1 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 19 May 2016 18:48:06 +0200 Subject: 9boot: add iso hybrid loader 9boothyb --- sys/src/boot/pc/iso.c | 19 +++++++++++++++++++ sys/src/boot/pc/mkfile | 28 +++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/sys/src/boot/pc/iso.c b/sys/src/boot/pc/iso.c index 48caadc69..e6a483902 100644 --- a/sys/src/boot/pc/iso.c +++ b/sys/src/boot/pc/iso.c @@ -39,6 +39,23 @@ struct Dir int readsect(ulong drive, ulong lba, void *buf); +#ifdef FAT +int +readsect4(ulong drive, ulong lba, void *buf) +{ + int i; + + lba *= Sectsz/512; + for(i = 0; i>tmp/cfg/plan9.ini - disk/mk9660 -B 386/9bootiso -p /sys/lib/sysconfig/proto/allproto -s tmp $target + disk/mk9660 -B 386/9bootiso -p <{echo +} -s tmp $target + @{rfork n + bind 9boothyb 9bootfat + dd -if /dev/zero -bs 512 -count 4096 >> $target + disk/partfs -m /n/partfs $target + disk=/n/partfs/sdXX + disk/mbr -m mbr $disk/data + @{echo a p1 '$-1' '$' + echo t p1 FAT16 + echo A p1 + echo w + echo q} | disk/fdisk -b $disk/data + disk/format -b pbs -d -r 1 $disk/dos 9bootfat + } rm -fr tmp test.dsk: 9bootfat mbr pbs test.iso -- cgit v1.2.3