]> git.lizzy.rs Git - plan9front.git/commitdiff
efi: generate /386/efiboot.fat for generating efi bootable cd images (see -E option...
authorcinap_lenrek <cinap_lenrek@felloff.net>
Fri, 31 Oct 2014 19:07:54 +0000 (20:07 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Fri, 31 Oct 2014 19:07:54 +0000 (20:07 +0100)
sys/man/8/9boot
sys/src/boot/efi/mkfile

index 5e778906f19229fa2b9431f329436b530bc86d64..7fb2fd853d5d82000b689ddcf1f50ad2d38472e2 100644 (file)
@@ -1,6 +1,6 @@
 .TH 9BOOT 8
 .SH NAME
-9bootfat, 9bootiso, 9bootpxe, bootia32.efi, bootx64.efi \- PC bootloader for FAT, ISO and PXE network booting
+9bootfat, 9bootiso, 9bootpxe, bootia32.efi, bootx64.efi, efiboot.fat \- PC bootloader for FAT, ISO and PXE network booting
 .SH SYNOPSIS
 Started by PC BIOS or chainloaded by partition bootsector
 .SH DESCRIPTION
@@ -118,6 +118,7 @@ BIOS booting.
 .br
 .B /386/bootx64.efi
 .br
+.B /386/efiboot.fat
 .SH SOURCE
 .BR /sys/src/boot/pc
 .br
index 2dddd1e4ee05eb6e42b906b91096a1aa15825e05..89ad243180485df00f784de20f4291b43220f002 100644 (file)
@@ -1,4 +1,4 @@
-TARG=bootia32.efi bootx64.efi
+TARG=bootia32.efi bootx64.efi efiboot.fat
 HFILES=fns.h mem.h
 IMAGEBASE=0x8000
 CFLAGS=-FTVw
@@ -7,8 +7,7 @@ PEFLAGS=$CFLAGS '-DIMAGEBASE='$IMAGEBASE
 all:V: $TARG
 
 install:V: $TARG
-       cp bootia32.efi /386
-       cp bootx64.efi /386
+       cp $prereq /386
 
 bootia32.efi:  pe32.8 efi.8 fs.8 pxe.8 iso.8 sub.8
        8l -l -H3 -T$IMAGEBASE -o $target $prereq
@@ -58,11 +57,10 @@ sub.6:      sub.c
 
 %.6:   $HFILES
 
-
-test.fat:D:    bootia32.efi bootx64.efi
+efiboot.fat:D: bootia32.efi bootx64.efi
        s = $target.$pid
        rm -f $target
-       dd -if /dev/zero -of $target -bs 65536 -count 128
+       dd -if /dev/zero -of $target -bs 1024 -count 1024
        disk/format -xd -t hard $target
        dossrv -f $target $s
        mount -c /srv/$s /n/esp
@@ -70,21 +68,38 @@ test.fat:D: bootia32.efi bootx64.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
+
+test.iso:D:    efiboot.fat
        rm -fr tmp
        mkdir tmp
-       cp test.fat tmp
        mkdir tmp/cfg
        mkdir tmp/386
+       cp efiboot.fat tmp/386
+       cp /386/9bootiso tmp/386
        cp /386/9pcf tmp/386
        echo 'bootfile=/386/9pcf' >tmp/cfg/plan9.ini
-       disk/mk9660 -E test.fat -p <{echo +} -s tmp $target
+       disk/mk9660 -B 386/9bootiso -E 386/efiboot.fat -p <{echo +} -s tmp $target
        rm -r tmp
 
+test.fat:D:    bootia32.efi bootx64.efi
+       s = $target.$pid
+       rm -f $target
+       dd -if /dev/zero -of $target -bs 65536 -count 128
+       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
+
+
 clean:V:
        rm -f *.[68] *.out $TARG test.*