]> git.lizzy.rs Git - plan9front.git/blob - sys/src/9/omap/mkfile
kernel: add support for hardware watchpoints
[plan9front.git] / sys / src / 9 / omap / mkfile
1 CONF=beagle
2 CONFLIST=beagle
3
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.
7 loadaddr=0xc0310000
8
9 objtype=arm
10 </$objtype/mkfile
11 p=9
12
13 DEVS=`{rc ../port/mkdevlist $CONF}
14
15 PORT=\
16         alarm.$O\
17         alloc.$O\
18         allocb.$O\
19         auth.$O\
20         cache.$O\
21         chan.$O\
22         dev.$O\
23         edf.$O\
24         fault.$O\
25         mul64fract.$O\
26         rebootcmd.$O\
27         page.$O\
28         parse.$O\
29         pgrp.$O\
30         portclock.$O\
31         print.$O\
32         proc.$O\
33         qio.$O\
34         qlock.$O\
35         segment.$O\
36         swap.$O\
37         sysfile.$O\
38         sysproc.$O\
39         taslock.$O\
40         tod.$O\
41         xalloc.$O\
42         random.$O\
43
44 OBJ=\
45         l.$O\
46         lexception.$O\
47         lproc.$O\
48         arch.$O\
49         clock.$O\
50         fpi.$O\
51         fpiarm.$O\
52         fpimem.$O\
53         main.$O\
54         mmu.$O\
55         trap.$O\
56         syscall.$O\
57         $CONF.root.$O\
58         $CONF.rootc.$O\
59         $DEVS\
60         $PORT\
61
62 LIB=\
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\
69         /$objtype/lib/libc.a\
70
71 9:V: $p$CONF s$p$CONF
72
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
77
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
82         size $target
83
84 $p$CONF.gz:D:   $p$CONF
85         gzip -9 <$p$CONF >$target
86
87 $OBJ: $HFILES
88
89 install:V: /$objtype/$p$CONF
90
91 /$objtype/$p$CONF:D: $p$CONF s$p$CONF
92         { cp -x $p$CONF s$p$CONF /$objtype } &
93         wait
94         touch $target
95
96 <../boot/bootmkfile
97 <../port/portmkfile
98 <|../port/mkbootrules $CONF
99
100 CFLAGS= -I. -I../port $CFLAGS   # hack to compile private sysproc.c (e.g.)
101
102 arch.$O clock.$O fpiarm.$O main.$O mmu.$O screen.$O sdscsi.$O syscall.$O \
103         trap.$O: /$objtype/include/ureg.h
104
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
115
116 init.h:D:       ../port/initcode.c init9.s
117         $CC ../port/initcode.c
118         $AS init9.s
119         $LD -l -R1 -s -o init.out init9.$O initcode.$O /$objtype/lib/libc.a
120         {echo 'uchar initcode[]={'
121          xd -1x <init.out |
122                 sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
123          echo '};'} > init.h
124
125 reboot.h:D:     rebootcode.s cache.v7.s arm.s arm.h mem.h
126         $AS rebootcode.s
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[]={'
131          xd -1x reboot.out |
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