head	1.7;
access;
symbols
	netbsd-11-0-RC3:1.7
	netbsd-11-0-RC2:1.7
	netbsd-11-0-RC1:1.7
	perseant-exfatfs-base-20250801:1.7
	netbsd-11:1.7.0.52
	netbsd-11-base:1.7
	netbsd-10-1-RELEASE:1.7
	perseant-exfatfs-base-20240630:1.7
	perseant-exfatfs:1.7.0.50
	perseant-exfatfs-base:1.7
	netbsd-8-3-RELEASE:1.7
	netbsd-9-4-RELEASE:1.7
	netbsd-10-0-RELEASE:1.7
	netbsd-10-0-RC6:1.7
	netbsd-10-0-RC5:1.7
	netbsd-10-0-RC4:1.7
	netbsd-10-0-RC3:1.7
	netbsd-10-0-RC2:1.7
	thorpej-ifq:1.7.0.48
	thorpej-ifq-base:1.7
	thorpej-altq-separation:1.7.0.46
	thorpej-altq-separation-base:1.7
	netbsd-10-0-RC1:1.7
	netbsd-10:1.7.0.44
	netbsd-10-base:1.7
	bouyer-sunxi-drm:1.7.0.42
	bouyer-sunxi-drm-base:1.7
	netbsd-9-3-RELEASE:1.7
	thorpej-i2c-spi-conf2:1.7.0.40
	thorpej-i2c-spi-conf2-base:1.7
	thorpej-futex2:1.7.0.38
	thorpej-futex2-base:1.7
	thorpej-cfargs2:1.7.0.36
	thorpej-cfargs2-base:1.7
	cjep_sun2x-base1:1.7
	cjep_sun2x:1.7.0.34
	cjep_sun2x-base:1.7
	cjep_staticlib_x-base1:1.7
	netbsd-9-2-RELEASE:1.7
	cjep_staticlib_x:1.7.0.32
	cjep_staticlib_x-base:1.7
	thorpej-i2c-spi-conf:1.7.0.30
	thorpej-i2c-spi-conf-base:1.7
	thorpej-cfargs:1.7.0.28
	thorpej-cfargs-base:1.7
	thorpej-futex:1.7.0.26
	thorpej-futex-base:1.7
	netbsd-9-1-RELEASE:1.7
	bouyer-xenpvh-base2:1.7
	phil-wifi-20200421:1.7
	bouyer-xenpvh-base1:1.7
	phil-wifi-20200411:1.7
	bouyer-xenpvh:1.7.0.24
	bouyer-xenpvh-base:1.7
	is-mlppp:1.7.0.22
	is-mlppp-base:1.7
	phil-wifi-20200406:1.7
	netbsd-8-2-RELEASE:1.7
	ad-namecache-base3:1.7
	netbsd-9-0-RELEASE:1.7
	netbsd-9-0-RC2:1.7
	ad-namecache-base2:1.7
	ad-namecache-base1:1.7
	ad-namecache:1.7.0.20
	ad-namecache-base:1.7
	netbsd-9-0-RC1:1.7
	phil-wifi-20191119:1.7
	netbsd-9:1.7.0.18
	netbsd-9-base:1.7
	phil-wifi-20190609:1.7
	netbsd-8-1-RELEASE:1.7
	netbsd-8-1-RC1:1.7
	isaki-audio2:1.7.0.16
	isaki-audio2-base:1.7
	pgoyette-compat-merge-20190127:1.7
	pgoyette-compat-20190127:1.7
	pgoyette-compat-20190118:1.7
	pgoyette-compat-1226:1.7
	pgoyette-compat-1126:1.7
	pgoyette-compat-1020:1.7
	pgoyette-compat-0930:1.7
	pgoyette-compat-0906:1.7
	netbsd-7-2-RELEASE:1.6
	pgoyette-compat-0728:1.7
	netbsd-8-0-RELEASE:1.7
	phil-wifi:1.7.0.14
	phil-wifi-base:1.7
	pgoyette-compat-0625:1.7
	netbsd-8-0-RC2:1.7
	pgoyette-compat-0521:1.7
	pgoyette-compat-0502:1.7
	pgoyette-compat-0422:1.7
	netbsd-8-0-RC1:1.7
	pgoyette-compat-0415:1.7
	pgoyette-compat-0407:1.7
	pgoyette-compat-0330:1.7
	pgoyette-compat-0322:1.7
	pgoyette-compat-0315:1.7
	netbsd-7-1-2-RELEASE:1.6
	pgoyette-compat:1.7.0.12
	pgoyette-compat-base:1.7
	netbsd-7-1-1-RELEASE:1.6
	tls-maxphys-base-20171202:1.7
	matt-nb8-mediatek:1.7.0.10
	matt-nb8-mediatek-base:1.7
	nick-nhusb-base-20170825:1.7
	perseant-stdc-iso10646:1.7.0.8
	perseant-stdc-iso10646-base:1.7
	netbsd-8:1.7.0.6
	netbsd-8-base:1.7
	prg-localcount2-base3:1.7
	prg-localcount2-base2:1.7
	prg-localcount2-base1:1.7
	prg-localcount2:1.7.0.4
	prg-localcount2-base:1.7
	pgoyette-localcount-20170426:1.7
	bouyer-socketcan-base1:1.7
	jdolecek-ncq:1.7.0.2
	jdolecek-ncq-base:1.7
	pgoyette-localcount-20170320:1.6
	netbsd-7-1:1.6.0.16
	netbsd-7-1-RELEASE:1.6
	netbsd-7-1-RC2:1.6
	nick-nhusb-base-20170204:1.6
	netbsd-7-nhusb-base-20170116:1.6
	bouyer-socketcan:1.6.0.14
	bouyer-socketcan-base:1.6
	pgoyette-localcount-20170107:1.6
	netbsd-7-1-RC1:1.6
	nick-nhusb-base-20161204:1.6
	pgoyette-localcount-20161104:1.6
	netbsd-7-0-2-RELEASE:1.6
	nick-nhusb-base-20161004:1.6
	localcount-20160914:1.6
	netbsd-7-nhusb:1.6.0.12
	netbsd-7-nhusb-base:1.6
	pgoyette-localcount-20160806:1.6
	pgoyette-localcount-20160726:1.6
	pgoyette-localcount:1.6.0.10
	pgoyette-localcount-base:1.6
	nick-nhusb-base-20160907:1.6
	nick-nhusb-base-20160529:1.6
	netbsd-7-0-1-RELEASE:1.6
	nick-nhusb-base-20160422:1.6
	nick-nhusb-base-20160319:1.6
	nick-nhusb-base-20151226:1.6
	netbsd-7-0:1.6.0.8
	netbsd-7-0-RELEASE:1.6
	nick-nhusb-base-20150921:1.6
	netbsd-7-0-RC3:1.6
	netbsd-7-0-RC2:1.6
	netbsd-7-0-RC1:1.6
	nick-nhusb-base-20150606:1.6
	nick-nhusb-base-20150406:1.6
	nick-nhusb:1.6.0.6
	nick-nhusb-base:1.6
	netbsd-6-0-6-RELEASE:1.1
	netbsd-6-1-5-RELEASE:1.1
	netbsd-7:1.6.0.4
	netbsd-7-base:1.6
	yamt-pagecache-base9:1.6
	yamt-pagecache-tag8:1.1
	netbsd-6-1-4-RELEASE:1.1
	netbsd-6-0-5-RELEASE:1.1
	tls-earlyentropy:1.6.0.2
	tls-earlyentropy-base:1.6
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.6
	riastradh-drm2-base3:1.6
	netbsd-6-1-3-RELEASE:1.1
	netbsd-6-0-4-RELEASE:1.1
	netbsd-6-1-2-RELEASE:1.1
	netbsd-6-0-3-RELEASE:1.1
	rmind-smpnet-nbase:1.6
	netbsd-6-1-1-RELEASE:1.1
	riastradh-drm2-base2:1.1
	riastradh-drm2-base1:1.1
	riastradh-drm2:1.1.0.32
	riastradh-drm2-base:1.1
	rmind-smpnet:1.1.0.24
	rmind-smpnet-base:1.6
	netbsd-6-1:1.1.0.30
	netbsd-6-0-2-RELEASE:1.1
	netbsd-6-1-RELEASE:1.1
	khorben-n900:1.1.0.28
	netbsd-6-1-RC4:1.1
	netbsd-6-1-RC3:1.1
	agc-symver:1.1.0.26
	agc-symver-base:1.1
	netbsd-6-1-RC2:1.1
	netbsd-6-1-RC1:1.1
	yamt-pagecache-base8:1.1
	netbsd-6-0-1-RELEASE:1.1
	yamt-pagecache-base7:1.1
	matt-nb6-plus-nbase:1.1
	yamt-pagecache-base6:1.1
	netbsd-6-0:1.1.0.22
	netbsd-6-0-RELEASE:1.1
	netbsd-6-0-RC2:1.1
	tls-maxphys:1.1.0.20
	tls-maxphys-base:1.6
	matt-nb6-plus:1.1.0.18
	matt-nb6-plus-base:1.1
	netbsd-6-0-RC1:1.1
	jmcneill-usbmp-base10:1.1
	yamt-pagecache-base5:1.1
	jmcneill-usbmp-base9:1.1
	yamt-pagecache-base4:1.1
	jmcneill-usbmp-base8:1.1
	jmcneill-usbmp-base7:1.1
	jmcneill-usbmp-base6:1.1
	jmcneill-usbmp-base5:1.1
	jmcneill-usbmp-base4:1.1
	jmcneill-usbmp-base3:1.1
	jmcneill-usbmp-pre-base2:1.1
	jmcneill-usbmp-base2:1.1
	netbsd-6:1.1.0.16
	netbsd-6-base:1.1
	jmcneill-usbmp:1.1.0.14
	jmcneill-usbmp-base:1.1
	jmcneill-audiomp3:1.1.0.12
	jmcneill-audiomp3-base:1.1
	yamt-pagecache-base3:1.1
	yamt-pagecache-base2:1.1
	yamt-pagecache:1.1.0.10
	yamt-pagecache-base:1.1
	rmind-uvmplock-nbase:1.1
	jruoho-x86intr:1.1.0.8
	cherry-xenmp:1.1.0.6
	cherry-xenmp-base:1.1
	jym-xensuspend-nbase:1.1
	jym-xensuspend-base:1.1
	rmind-uvmplock-base:1.1
	rmind-uvmplock:1.1.0.4
	uebayasi-xip-base7:1.1
	bouyer-quota2-base:1.1
	bouyer-quota2:1.1.0.2
	bouyer-quota2-nbase:1.1;
