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