CONF=xenpcf CONFLIST=xenpcf xenpccpuf xeninst xenpccpu CRAPLIST=xentest objtype=386 [2]/dev/null} ARCH=`{test -d xen-public/arch-x86 && echo arch-x86/xen-x86_32.h arch-x86/xen.h || echo arch-x86_32.h } XENHEADERS=\ $ARCH\ xen.h\ event_channel.h\ grant_table.h\ memory.h\ physdev.h\ $SCHED\ io/ring.h\ io/blkif.h\ io/console.h\ io/netif.h\ io/xenbus.h\ io/xs_wire.h\ OBJ=\ l.$O\ plan9l.$O\ xen.$O\ main.$O\ mmu.$O\ random.$O\ rdb.$O\ trap.$O\ $CONF.root.$O\ $CONF.rootc.$O\ $DEVS\ $PORT\ $XEN\ LIB=\ /$objtype/lib/libmemlayer.a\ /$objtype/lib/libmemdraw.a\ /$objtype/lib/libdraw.a\ /$objtype/lib/libip.a\ /$objtype/lib/libc.a\ /$objtype/lib/libsec.a\ /$objtype/lib/libmp.a\ ETHER=`{echo devether.c ether*.c | sed 's/\.c/.'$O'/g'} VGA=`{echo devvga.c screen.c vga*.c | sed 's/\.c/.'$O'/g'} SDEV=`{echo devsd.c sd*.c | sed 's/\.c/.'$O'/g'} PAE=`{echo $PAE | sed 's/yes/yes[extended-cr3]/'} XENELF='LOADER=generic,XEN_VER=xen-3.0,ELF_PADDR_OFFSET=0,VIRT_BASE='$KZERO',VIRT_ENTRY='$KTZERO',PAE='$PAE #$p$CONF: $CONF.c $OBJ $LIB xenbin # $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c # $LD -o $target.tmp -T$KTZERO -l $OBJ $CONF.$O $LIB # ./xenbin <$target.tmp >$target # rm $target.tmp # size $target $p$CONF: $CONF.c $OBJ $LIB xenelf $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c $LD -o $target.elf -H5 -T$KTZERO -P$KPZERO -l $OBJ $CONF.$O $LIB ./xenelf $target.elf $target __xen_guest ''$XENELF'' size $target $p$CONF.gz: $p$CONF #strip -o /fd/1 $p$CONF | gzip -9 > $p$CONF.gz gzip -9 $p$CONF > $p$CONF.gz install:V: $p$CONF $p$CONF.gz cp $p$CONF $p$CONF.gz /$objtype/ # import lookout / /n/lookout && cp $p$CONF $p$CONF.gz /n/lookout/$objtype/ <../boot/bootmkfile <../port/portmkfile <../pc/pcmkfile <|../port/mkbootrules $CONF ptclbsum386.$O: ../pc/ptclbsum386.s $AS $AFLAGS ../pc/ptclbsum386.s # we inherited these.. revist $ETHER: etherif.h ../port/netif.h $SDEV: ../port/sd.h main.$O: init.h reboot.h trap.$O: /sys/include/tos.h %.$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 xendefs.h: xendat.h grep '^#define[ ]+FLAT_' xendat.h >$target xendat.h: { echo '#define __i386__ __i386__'; \ echo '#define __XEN_INTERFACE_VERSION__ 0x00030201'; \ echo '#define XEN_GUEST_HANDLE_00030205(type) type *'; \ cat xen-public/^($XENHEADERS) } | \ ./cppx > $target init.h: ../port/initcode.c ../pc/init9.c $CC ../port/initcode.c $CC ../pc/init9.c $LD -l -R1 -o init.out init9.$O initcode.$O /386/lib/libc.a {echo 'uchar initcode[]={' strip -o /fd/1 init.out | xd -1x | sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g' echo '};'} > init.h reboot.h: ../pc/rebootcode.s $AS ../pc/rebootcode.s $LD -l -s -T0x1000 -R4 -o reboot.out rebootcode.$O {echo 'uchar rebootcode[]={' xd -1x reboot.out | sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g' echo '};'} > reboot.h acid:V: 8c -a -w -I. ../port/qio.c>acid # XXX revisit these %.checkether:VQ: for (i in ether*.c){ x=`{echo $i | sed 's/\.c//'} if(! ~ $x ether8390 && ! grep -s '^ '^$x^'([ ]|$)' $stem) echo $x not included in $stem } exit 0 %.checkvga:VQ: for (i in vga*.c){ x=`{echo $i | sed 's/\.c//'} if(! ~ $x vga vgax vgasavage && ! grep -s '^ '^$x^'([ ]|$)' $stem) echo $x not included in $stem } exit 0 checkdist:VQ: for(i in pcdisk pcflop) for(j in checkvga checkether) mk $i.$j dpart: dpart.$O $LD -o dpart dpart.$O xenstore: xenstore.$O $LD -o xenstore xenstore.$O # XXX this is wrong if we're cross-compiling xenbin: xenbin.$O $LD -o xenbin xenbin.$O xenelf: xenelf.$O $LD -o xenelf xenelf.$O %.clean:V: rm -f $stem.c [9bz]$stem [9bz]$stem.gz 9$stem.elf boot$stem.* reboot.h init.h xendat.h xendefs.h dpart xenbin xenelf xenstore