locks; strict;
comment	@# @;


1.7
date	2017.04.08.19.53.20;	author christos;	state Exp;
branches;
next	1.6;
commitid	mAo8FJwd588QFLMz;

1.6
date	2014.01.22.15.16.14;	author christos;	state Exp;
branches
	1.6.6.1
	1.6.10.1
	1.6.14.1;
next	1.5;
commitid	qXUIkuSGJlwxO7mx;

1.5
date	2014.01.16.01.15.33;	author christos;	state Exp;
branches;
next	1.4;
commitid	eohV5AOa1lR3mhlx;

1.4
date	2014.01.12.15.26.28;	author tsutsui;	state Exp;
branches;
next	1.3;
commitid	YjbnVt32CCoKaQkx;

1.3
date	2013.10.04.15.01.52;	author christos;	state Exp;
branches;
next	1.2;
commitid	BFjaS3JppRBQgZ7x;

1.2
date	2013.08.21.07.22.26;	author matt;	state Exp;
branches;
next	1.1;
commitid	ZXy30N7WnZYT8i2x;

1.1
date	2011.01.26.01.18.53;	author pooka;	state Exp;
branches
	1.1.2.1
	1.1.4.1
	1.1.8.1
	1.1.10.1
	1.1.20.1
	1.1.24.1;
