blob: b19754d76e97def7384c448c667c7836622ae5ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
TARG=bootia32.efi bootx64.efi efiboot.fat
HFILES=fns.h mem.h
IMAGEBASE=0x8000
CFLAGS=-FTVw
PEFLAGS=$CFLAGS '-DIMAGEBASE='$IMAGEBASE
all:V: $TARG
install:V: $TARG
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
pe32.8: pe32.s
8a $PEFLAGS pe32.s
efi.8: efi.c efi.h
8c $CFLAGS efi.c
fs.8: fs.c efi.h
8c $CFLAGS fs.c
pxe.8: pxe.c efi.h
8c $CFLAGS pxe.c
iso.8: iso.c efi.h
8c $CFLAGS iso.c
sub.8: sub.c
8c $CFLAGS sub.c
%.8: $HFILES
bootx64.efi: pe64.6 efi.6 fs.6 pxe.6 iso.6 sub.6
6l -l -s -R1 -T$IMAGEBASE -o bootx64.out $prereq
dd -if bootx64.out -bs 1 -iseek 40 >$target
pe64.6: pe64.s
6a $PEFLAGS pe64.s
efi.6: efi.c efi.h
6c $CFLAGS efi.c
fs.6: fs.c efi.h
6c $CFLAGS fs.c
pxe.6: pxe.c efi.h
6c $CFLAGS pxe.c
iso.6: iso.c efi.h
6c $CFLAGS iso.c
sub.6: sub.c
6c $CFLAGS sub.c
%.6: $HFILES
efiboot.fat:D: bootia32.efi bootx64.efi
s = $target.$pid
rm -f $target
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
mkdir /n/esp/efi
mkdir /n/esp/efi/boot
cp bootia32.efi /n/esp/efi/boot
cp bootx64.efi /n/esp/efi/boot
unmount /n/esp
rm /srv/$s
test.iso:D: efiboot.fat
rm -fr tmp
mkdir tmp
mkdir tmp/cfg
mkdir tmp/386
cp efiboot.fat tmp/386
cp /386/9bootiso tmp/386
cp /386/9pc tmp/386
echo 'bootfile=/386/9pc' >tmp/cfg/plan9.ini
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/9pc /n/esp
echo 'bootfile=9pc' >/n/esp/plan9.ini
unmount /n/esp
rm /srv/$s
clean:V:
rm -f *.[68] *.out $TARG test.*
|