13 DEVS=`{rc ../port/mkdevlist $CONF}
46 SCHED=`{ls -p xen-public/sched*.h >[2]/dev/null}
47 ARCH=`{test -d xen-public/arch-x86 && echo arch-x86/xen-x86_32.h arch-x86/xen.h || echo arch-x86_32.h }
80 /$objtype/lib/libmemlayer.a\
81 /$objtype/lib/libmemdraw.a\
82 /$objtype/lib/libdraw.a\
83 /$objtype/lib/libip.a\
84 /$objtype/lib/libsec.a\
85 /$objtype/lib/libmp.a\
88 ETHER=`{echo devether.c ether*.c | sed 's/\.c/.'$O'/g'}
89 VGA=`{echo devvga.c screen.c vga*.c | sed 's/\.c/.'$O'/g'}
90 SDEV=`{echo devsd.c sd*.c | sed 's/\.c/.'$O'/g'}
92 PAE=`{echo $PAE | sed 's/yes/yes[extended-cr3]/'}
93 XENELF='LOADER=generic,XEN_VER=xen-3.0,ELF_PADDR_OFFSET=0,VIRT_BASE='$KZERO',VIRT_ENTRY='$KTZERO',PAE='$PAE
95 #$p$CONF: $CONF.c $OBJ $LIB xenbin.$cputype
96 # $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
97 # $LD -o $target.tmp -T$KTZERO -l $OBJ $CONF.$O $LIB
98 # ./xenbin.$cputype <$target.tmp >$target
102 $p$CONF: $CONF.c $OBJ $LIB xenelf.$cputype
103 $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
104 $LD -o $target.elf -H5 -T$KTZERO -P$KPZERO -l $OBJ $CONF.$O $LIB
105 ./xenelf.$cputype $target.elf $target __xen_guest ''$XENELF''
109 #strip -o /fd/1 $p$CONF | gzip -9 > $p$CONF.gz
110 gzip -9 $p$CONF > $p$CONF.gz
112 install:V: $p$CONF $p$CONF.gz
113 cp $p$CONF $p$CONF.gz /$objtype/
114 # import lookout / /n/lookout && cp $p$CONF $p$CONF.gz /n/lookout/$objtype/
116 # copies generated by the rule below
117 PCHEADERS=uncached.h ethermii.h mp.h io.h
119 REPCH=`{echo $PCHEADERS | sed 's/\.h//g; s/ /|/g'}
120 ^($REPCH)\.h:R: '../pc/\1.h'
123 REPCC=`{../port/mkfilelist ../pc}
124 ^($REPCC)\.$O:R: '../pc/\1.c'
125 $CC $CFLAGS -I. -. ../pc/$stem1.c
129 <|../port/mkbootrules $CONF
131 # we inherited these.. revisit.
132 $ETHER: ../port/etherif.h ../port/netif.h
134 main.$O: init.h reboot.h
135 trap.$O: /sys/include/tos.h
137 %.$O: /$objtype/include/u.h ../port/lib.h mem.h dat.h fns.h io.h ../port/error.h ../port/portdat.h ../port/portfns.h xendat.h xendefs.h
140 grep '^#define[ ]+FLAT_' xendat.h >$target
143 { echo '#define __i386__ __i386__'; \
144 echo '#define __XEN_INTERFACE_VERSION__ 0x00030201'; \
145 echo '#define XEN_GUEST_HANDLE_00030205(type) type *'; \
146 cat xen-public/^($XENHEADERS) } | \
149 init.h: ../port/initcode.c ../pc/init9.c
150 $CC ../port/initcode.c
152 $LD -l -R1 -o init.out init9.$O initcode.$O /386/lib/libc.a
153 {echo 'uchar initcode[]={'
154 strip -o /fd/1 init.out | xd -1x |
155 sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
158 reboot.h: ../pc/rebootcode.s
159 $AS ../pc/rebootcode.s
160 $LD -l -s -T0x1000 -R4 -o reboot.out rebootcode.$O
161 {echo 'uchar rebootcode[]={'
163 sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
164 echo '};'} > reboot.h
167 $CC -a -w main.c>acid
170 $LD -o dpart dpart.$O
172 xenstore: xenstore.$O
173 $LD -o xenstore xenstore.$O
175 xenbin.$cputype xenelf.$cputype: utilmkfile
176 mk -f utilmkfile $target
179 rm -f $stem.c [9bz]$stem [9bz]$stem.gz 9$stem.elf boot$stem.* reboot.h init.h xendat.h xendefs.h $PCHEADERS dpart xenbin.$cputype xenelf.$cputype xenstore