next	;

1.6.6.1
date	2017.08.28.17.51.33;	author skrll;	state Exp;
branches;
next	;
commitid	UQQpnjvcNkUZn05A;

1.6.10.1
date	2017.04.26.02.53.01;	author pgoyette;	state Exp;
branches;
next	;
commitid	ojV02aOSdzvBqZOz;

1.6.14.1
date	2017.04.21.16.53.25;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.1.2.1
date	2011.01.26.01.18.53;	author bouyer;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2011.02.08.18.05.08;	author bouyer;	state Exp;
branches;
next	;

1.1.4.1
date	2011.01.26.01.18.53;	author rmind;	state dead;
branches;
next	1.1.4.2;

1.1.4.2
date	2011.03.05.20.49.59;	author rmind;	state Exp;
branches;
next	;

1.1.8.1
date	2011.01.26.01.18.53;	author jruoho;	state dead;
branches;
next	1.1.8.2;

1.1.8.2
date	2011.06.06.09.05.20;	author jruoho;	state Exp;
branches;
next	;

1.1.10.1
date	2014.05.22.11.39.38;	author yamt;	state Exp;
branches;
next	;
commitid	VUUXuyNWnt3AKwBx;

1.1.20.1
date	2014.08.20.00.02.51;	author tls;	state Exp;
branches;
next	1.1.20.2;
commitid	jTnpym9Qu0o4R1Nx;

1.1.20.2
date	2017.12.03.11.36.01;	author jdolecek;	state Exp;
branches;
next	;
commitid	XcIYRZTAh1LmerhA;

1.1.24.1
date	2013.08.28.23.59.13;	author rmind;	state Exp;
branches;
next	1.1.24.2;
commitid	cbp9Ov2uYijlqh3x;

