Makefile.buildboot revision 1.27 1 # $NetBSD: Makefile.buildboot,v 1.27 2010/05/27 06:58:15 dholland Exp $
2 #
3 # This file is for the sparc `boot' and `bootxx' only; it does not
4 # currently play well on a 64-bit system.
5
6 S= ${.CURDIR}/../../../..
7
8 .PATH: ${.CURDIR}/../common ${.CURDIR}/../../sparc
9
10 COMMONSOURCE= srt0.S promdev.c dvma.c promlib.c
11
12 SRCS= ${COMMONSOURCE} ${PROGSOURCE}
13 NOMAN= # defined
14 BINMODE= 444
15
16 #
17 # The relocation address for `boot' must leave enough free memory below
18 # it to load a kernel at address 0x4000. On the other hand, on some
19 # machines, the PROM uses memory in the upper portion of the first 4MB
20 # segment, depending on the actual memory bank configuration probably.
21 # Our boot program must stear clear of that as well.
22 #
23 # Relocating `boot' at 0x388000 seems to provide a working compromise
24 # on the machines tested so far.
25 #
26 RELOC_DEFAULT?= 388000
27 RELOCS= $(RELOC_DEFAULT)
28 #RELOCS+= 200000 400000 700000 # additional link addresses
29
30 # `bootxx' is linked at a different address to circumvent i-cache
31 # flushing issues on Hypersparcs
32 RELOC_BOOTXX= 300000
33
34 CPPFLAGS+= -D_STANDALONE -DSUN4 -DSUN4C -DSUN4M -DSUN4D -DHEAP_VARIABLE
35
36 CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
37 CPPFLAGS+= -I${.CURDIR}/../../../../../common/include
38 CFLAGS= -Os
39 CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -ffreestanding
40
41 ### find out what to use for libkern
42 KERN_AS= library
43 .include "${S}/lib/libkern/Makefile.inc"
44 LIBKERN= ${KERNLIB}
45
46 .ifdef INCLUDE_LIBZ
47 ### find out what to use for libz
48 Z_AS= library
49 .include "${S}/lib/libz/Makefile.inc"
50 LIBZ= ${ZLIB}
51 .endif
52
53 ### find out what to use for libsa
54 SA_AS= library
55 SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
56 .include "${S}/lib/libsa/Makefile.inc"
57 LIBSA= ${SALIB}
58
59 .include <bsd.klinks.mk>
60
61 cleandir distclean: .WAIT cleanlibdir
62
63 cleanlibdir:
64 -rm -rf lib
65