4 # allegedly u-boot uses the bottom 8MB (up to 0x800000)
12 DEVS=`{rc ../port/mkdevlist $CONF}
65 /$objtype/lib/libmemlayer.a\
66 /$objtype/lib/libmemdraw.a\
67 /$objtype/lib/libdraw.a\
68 /$objtype/lib/libip.a\
69 /$objtype/lib/libsec.a\
71 /$objtype/lib/libmp.a\
72 /$objtype/lib/libfis.a\
76 $p$CONF:DQ: $CONF.c $OBJ $LIB mkfile
77 $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
78 echo '# linking raw kernel'
79 # sleep 1 # avoid relinking later
80 $LD -o $target -H0 -R4096 -T$loadaddr -l $OBJ $CONF.$O $LIB
82 s$p$CONF:DQ: $CONF.$O $OBJ $LIB
83 echo '# linking kernel with symbols'
84 # sleep 1 # avoid relinking later
85 $LD -o $target -R4096 -T$loadaddr -l $OBJ $CONF.$O $LIB
89 gzip -9 <$p$CONF >$target
93 install:V: /$objtype/$p$CONF
95 install-in-flash:V: /$objtype/$p$CONF paqdisk
97 echo erase all >/dev/flash/kernelctl
98 cp /$objtype/$p$CONF /dev/flash/kernel
99 echo erase all >/dev/flash/plan9ctl
100 cp paqdisk /dev/flash/plan9
102 /$objtype/$p$CONF:D: $p$CONF s$p$CONF
103 cp -x $p$CONF s$p$CONF /$objtype &
104 { 9fs lookout && cp -x $p$CONF s$p$CONF /n/lookout/$objtype } &
105 # { 9fs piestand && cp -x $p$CONF s$p$CONF /n/piestand/$objtype } &
113 disk/mkfs -d . /sys/lib/sysconfig/proto/armpaqproto
114 mkpaqfs -o ../paqdisk
119 <|../port/mkbootrules $CONF
121 # CFLAGS= -I. -I../port $CFLAGS # hack to compile private sysproc.c (e.g.)
123 arch.$O clock.$O fpiarm.$O main.$O mmu.$O screen.$O sdscsi.$O syscall.$O \
124 trap.$O: /$objtype/include/ureg.h
126 archkw.$O devether.$O ether1116.$O ethermii.$O: \
127 etherif.h ethermii.h ../port/netif.h
128 archkw.$O devflash.$O flashkw.$O: ../port/flashif.h
129 fpi.$O fpiarm.$O fpimem.$O: fpi.h
130 l.$O lexception.$O lproc.$O mmu.$O: arm.s arm.h mem.h
131 main.$O: errstr.h init.h reboot.h
133 devusb.$O: ../port/usb.h
134 usbehci.$O usbohci.$O usbuhci.$O: ../port/usb.h usbehci.h uncached.h
136 init.h:D: ../port/initcode.c init9.s
137 $CC ../port/initcode.c
139 $LD -l -R1 -s -o init.out init9.$O initcode.$O /$objtype/lib/libc.a
140 {echo 'uchar initcode[]={'
142 sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
145 reboot.h:D: rebootcode.s arm.s arm.h mem.h
147 # -lc is only for memmove. -T arg is PADDR(REBOOTADDR)
148 $LD -l -a -s -T0x100 -R4 -o reboot.out rebootcode.$O -lc >reboot.list
149 {echo 'uchar rebootcode[]={'
151 sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
152 echo '};'} > reboot.h
153 errstr.h:D: ../port/mkerrstr ../port/error.h
154 rc ../port/mkerrstr > errstr.h
157 rm -rf $p$CONF s$p$CONF armpaq paqdisk $CONF.c boot$CONF.c ../boot/libboot.a5