1.1.24.2
date	2014.05.18.17.45.02;	author rmind;	state Exp;
branches;
next	;
commitid	mL5ZYSzpqK6QS2Bx;


desc
@@


1.7
log
@centralize vers.c building for standalone programs.
@
text
@# $NetBSD: Makefile.booters,v 1.6 2014/01/22 15:16:14 christos Exp $

NOMAN=1
.include <bsd.own.mk>

# $S must correspond to the top of the 'sys' tree
S=	${.CURDIR}/../../../..

BINMODE?=	444

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBCRTI=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

.PATH:		${.CURDIR}/../common
AFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
# -I${.CURDIR}/../.. done by Makefile.inc
CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -D_NO_PROM_DEFINES \
		-I${.OBJDIR} -I${S}
# compiler flags for smallest code size
CFLAGS=		-ffreestanding -Os -mmemcpy -mno-abicalls -G 128
LDBUG=		-T $S/arch/mips/conf/stand.ldscript

NETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'

PRIMARY_LOAD_ADDRESS?=	0x80000000
SECONDARY_LOAD_ADDRESS?=0x80000000

NOMAN=		# defined

.if defined(PRIMARY_PROG)
PROG=		${PRIMARY_PROG}
SRCS =		start.S bootxx.c
SRCS+=		devopen.c conf.c ace.c printf.c putchar.c

LOAD_ADDRESS=	${PRIMARY_LOAD_ADDRESS}
# Pick a number, any number...
PRIMARY_MAX_TOTAL!=	expr 16 \* 1024

CPPFLAGS+=	-DPRIMARY_BOOTBLOCK \
		-DPRIMARY_LOAD_ADDRESS="${PRIMARY_LOAD_ADDRESS}" \
		-DNO_GETCHAR \
		-DLIBSA_NO_FS_SYMLINK -DLIBSA_NO_FS_WRITE \
		-DLIBSA_NO_FS_CLOSE \
		-DLIBSA_NO_DEV_CLOSE \
		-DLIBSA_SINGLE_DEVICE=ace \
		-D"aceioctl(x,y,z)=EINVAL" -D"aceclose(f)=0" \
		-DLIBSA_NO_TWIDDLE \
		-DLIBSA_NO_FD_CHECKING \
		-DLIBSA_NO_RAW_ACCESS \
		-DLIBSA_NO_DISKLABEL_MSGS \
		-DALLOC_FIRST_FIT \
		-DLIBSA_USE_MEMCPY -DLIBSA_USE_MEMSET

CHECKSIZE_CMD?=	SIZE=${SIZE} ${HOST_SH} ${.CURDIR}/../common/checksize.sh

.elif defined(SECONDARY_PROG)
PROG=		${SECONDARY_PROG}
LOAD_ADDRESS=	${SECONDARY_LOAD_ADDRESS}
CPPFLAGS+=	-DSECONDARY_BOOTBLOCK -DHEAP_VARIABLE

.include "${S}/conf/newvers_stand.mk"
.else
# XXX ?
.endif

### find out what to use for libkern
KERN_AS=	library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=	${KERNLIB}

### find out what to use for libz
.if defined(PRIMARY_PROG)
LIBZ=
.else
Z_AS=		library
.include "${S}/lib/libz/Makefile.inc"
LIBZ=		${ZLIB}
.endif

### find out what to use for libsa
SA_AS=		library
.if defined(PRIMARY_PROG)
SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
.endif
.if defined(SECONDARY_PROG)
SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
SAMISCMAKEFLAGS+=SA_INCLUDE_NET=yes
.endif
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=		${SALIB}

LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}

.include <bsd.own.mk>

${PROG}: ${OBJS} ${LIBS}
	${_MKTARGET_LINK}
	${LD} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} \
	    ${LDBUG} -e start -o ${PROG}.elf ${OBJS} ${LIBS}
	@@${SIZE} ${PROG}.elf
.if defined(CHECKSIZE_CMD)
	@@${CHECKSIZE_CMD} ${PROG}.elf ${PRIMARY_MAX_LOAD} ${PRIMARY_MAX_TOTAL} || \
	    (rm -f ${PROG}.elf ; false)
.endif
	@@${OBJCOPY} --output-target=binary ${PROG}.elf ${PROG}.bin
	dd if=${PROG}.bin of=${PROG} bs=512 conv=sync

.include <bsd.prog.mk>
.include <bsd.klinks.mk>

CLEANFILES+=	${PROG}.map

cleandir distclean: cleanlibdir

cleanlibdir:
	-rm -rf lib
@


