4 # allegedly u-boot uses the bottom 3MB (up to 0x300000) so avoid that,
5 # and leave 64K for plan9.ini. loadaddr must match KTZERO in mem.h.
6 # 0xc0310000 has worked, 0x80310000 should work but doesn't yet.
13 DEVS=`{rc ../port/mkdevlist $CONF}
62 /$objtype/lib/libmemlayer.a\
63 /$objtype/lib/libmemdraw.a\
64 /$objtype/lib/libdraw.a\
65 /$objtype/lib/libip.a\
66 /$objtype/lib/libsec.a\
67 /$objtype/lib/libmp.a\
72 $p$CONF:DQ: $CONF.c $OBJ $LIB mkfile
73 $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
74 echo '# linking raw kernel'
75 $LD -o $target -H0 -R4096 -T$loadaddr -l $OBJ $CONF.$O $LIB
77 s$p$CONF:DQ: $CONF.$O $OBJ $LIB
78 echo '# linking kernel with symbols'
79 # $LD -o $target -R4096 -T$loadaddr -l -a $OBJ $CONF.$O $LIB >$target.list
80 $LD -o $target -R4096 -T$loadaddr -l $OBJ $CONF.$O $LIB
84 gzip -9 <$p$CONF >$target
88 install:V: /$objtype/$p$CONF
90 /$objtype/$p$CONF:D: $p$CONF s$p$CONF
91 { cp -x $p$CONF s$p$CONF /$objtype } &
97 <|../port/mkbootrules $CONF
99 CFLAGS= -I. -I../port $CFLAGS # hack to compile private sysproc.c (e.g.)
101 arch.$O clock.$O fpiarm.$O main.$O mmu.$O screen.$O sdscsi.$O syscall.$O \
102 trap.$O: /$objtype/include/ureg.h
104 archomap.$O devether.$0 ether9221.$O: etherif.h ../port/netif.h
105 archomap.$O devflash.$O flashbeagle.$O flashigep.$O: ../port/flashif.h
106 ecc.$O flashbeagle.$O flashigep.$O: ../port/nandecc.h io.h
107 fpi.$O fpiarm.$O fpimem.$O: fpi.h
108 l.$O lexception.$O lproc.$O mmu.$O: arm.s arm.h mem.h
109 l.$O rebootcode.$O: cache.v7.s
110 main.$O: errstr.h init.h reboot.h
111 devdss.$O devmouse.$O mouse.$O screen.$O: screen.h
112 devusb.$O: ../port/usb.h
113 usbehci.$O usbohci.$O usbuhci.$O: ../port/usb.h usbehci.h
115 init.h:D: ../port/initcode.c init9.s
116 $CC ../port/initcode.c
118 $LD -l -R1 -s -o init.out init9.$O initcode.$O /$objtype/lib/libc.a
119 {echo 'uchar initcode[]={'
121 sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
124 reboot.h:D: rebootcode.s cache.v7.s arm.s arm.h mem.h
126 # -lc is only for memmove. -T arg is PADDR(REBOOTADDR)
127 # $LD -l -a -s -T0x100 -R4 -o reboot.out rebootcode.$O -lc >reboot.list
128 $LD -l -s -T0x100 -R4 -o reboot.out rebootcode.$O -lc
129 {echo 'uchar rebootcode[]={'
131 sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
132 echo '};'} > reboot.h
133 errstr.h:D: ../port/mkerrstr ../port/error.h
134 rc ../port/mkerrstr > errstr.h