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}
63 /$objtype/lib/libmemlayer.a\
64 /$objtype/lib/libmemdraw.a\
65 /$objtype/lib/libdraw.a\
66 /$objtype/lib/libip.a\
67 /$objtype/lib/libsec.a\
68 /$objtype/lib/libmp.a\
73 $p$CONF:DQ: $CONF.c $OBJ $LIB mkfile
74 $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
75 echo '# linking raw kernel'
76 $LD -o $target -H0 -R4096 -T$loadaddr -l $OBJ $CONF.$O $LIB
78 s$p$CONF:DQ: $CONF.$O $OBJ $LIB
79 echo '# linking kernel with symbols'
80 # $LD -o $target -R4096 -T$loadaddr -l -a $OBJ $CONF.$O $LIB >$target.list
81 $LD -o $target -R4096 -T$loadaddr -l $OBJ $CONF.$O $LIB
85 gzip -9 <$p$CONF >$target
89 install:V: /$objtype/$p$CONF
91 /$objtype/$p$CONF:D: $p$CONF s$p$CONF
92 { cp -x $p$CONF s$p$CONF /$objtype } &
98 <|../port/mkbootrules $CONF
100 CFLAGS= -I. -I../port $CFLAGS # hack to compile private sysproc.c (e.g.)
102 arch.$O clock.$O fpiarm.$O main.$O mmu.$O screen.$O sdscsi.$O syscall.$O \
103 trap.$O: /$objtype/include/ureg.h
105 archomap.$O devether.$0 ether9221.$O: etherif.h ../port/netif.h
106 archomap.$O devflash.$O flashbeagle.$O flashigep.$O: ../port/flashif.h
107 ecc.$O flashbeagle.$O flashigep.$O: ../port/nandecc.h io.h
108 fpi.$O fpiarm.$O fpimem.$O: fpi.h
109 l.$O lexception.$O lproc.$O mmu.$O: arm.s arm.h mem.h
110 l.$O rebootcode.$O: cache.v7.s
111 main.$O: errstr.h init.h reboot.h
112 devdss.$O devmouse.$O mouse.$O screen.$O: screen.h
113 devusb.$O: ../port/usb.h
114 usbehci.$O usbohci.$O usbuhci.$O: ../port/usb.h usbehci.h
116 init.h:D: ../port/initcode.c init9.s
117 $CC ../port/initcode.c
119 $LD -l -R1 -s -o init.out init9.$O initcode.$O /$objtype/lib/libc.a
120 {echo 'uchar initcode[]={'
122 sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
125 reboot.h:D: rebootcode.s cache.v7.s arm.s arm.h mem.h
127 # -lc is only for memmove. -T arg is PADDR(REBOOTADDR)
128 # $LD -l -a -s -T0x100 -R4 -o reboot.out rebootcode.$O -lc >reboot.list
129 $LD -l -s -T0x100 -R4 -o reboot.out rebootcode.$O -lc
130 {echo 'uchar rebootcode[]={'
132 sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
133 echo '};'} > reboot.h
134 errstr.h:D: ../port/mkerrstr ../port/error.h
135 rc ../port/mkerrstr > errstr.h