1.6
log
@Add NOMAN
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.5 2014/01/16 01:15:33 christos Exp $
d65 2
a66 2
SRCS+=	vers.c
CLEANFILES+= vers.c
a100 4
vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    -N ${.CURDIR}/version "emips"

@


1.6.6.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.7 2017/04/08 19:53:20 christos Exp $
d65 2
a66 2

.include "${S}/conf/newvers_stand.mk"
d101 4
@


1.6.10.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.7 2017/04/08 19:53:20 christos Exp $
d65 2
a66 2

.include "${S}/conf/newvers_stand.mk"
d101 4
@


1.6.14.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.7 2017/04/08 19:53:20 christos Exp $
d65 2
a66 2

.include "${S}/conf/newvers_stand.mk"
d101 4
@


1.5
log
@eliminate use of bsd.sys.mk from Makefiles
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.4 2014/01/12 15:26:28 tsutsui Exp $
d3 1
@


1.4
log
@Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.3 2013/10/04 15:01:52 christos Exp $
d3 1
a3 1
.include <bsd.sys.mk>		# for HOST_SH
@


1.3
log
@remove -g
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.2 2013/08/21 07:22:26 matt Exp $
d12 1
@


1.2
log
@Use <bsd.klinks.mk>
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.1 2011/01/26 01:18:53 pooka Exp $
d22 1
a22 1
CFLAGS=		-ffreestanding -Os -g -mmemcpy -mno-abicalls -G 128
@


1.1
log
@Add support for the Extensible MIPS ("eMIPS") platform.  The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing.  eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman.  Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution.  The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.46 2005/12/11 12:18:39 christos Exp $
a7 9
.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN:
	@@[ -h machine ] || ln -s $S/arch/${MACHINE}/include machine
	@@[ -h emips ] || ln -s $S/arch/${MACHINE}/include emips
	@@[ -h mips ] || ln -s $S/arch/mips/include mips
.NOPATH: machine emips mips
.endif
CLEANFILES+= machine emips mips

d103 2
a104 1
${PROG}: machine mips emips ${OBJS} ${LIBS}
d116 1
@


1.1.20.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
# $NetBSD$
d3 1
a3 2
NOMAN=1
.include <bsd.own.mk>
d8 9
a20 1
LIBCRTI=
d31 1
a31 1
CFLAGS=		-ffreestanding -Os -mmemcpy -mno-abicalls -G 128
d112 1
a112 2
${PROG}: ${OBJS} ${LIBS}
	${_MKTARGET_LINK}
a123 1
.include <bsd.klinks.mk>
@


1.1.20.2
log
@update from HEAD
@
text
@d65 2
a66 2

.include "${S}/conf/newvers_stand.mk"
d101 4
@


1.1.10.1
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.1 2011/01/26 01:18:53 pooka Exp $
d3 1
a3 2
NOMAN=1
.include <bsd.own.mk>
d8 9
a20 1
LIBCRTI=
d31 1
a31 1
CFLAGS=		-ffreestanding -Os -mmemcpy -mno-abicalls -G 128
d112 1
a112 2
${PROG}: ${OBJS} ${LIBS}
	${_MKTARGET_LINK}
a123 1
.include <bsd.klinks.mk>
@


1.1.24.1
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD$
d8 9
d112 1
a112 2
${PROG}: ${OBJS} ${LIBS}
	${_MKTARGET_LINK}
a123 1
.include <bsd.klinks.mk>
@


1.1.24.2
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile.booters,v 1.1.24.1 2013/08/28 23:59:13 rmind Exp $
d3 1
a3 2
NOMAN=1
.include <bsd.own.mk>
a11 1
LIBCRTI=
d22 1
a22 1
CFLAGS=		-ffreestanding -Os -mmemcpy -mno-abicalls -G 128
@


1.1.8.1
log
@file Makefile.booters was added on branch jruoho-x86intr on 2011-06-06 09:05:20 +0000
@
text
@d1 130
@


1.1.8.2
log
@Sync with HEAD.
@
text
@a0 130
# $NetBSD: Makefile.booters,v 1.1 2011/01/26 01:18:53 pooka Exp $

.include <bsd.sys.mk>		# for HOST_SH

# $S must correspond to the top of the 'sys' tree
S=	${.CURDIR}/../../../..

.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN:
	@@[ -h machine ] || ln -s $S/arch/${MACHINE}/include machine
	@@[ -h emips ] || ln -s $S/arch/${MACHINE}/include emips
	@@[ -h mips ] || ln -s $S/arch/mips/include mips
.NOPATH: machine emips mips
.endif
CLEANFILES+= machine emips mips

BINMODE?=	444

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

