CONF=rb CONFLIST=rb # no rb with nvram on bovril (outside) EXTRACOPIES=piestand lookout boundary objtype=mips $target.list # -H1 is plan 9 boot image with rounded segments # $LD -o $target -H1 -l -R$BY2PG -T$KTZERO $OBJ $CONF.$O $LIB size $target install:V: $p$CONF cp $p$CONF /$objtype/ echo installed. for(i in $EXTRACOPIES) { 9fs $i && cp $p$CONF /n/$i/$objtype/ && echo -n $i... & } wait echo <../boot/bootmkfile <../port/portmkfile <|../port/mkbootrules $CONF init.h: init9.s ../port/initcode.c /sys/src/libc/9syscall/sys.h va init9.s vc ../port/initcode.c vl -T$UTZERO -R4 -o init.out init9.$O initcode.$O {echo 'uchar initcode[]={' xd -r -1x init.out | sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g' echo '};'} > init.h reboot.h:D: initreboot.s rebootcode.c mem.h $AS initreboot.s $CC -FTVw rebootcode.c # -lc is only for memmove. -T arg is REBOOTADDR. $LD -l -a -s -T0x80001000 -R4 -o reboot.out initreboot.$O rebootcode.$O -lc >reboot.list {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 l.$O: mips.s arch.$O clock.$O fpimips.$O faultmips.$O mmu.$O syscall.$O \ trap.$O: /$objtype/include/ureg.h main.$O: /$objtype/include/ureg.h errstr.h init.h reboot.h fpi.$O fpiarm.$O fpimem.$O: ../port/fpi.h devether.$O: ../port/netif.h etherif.h %.clean:V: rm -f $stem.c [9bz]$stem [9bz]$stem.gz boot$stem.* reboot.h apbootstrap.h init.h *.list # override ../port/portmkfile # create /boot/boot boot$CONF.out: $CONF print.$O $BOOTDIR/boot.c $BOOTLIB $BOOTDIR/mkboot $CONF > boot$CONF.c $CC $CFLAGS boot$CONF.c ../boot/printstub.c $AS c_fcr0.s $LD -o boot$CONF.out -T$UTZERO -R$MAXBY2PG boot$CONF.$O $BOOTLIB printstub.$O c_fcr0.$O