.PATH:		${.CURDIR}/../common
AFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
# -I${.CURDIR}/../.. done by Makefile.inc
CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -D_NO_PROM_DEFINES \
		-I${.OBJDIR} -I${S}
# compiler flags for smallest code size
CFLAGS=		-ffreestanding -Os -g -mmemcpy -mno-abicalls -G 128
LDBUG=		-T $S/arch/mips/conf/stand.ldscript

NETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'

PRIMARY_LOAD_ADDRESS?=	0x80000000
SECONDARY_LOAD_ADDRESS?=0x80000000

NOMAN=		# defined

.if defined(PRIMARY_PROG)
PROG=		${PRIMARY_PROG}
SRCS =		start.S bootxx.c
SRCS+=		devopen.c conf.c ace.c printf.c putchar.c

LOAD_ADDRESS=	${PRIMARY_LOAD_ADDRESS}
# Pick a number, any number...
PRIMARY_MAX_TOTAL!=	expr 16 \* 1024

CPPFLAGS+=	-DPRIMARY_BOOTBLOCK \
		-DPRIMARY_LOAD_ADDRESS="${PRIMARY_LOAD_ADDRESS}" \
		-DNO_GETCHAR \
		-DLIBSA_NO_FS_SYMLINK -DLIBSA_NO_FS_WRITE \
		-DLIBSA_NO_FS_CLOSE \
		-DLIBSA_NO_DEV_CLOSE \
		-DLIBSA_SINGLE_DEVICE=ace \
		-D"aceioctl(x,y,z)=EINVAL" -D"aceclose(f)=0" \
		-DLIBSA_NO_TWIDDLE \
		-DLIBSA_NO_FD_CHECKING \
		-DLIBSA_NO_RAW_ACCESS \
		-DLIBSA_NO_DISKLABEL_MSGS \
		-DALLOC_FIRST_FIT \
		-DLIBSA_USE_MEMCPY -DLIBSA_USE_MEMSET

CHECKSIZE_CMD?=	SIZE=${SIZE} ${HOST_SH} ${.CURDIR}/../common/checksize.sh

.elif defined(SECONDARY_PROG)
PROG=		${SECONDARY_PROG}
LOAD_ADDRESS=	${SECONDARY_LOAD_ADDRESS}
CPPFLAGS+=	-DSECONDARY_BOOTBLOCK -DHEAP_VARIABLE
SRCS+=	vers.c
CLEANFILES+= vers.c
.else
# XXX ?
.endif

### find out what to use for libkern
KERN_AS=	library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=	${KERNLIB}

### find out what to use for libz
.if defined(PRIMARY_PROG)
LIBZ=
.else
Z_AS=		library
.include "${S}/lib/libz/Makefile.inc"
LIBZ=		${ZLIB}
.endif

### find out what to use for libsa
SA_AS=		library
.if defined(PRIMARY_PROG)
SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
.endif
.if defined(SECONDARY_PROG)
SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
SAMISCMAKEFLAGS+=SA_INCLUDE_NET=yes
.endif
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=		${SALIB}

LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}

.include <bsd.own.mk>

vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    -N ${.CURDIR}/version "emips"

${PROG}: machine mips emips ${OBJS} ${LIBS}
	${LD} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} \
	    ${LDBUG} -e start -o ${PROG}.elf ${OBJS} ${LIBS}
	@@${SIZE} ${PROG}.elf
.if defined(CHECKSIZE_CMD)
	@@${CHECKSIZE_CMD} ${PROG}.elf ${PRIMARY_MAX_LOAD} ${PRIMARY_MAX_TOTAL} || \
	    (rm -f ${PROG}.elf ; false)
.endif
	@@${OBJCOPY} --output-target=binary ${PROG}.elf ${PROG}.bin
	dd if=${PROG}.bin of=${PROG} bs=512 conv=sync

.include <bsd.prog.mk>

CLEANFILES+=	${PROG}.map

cleandir distclean: cleanlibdir

cleanlibdir:
	-rm -rf lib
@


1.1.4.1
log
@file Makefile.booters was added on branch rmind-uvmplock on 2011-03-05 20:49:59 +0000
@
text
@d1 130
@


1.1.4.2
log
@sync with head
@
text
@a0 130
# $NetBSD$

.include <bsd.sys.mk>		# for HOST_SH

# $S must correspond to the top of the 'sys' tree
S=	${.CURDIR}/../../../..

.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN:
	@@[ -h machine ] || ln -s $S/arch/${MACHINE}/include machine
	@@[ -h emips ] || ln -s $S/arch/${MACHINE}/include emips
	@@[ -h mips ] || ln -s $S/arch/mips/include mips
.NOPATH: machine emips mips
.endif
CLEANFILES+= machine emips mips

BINMODE?=	444

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

.PATH:		${.CURDIR}/../common
AFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
# -I${.CURDIR}/../.. done by Makefile.inc
CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -D_NO_PROM_DEFINES \
		-I${.OBJDIR} -I${S}
# compiler flags for smallest code size
CFLAGS=		-ffreestanding -Os -g -mmemcpy -mno-abicalls -G 128
LDBUG=		-T $S/arch/mips/conf/stand.ldscript

NETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'

PRIMARY_LOAD_ADDRESS?=	0x80000000
SECONDARY_LOAD_ADDRESS?=0x80000000

NOMAN=		# defined

.if defined(PRIMARY_PROG)
PROG=		${PRIMARY_PROG}
SRCS =		start.S bootxx.c
SRCS+=		devopen.c conf.c ace.c printf.c putchar.c

LOAD_ADDRESS=	${PRIMARY_LOAD_ADDRESS}
# Pick a number, any number...
PRIMARY_MAX_TOTAL!=	expr 16 \* 1024

CPPFLAGS+=	-DPRIMARY_BOOTBLOCK \
		-DPRIMARY_LOAD_ADDRESS="${PRIMARY_LOAD_ADDRESS}" \
		-DNO_GETCHAR \
		-DLIBSA_NO_FS_SYMLINK -DLIBSA_NO_FS_WRITE \
		-DLIBSA_NO_FS_CLOSE \
		-DLIBSA_NO_DEV_CLOSE \
		-DLIBSA_SINGLE_DEVICE=ace \
		-D"aceioctl(x,y,z)=EINVAL" -D"aceclose(f)=0" \
		-DLIBSA_NO_TWIDDLE \
		-DLIBSA_NO_FD_CHECKING \
		-DLIBSA_NO_RAW_ACCESS \
		-DLIBSA_NO_DISKLABEL_MSGS \
		-DALLOC_FIRST_FIT \
		-DLIBSA_USE_MEMCPY -DLIBSA_USE_MEMSET

CHECKSIZE_CMD?=	SIZE=${SIZE} ${HOST_SH} ${.CURDIR}/../common/checksize.sh

.elif defined(SECONDARY_PROG)
PROG=		${SECONDARY_PROG}
LOAD_ADDRESS=	${SECONDARY_LOAD_ADDRESS}
CPPFLAGS+=	-DSECONDARY_BOOTBLOCK -DHEAP_VARIABLE
SRCS+=	vers.c
CLEANFILES+= vers.c
.else
# XXX ?
.endif

### find out what to use for libkern
KERN_AS=	library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=	${KERNLIB}

### find out what to use for libz
.if defined(PRIMARY_PROG)
LIBZ=
.else
Z_AS=		library
.include "${S}/lib/libz/Makefile.inc"
LIBZ=		${ZLIB}
.endif

### find out what to use for libsa
SA_AS=		library
.if defined(PRIMARY_PROG)
SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
.endif
.if defined(SECONDARY_PROG)
SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
SAMISCMAKEFLAGS+=SA_INCLUDE_NET=yes
.endif
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=		${SALIB}

LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}

.include <bsd.own.mk>

vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    -N ${.CURDIR}/version "emips"

${PROG}: machine mips emips ${OBJS} ${LIBS}
	${LD} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} \
	    ${LDBUG} -e start -o ${PROG}.elf ${OBJS} ${LIBS}
	@@${SIZE} ${PROG}.elf
.if defined(CHECKSIZE_CMD)
	@@${CHECKSIZE_CMD} ${PROG}.elf ${PRIMARY_MAX_LOAD} ${PRIMARY_MAX_TOTAL} || \
	    (rm -f ${PROG}.elf ; false)
.endif
	@@${OBJCOPY} --output-target=binary ${PROG}.elf ${PROG}.bin
	dd if=${PROG}.bin of=${PROG} bs=512 conv=sync

.include <bsd.prog.mk>

CLEANFILES+=	${PROG}.map

cleandir distclean: cleanlibdir

cleanlibdir:
	-rm -rf lib
@


1.1.2.1
log
@file Makefile.booters was added on branch bouyer-quota2 on 2011-02-08 18:05:08 +0000
@
text
@d1 130
@


1.1.2.2
log
@Sync with HEAD
@
text
@a0 130
# $NetBSD: Makefile.booters,v 1.1 2011/01/26 01:18:53 pooka Exp $

.include <bsd.sys.mk>		# for HOST_SH

# $S must correspond to the top of the 'sys' tree
S=	${.CURDIR}/../../../..

.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN:
	@@[ -h machine ] || ln -s $S/arch/${MACHINE}/include machine
	@@[ -h emips ] || ln -s $S/arch/${MACHINE}/include emips
	@@[ -h mips ] || ln -s $S/arch/mips/include mips
.NOPATH: machine emips mips
.endif
CLEANFILES+= machine emips mips

BINMODE?=	444

# XXX SHOULD NOT NEED TO DEFINE THESE!
LIBCRT0=
LIBC=
LIBCRTBEGIN=
LIBCRTEND=

.PATH:		${.CURDIR}/../common
AFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
# -I${.CURDIR}/../.. done by Makefile.inc
CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -D_NO_PROM_DEFINES \
		-I${.OBJDIR} -I${S}
# compiler flags for smallest code size
CFLAGS=		-ffreestanding -Os -g -mmemcpy -mno-abicalls -G 128
LDBUG=		-T $S/arch/mips/conf/stand.ldscript

NETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'

PRIMARY_LOAD_ADDRESS?=	0x80000000
SECONDARY_LOAD_ADDRESS?=0x80000000

NOMAN=		# defined

.if defined(PRIMARY_PROG)
PROG=		${PRIMARY_PROG}
SRCS =		start.S bootxx.c
SRCS+=		devopen.c conf.c ace.c printf.c putchar.c

LOAD_ADDRESS=	${PRIMARY_LOAD_ADDRESS}
# Pick a number, any number...
PRIMARY_MAX_TOTAL!=	expr 16 \* 1024

CPPFLAGS+=	-DPRIMARY_BOOTBLOCK \
		-DPRIMARY_LOAD_ADDRESS="${PRIMARY_LOAD_ADDRESS}" \
		-DNO_GETCHAR \
		-DLIBSA_NO_FS_SYMLINK -DLIBSA_NO_FS_WRITE \
		-DLIBSA_NO_FS_CLOSE \
		-DLIBSA_NO_DEV_CLOSE \
		-DLIBSA_SINGLE_DEVICE=ace \
		-D"aceioctl(x,y,z)=EINVAL" -D"aceclose(f)=0" \
		-DLIBSA_NO_TWIDDLE \
		-DLIBSA_NO_FD_CHECKING \
		-DLIBSA_NO_RAW_ACCESS \
		-DLIBSA_NO_DISKLABEL_MSGS \
		-DALLOC_FIRST_FIT \
		-DLIBSA_USE_MEMCPY -DLIBSA_USE_MEMSET

CHECKSIZE_CMD?=	SIZE=${SIZE} ${HOST_SH} ${.CURDIR}/../common/checksize.sh

.elif defined(SECONDARY_PROG)
PROG=		${SECONDARY_PROG}
LOAD_ADDRESS=	${SECONDARY_LOAD_ADDRESS}
CPPFLAGS+=	-DSECONDARY_BOOTBLOCK -DHEAP_VARIABLE
SRCS+=	vers.c
CLEANFILES+= vers.c
.else
# XXX ?
.endif

### find out what to use for libkern
KERN_AS=	library
.include "${S}/lib/libkern/Makefile.inc"
LIBKERN=	${KERNLIB}

### find out what to use for libz
.if defined(PRIMARY_PROG)
LIBZ=
.else
Z_AS=		library
.include "${S}/lib/libz/Makefile.inc"
LIBZ=		${ZLIB}
.endif

### find out what to use for libsa
SA_AS=		library
.if defined(PRIMARY_PROG)
SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
.endif
.if defined(SECONDARY_PROG)
SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
SAMISCMAKEFLAGS+=SA_INCLUDE_NET=yes
.endif
.include "${S}/lib/libsa/Makefile.inc"
LIBSA=		${SALIB}

LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}

.include <bsd.own.mk>

vers.c: ${.CURDIR}/version
	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
	    -N ${.CURDIR}/version "emips"

${PROG}: machine mips emips ${OBJS} ${LIBS}
	${LD} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} \
	    ${LDBUG} -e start -o ${PROG}.elf ${OBJS} ${LIBS}
	@@${SIZE} ${PROG}.elf
.if defined(CHECKSIZE_CMD)
	@@${CHECKSIZE_CMD} ${PROG}.elf ${PRIMARY_MAX_LOAD} ${PRIMARY_MAX_TOTAL} || \
	    (rm -f ${PROG}.elf ; false)
.endif
	@@${OBJCOPY} --output-target=binary ${PROG}.elf ${PROG}.bin
	dd if=${PROG}.bin of=${PROG} bs=512 conv=sync

.include <bsd.prog.mk>

CLEANFILES+=	${PROG}.map

cleandir distclean: cleanlibdir

cleanlibdir:
	-rm -rf lib
@


