head	1.4;
access;
symbols
	netbsd-11-0-RC4:1.4
	netbsd-11-0-RC3:1.4
	netbsd-11-0-RC2:1.4
	netbsd-11-0-RC1:1.4
	perseant-exfatfs-base-20250801:1.4
	netbsd-11:1.4.0.68
	netbsd-11-base:1.4
	netbsd-10-1-RELEASE:1.4
	perseant-exfatfs-base-20240630:1.4
	perseant-exfatfs:1.4.0.66
	perseant-exfatfs-base:1.4
	netbsd-8-3-RELEASE:1.4
	netbsd-9-4-RELEASE:1.4
	netbsd-10-0-RELEASE:1.4
	netbsd-10-0-RC6:1.4
	netbsd-10-0-RC5:1.4
	netbsd-10-0-RC4:1.4
	netbsd-10-0-RC3:1.4
	netbsd-10-0-RC2:1.4
	thorpej-ifq:1.4.0.64
	thorpej-ifq-base:1.4
	thorpej-altq-separation:1.4.0.62
	thorpej-altq-separation-base:1.4
	netbsd-10-0-RC1:1.4
	netbsd-10:1.4.0.60
	netbsd-10-base:1.4
	bouyer-sunxi-drm:1.4.0.58
	bouyer-sunxi-drm-base:1.4
	netbsd-9-3-RELEASE:1.4
	thorpej-i2c-spi-conf2:1.4.0.56
	thorpej-i2c-spi-conf2-base:1.4
	thorpej-futex2:1.4.0.54
	thorpej-futex2-base:1.4
	thorpej-cfargs2:1.4.0.52
	thorpej-cfargs2-base:1.4
	cjep_sun2x-base1:1.4
	cjep_sun2x:1.4.0.50
	cjep_sun2x-base:1.4
	cjep_staticlib_x-base1:1.4
	netbsd-9-2-RELEASE:1.4
	cjep_staticlib_x:1.4.0.48
	cjep_staticlib_x-base:1.4
	thorpej-i2c-spi-conf:1.4.0.46
	thorpej-i2c-spi-conf-base:1.4
	thorpej-cfargs:1.4.0.44
	thorpej-cfargs-base:1.4
	thorpej-futex:1.4.0.42
	thorpej-futex-base:1.4
	netbsd-9-1-RELEASE:1.4
	bouyer-xenpvh-base2:1.4
	phil-wifi-20200421:1.4
	bouyer-xenpvh-base1:1.4
	phil-wifi-20200411:1.4
	bouyer-xenpvh:1.4.0.40
	bouyer-xenpvh-base:1.4
	is-mlppp:1.4.0.38
	is-mlppp-base:1.4
	phil-wifi-20200406:1.4
	netbsd-8-2-RELEASE:1.4
	ad-namecache-base3:1.4
	netbsd-9-0-RELEASE:1.4
	netbsd-9-0-RC2:1.4
	ad-namecache-base2:1.4
	ad-namecache-base1:1.4
	ad-namecache:1.4.0.36
	ad-namecache-base:1.4
	netbsd-9-0-RC1:1.4
	phil-wifi-20191119:1.4
	netbsd-9:1.4.0.34
	netbsd-9-base:1.4
	phil-wifi-20190609:1.4
	netbsd-8-1-RELEASE:1.4
	netbsd-8-1-RC1:1.4
	isaki-audio2:1.4.0.32
	isaki-audio2-base:1.4
	pgoyette-compat-merge-20190127:1.4
	pgoyette-compat-20190127:1.4
	pgoyette-compat-20190118:1.4
	pgoyette-compat-1226:1.4
	pgoyette-compat-1126:1.4
	pgoyette-compat-1020:1.4
	pgoyette-compat-0930:1.4
	pgoyette-compat-0906:1.4
	netbsd-7-2-RELEASE:1.4
	pgoyette-compat-0728:1.4
	netbsd-8-0-RELEASE:1.4
	phil-wifi:1.4.0.30
	phil-wifi-base:1.4
	pgoyette-compat-0625:1.4
	netbsd-8-0-RC2:1.4
	pgoyette-compat-0521:1.4
	pgoyette-compat-0502:1.4
	pgoyette-compat-0422:1.4
	netbsd-8-0-RC1:1.4
	pgoyette-compat-0415:1.4
	pgoyette-compat-0407:1.4
	pgoyette-compat-0330:1.4
	pgoyette-compat-0322:1.4
	pgoyette-compat-0315:1.4
	netbsd-7-1-2-RELEASE:1.4
	pgoyette-compat:1.4.0.28
	pgoyette-compat-base:1.4
	netbsd-7-1-1-RELEASE:1.4
	tls-maxphys-base-20171202:1.4
	matt-nb8-mediatek:1.4.0.26
	matt-nb8-mediatek-base:1.4
	nick-nhusb-base-20170825:1.4
	perseant-stdc-iso10646:1.4.0.24
	perseant-stdc-iso10646-base:1.4
	netbsd-8:1.4.0.22
	netbsd-8-base:1.4
	prg-localcount2-base3:1.4
	prg-localcount2-base2:1.4
	prg-localcount2-base1:1.4
	prg-localcount2:1.4.0.20
	prg-localcount2-base:1.4
	pgoyette-localcount-20170426:1.4
	bouyer-socketcan-base1:1.4
	jdolecek-ncq:1.4.0.18
	jdolecek-ncq-base:1.4
	pgoyette-localcount-20170320:1.4
	netbsd-7-1:1.4.0.16
	netbsd-7-1-RELEASE:1.4
	netbsd-7-1-RC2:1.4
	nick-nhusb-base-20170204:1.4
	netbsd-7-nhusb-base-20170116:1.4
	bouyer-socketcan:1.4.0.14
	bouyer-socketcan-base:1.4
	pgoyette-localcount-20170107:1.4
	netbsd-7-1-RC1:1.4
	nick-nhusb-base-20161204:1.4
	pgoyette-localcount-20161104:1.4
	netbsd-7-0-2-RELEASE:1.4
	nick-nhusb-base-20161004:1.4
	localcount-20160914:1.4
	netbsd-7-nhusb:1.4.0.12
	netbsd-7-nhusb-base:1.4
	pgoyette-localcount-20160806:1.4
	pgoyette-localcount-20160726:1.4
	pgoyette-localcount:1.4.0.10
	pgoyette-localcount-base:1.4
	nick-nhusb-base-20160907:1.4
	nick-nhusb-base-20160529:1.4
	netbsd-7-0-1-RELEASE:1.4
	nick-nhusb-base-20160422:1.4
	nick-nhusb-base-20160319:1.4
	nick-nhusb-base-20151226:1.4
	netbsd-7-0:1.4.0.8
	netbsd-7-0-RELEASE:1.4
	nick-nhusb-base-20150921:1.4
	netbsd-7-0-RC3:1.4
	netbsd-7-0-RC2:1.4
	netbsd-7-0-RC1:1.4
	nick-nhusb-base-20150606:1.4
	nick-nhusb-base-20150406:1.4
	nick-nhusb:1.4.0.6
	nick-nhusb-base:1.4
	netbsd-5-2-3-RELEASE:1.1
	netbsd-5-1-5-RELEASE:1.1
	netbsd-6-0-6-RELEASE:1.3
	netbsd-6-1-5-RELEASE:1.3
	netbsd-7:1.4.0.4
	netbsd-7-base:1.4
	yamt-pagecache-base9:1.4
	yamt-pagecache-tag8:1.3
	netbsd-6-1-4-RELEASE:1.3
	netbsd-6-0-5-RELEASE:1.3
	tls-earlyentropy:1.4.0.2
	tls-earlyentropy-base:1.4
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.4
	riastradh-drm2-base3:1.4
	netbsd-6-1-3-RELEASE:1.3
	netbsd-6-0-4-RELEASE:1.3
	netbsd-5-2-2-RELEASE:1.1
	netbsd-5-1-4-RELEASE:1.1
	netbsd-6-1-2-RELEASE:1.3
	netbsd-6-0-3-RELEASE:1.3
	netbsd-5-2-1-RELEASE:1.1
	netbsd-5-1-3-RELEASE:1.1
	rmind-smpnet-nbase:1.4
	netbsd-6-1-1-RELEASE:1.3
	riastradh-drm2-base2:1.3
	riastradh-drm2-base1:1.3
	riastradh-drm2:1.3.0.34
	riastradh-drm2-base:1.3
	rmind-smpnet:1.3.0.26
	rmind-smpnet-base:1.4
	netbsd-6-1:1.3.0.32
	netbsd-6-0-2-RELEASE:1.3
	netbsd-6-1-RELEASE:1.3
	khorben-n900:1.3.0.30
	netbsd-6-1-RC4:1.3
	netbsd-6-1-RC3:1.3
	agc-symver:1.3.0.28
	agc-symver-base:1.3
	netbsd-6-1-RC2:1.3
	netbsd-6-1-RC1:1.3
	yamt-pagecache-base8:1.3
	netbsd-5-2:1.1.0.90
	netbsd-6-0-1-RELEASE:1.3
	yamt-pagecache-base7:1.3
	netbsd-5-2-RELEASE:1.1
	netbsd-5-2-RC1:1.1
	matt-nb6-plus-nbase:1.3
	yamt-pagecache-base6:1.3
	netbsd-6-0:1.3.0.24
	netbsd-6-0-RELEASE:1.3
	netbsd-6-0-RC2:1.3
	tls-maxphys:1.3.0.22
	tls-maxphys-base:1.4
	matt-nb6-plus:1.3.0.20
	matt-nb6-plus-base:1.3
	netbsd-6-0-RC1:1.3
	jmcneill-usbmp-base10:1.3
	yamt-pagecache-base5:1.3
	jmcneill-usbmp-base9:1.3
	yamt-pagecache-base4:1.3
	jmcneill-usbmp-base8:1.3
	jmcneill-usbmp-base7:1.3
	jmcneill-usbmp-base6:1.3
	jmcneill-usbmp-base5:1.3
	jmcneill-usbmp-base4:1.3
	jmcneill-usbmp-base3:1.3
	jmcneill-usbmp-pre-base2:1.3
	jmcneill-usbmp-base2:1.3
	netbsd-6:1.3.0.18
	netbsd-6-base:1.3
	netbsd-5-1-2-RELEASE:1.1
	netbsd-5-1-1-RELEASE:1.1
	jmcneill-usbmp:1.3.0.16
	jmcneill-usbmp-base:1.3
	jmcneill-audiomp3:1.3.0.14
	jmcneill-audiomp3-base:1.3
	yamt-pagecache-base3:1.3
	yamt-pagecache-base2:1.3
	yamt-pagecache:1.3.0.12
	yamt-pagecache-base:1.3
	rmind-uvmplock-nbase:1.3
	cherry-xenmp:1.3.0.10
	cherry-xenmp-base:1.3
	jym-xensuspend-nbase:1.3
	uebayasi-xip-base7:1.3
	bouyer-quota2-nbase:1.3
	bouyer-quota2:1.3.0.8
	bouyer-quota2-base:1.3
	jruoho-x86intr:1.3.0.6
	jruoho-x86intr-base:1.3
	matt-mips64-premerge-20101231:1.3
	matt-nb5-mips64-premerge-20101231:1.1
	matt-nb5-pq3:1.1.0.88
	matt-nb5-pq3-base:1.1
	netbsd-5-1:1.1.0.86
	uebayasi-xip-base6:1.3
	uebayasi-xip-base5:1.3
	netbsd-5-1-RELEASE:1.1
	uebayasi-xip-base4:1.3
	uebayasi-xip-base3:1.3
	yamt-nfs-mp-base11:1.3
	netbsd-5-1-RC4:1.1
	matt-nb5-mips64-k15:1.1
	uebayasi-xip-base2:1.3
	yamt-nfs-mp-base10:1.3
	netbsd-5-1-RC3:1.1
	netbsd-5-1-RC2:1.1
	uebayasi-xip-base1:1.3
	netbsd-5-1-RC1:1.1
	rmind-uvmplock:1.3.0.4
	rmind-uvmplock-base:1.3
	yamt-nfs-mp-base9:1.3
	uebayasi-xip:1.3.0.2
	uebayasi-xip-base:1.3
	netbsd-5-0-2-RELEASE:1.1
	matt-nb5-mips64-premerge-20091211:1.1
	matt-premerge-20091211:1.3
	yamt-nfs-mp-base8:1.3
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.1
	matt-nb4-mips64-k7-u2a-k9b:1.1
	matt-nb5-mips64-u1-k1-k5:1.1
	yamt-nfs-mp-base7:1.3
	matt-nb5-mips64:1.1.0.84
	netbsd-5-0-1-RELEASE:1.1
	jymxensuspend-base:1.3
	yamt-nfs-mp-base6:1.3
	yamt-nfs-mp-base5:1.3
	yamt-nfs-mp-base4:1.3
	yamt-nfs-mp-base3:1.3
	nick-hppapmap-base4:1.3
	nick-hppapmap-base3:1.3
	netbsd-5-0:1.1.0.82
	netbsd-5-0-RELEASE:1.1
	netbsd-5-0-RC4:1.1
	netbsd-5-0-RC3:1.1
	nick-hppapmap-base2:1.1
	netbsd-5-0-RC2:1.1
	jym-xensuspend:1.1.0.80
	jym-xensuspend-base:1.3
	netbsd-5-0-RC1:1.1
	haad-dm-base2:1.1
	haad-nbase2:1.1
	ad-audiomp2:1.1.0.78
	ad-audiomp2-base:1.1
	netbsd-5:1.1.0.76
	netbsd-5-base:1.1
	nick-hppapmap:1.1.0.74
	nick-hppapmap-base:1.3
	matt-mips64-base2:1.1
	haad-dm-base1:1.1
	wrstuden-revivesa-base-4:1.1
	netbsd-4-0-1-RELEASE:1.1
	wrstuden-revivesa-base-3:1.1
	wrstuden-revivesa-base-2:1.1
	wrstuden-fixsa-newbase:1.1
	nick-csl-alignment-base5:1.1
	haad-dm:1.1.0.72
	haad-dm-base:1.1
	wrstuden-revivesa-base-1:1.1
	simonb-wapbl-nbase:1.1
	yamt-pf42-base4:1.1
	simonb-wapbl:1.1.0.70
	simonb-wapbl-base:1.1
	yamt-pf42-base3:1.1
	hpcarm-cleanup-nbase:1.1
	yamt-pf42-baseX:1.1
	yamt-pf42-base2:1.1
	yamt-nfs-mp-base2:1.1
	wrstuden-revivesa:1.1.0.68
	wrstuden-revivesa-base:1.1
	yamt-nfs-mp:1.1.0.66
	yamt-nfs-mp-base:1.1
	yamt-pf42:1.1.0.64
	yamt-pf42-base:1.1
	ad-socklock-base1:1.1
	yamt-lazymbuf-base15:1.1
	yamt-lazymbuf-base14:1.1
	keiichi-mipv6-nbase:1.1
	mjf-devfs2:1.1.0.62
	mjf-devfs2-base:1.1
	nick-net80211-sync:1.1.0.60
	nick-net80211-sync-base:1.1
	keiichi-mipv6:1.1.0.58
	keiichi-mipv6-base:1.1
	bouyer-xeni386-merge1:1.1
	matt-armv6-prevmlocking:1.1
	wrstuden-fixsa-base-1:1.1
	vmlocking2-base3:1.1
	netbsd-4-0:1.1.0.56
	netbsd-4-0-RELEASE:1.1
	bouyer-xeni386-nbase:1.1
	yamt-kmem-base3:1.1
	cube-autoconf:1.1.0.54
	cube-autoconf-base:1.1
	yamt-kmem-base2:1.1
	bouyer-xeni386:1.1.0.52
	bouyer-xeni386-base:1.1
	yamt-kmem:1.1.0.50
	yamt-kmem-base:1.1
	vmlocking2-base2:1.1
	reinoud-bufcleanup-nbase:1.1
	vmlocking2:1.1.0.48
	vmlocking2-base1:1.1
	netbsd-4-0-RC5:1.1
	matt-nb4-arm:1.1.0.46
	matt-nb4-arm-base:1.1
	matt-armv6-nbase:1.1
	jmcneill-base:1.1
	netbsd-4-0-RC4:1.1
	mjf-devfs:1.1.0.44
	mjf-devfs-base:1.1
	bouyer-xenamd64-base2:1.1
	vmlocking-nbase:1.1
	yamt-x86pmap-base4:1.1
	bouyer-xenamd64:1.1.0.42
	bouyer-xenamd64-base:1.1
	netbsd-4-0-RC3:1.1
	yamt-x86pmap-base3:1.1
	yamt-x86pmap-base2:1.1
	netbsd-4-0-RC2:1.1
	yamt-x86pmap:1.1.0.40
	yamt-x86pmap-base:1.1
	netbsd-4-0-RC1:1.1
	matt-armv6:1.1.0.38
	matt-armv6-base:1.1
	jmcneill-pm:1.1.0.36
	jmcneill-pm-base:1.1
	hpcarm-cleanup:1.1.0.34
	hpcarm-cleanup-base:1.1
	nick-csl-alignment:1.1.0.32
	nick-csl-alignment-base:1.1
	matt-mips64:1.1.0.30
	matt-mips64-base:1.1
	yamt-idlelwp-base8:1.1
	wrstuden-fixsa:1.1.0.28
	wrstuden-fixsa-base:1.1
	ppcoea-renovation:1.1.0.26
	ppcoea-renovation-base:1.1
	thorpej-atomic:1.1.0.24
	thorpej-atomic-base:1.1
	reinoud-bufcleanup:1.1.0.22
	reinoud-bufcleanup-base:1.1
	mjf-ufs-trans:1.1.0.20
	mjf-ufs-trans-base:1.1
	vmlocking:1.1.0.18
	vmlocking-base:1.1
	ad-audiomp:1.1.0.16
	ad-audiomp-base:1.1
	yamt-idlelwp:1.1.0.14
	post-newlock2-merge:1.1
	newlock2-nbase:1.1
	yamt-lazymbuf:1.1.0.12
	yamt-splraiseipl-base5:1.1
	yamt-splraiseipl-base4:1.1
	yamt-splraiseipl-base3:1.1
	netbsd-4:1.1.0.10
	netbsd-4-base:1.1
	yamt-splraiseipl-base2:1.1
	yamt-splraiseipl:1.1.0.8
	yamt-splraiseipl-base:1.1
	yamt-pdpolicy-base9:1.1
	rpaulo-netinet-merge-pcb-base:1.1
	rpaulo-netinet-merge-pcb:1.1.0.6
	newlock2:1.1.0.4
	newlock2-base:1.1
	yamt-pdpolicy:1.1.0.2
	yamt-pdpolicy-base8:1.1;
locks; strict;
comment	@# @;


1.4
date	2013.08.21.07.08.30;	author matt;	state Exp;
branches;
next	1.3;
commitid	eFGv0kqmUnt24i2x;

1.3
date	2009.04.22.17.13.36;	author tsutsui;	state Exp;
branches
	1.3.12.1
	1.3.22.1
	1.3.26.1;
next	1.2;

1.2
date	2009.04.03.10.38.13;	author tsutsui;	state Exp;
branches;
next	1.1;

1.1
date	2006.09.01.21.26.19;	author uwe;	state Exp;
branches
	1.1.2.1
	1.1.6.1
	1.1.12.1
	1.1.66.1
	1.1.74.1
	1.1.80.1;
next	;

1.3.12.1
date	2014.05.22.11.39.54;	author yamt;	state Exp;
branches;
next	;
commitid	VUUXuyNWnt3AKwBx;

1.3.22.1
date	2014.08.20.00.03.09;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.3.26.1
date	2013.08.28.23.59.18;	author rmind;	state Exp;
branches;
next	;
commitid	cbp9Ov2uYijlqh3x;

1.1.2.1
date	2006.09.01.21.26.19;	author yamt;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2006.09.03.15.23.20;	author yamt;	state Exp;
branches;
next	;

1.1.6.1
date	2006.09.01.21.26.19;	author rpaulo;	state dead;
branches;
next	1.1.6.2;

1.1.6.2
date	2006.09.09.02.40.57;	author rpaulo;	state Exp;
branches;
next	;

1.1.12.1
date	2006.09.01.21.26.19;	author yamt;	state dead;
branches;
next	1.1.12.2;

1.1.12.2
date	2006.12.30.20.46.24;	author yamt;	state Exp;
branches;
next	;

1.1.66.1
date	2009.05.04.08.11.23;	author yamt;	state Exp;
branches;
next	;

1.1.74.1
date	2009.04.28.07.34.16;	author skrll;	state Exp;
branches;
next	;

1.1.80.1
date	2009.05.13.17.17.58;	author jym;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Use <bsd.klinks.mk>
Add missing ${_MKTARGET_LINK}
@
text
@#	$NetBSD: Makefile.bootxx,v 1.3 2009/04/22 17:13:36 tsutsui Exp $

PROG?=		bootxx_${FS}

BOOTXX_SECTORS?= 15
BOOTXX_MAXSIZE?= (( ${BOOTXX_SECTORS} * 512 ))

SRCS=		pbr.S label.S bootxx.S boot1.c

.if ${FS} == ustarfs
SRCS+=		bios.S
.endif

LDFLAGS+=	-e start

CFLAGS=
CPPFLAGS+=	-DBOOTXX
CPPFLAGS+=	-DBOOTXX_SECTORS=${BOOTXX_SECTORS}
CPPFLAGS+=	-DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS}
CPPFLAGS+=	-DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS}
CPPFLAGS+=	-DXXfs_open=${FS}_open
CPPFLAGS+=	-DXXfs_close=${FS}_close
CPPFLAGS+=	-DXXfs_read=${FS}_read
CPPFLAGS+=	-DXXfs_stat=${FS}_stat
CPPFLAGS+=	-DFS=${FS}

CPPFLAGS+= -DLIBSA_SINGLE_FILESYSTEM=xxfs \
		-DLIBSA_NO_TWIDDLE \
		-DLIBSA_NO_FD_CHECKING \
		-DLIBSA_NO_RAW_ACCESS \
		-DLIBSA_NO_FS_WRITE \
		-DLIBSA_NO_FS_SEEK \
		-DLIBSA_SINGLE_DEVICE=blkdev \
		-DLIBKERN_OPTIMISE_SPACE \
		-D"blkdevioctl(x,y,z)=EINVAL" \
		-D"blkdevclose(f)=0" \
		-D"devopen(f,n,fl)=(*(fl)=(void *)n,0)" \
		-DLIBSA_NO_DISKLABEL_MSGS

SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"

.include "../Makefile.bootprogs"

LIBLIST=	${LIBSA} ${LIBKERN}

CLEANFILES+=	${PROG}.sym ${PROG}.map

${PROG}: ${OBJS} ${LIBLIST}
	${_MKTARGET_LINK}
	${LD} -o ${PROG}.sym ${LDFLAGS} -Ttext ${PRIMARY_LOAD_ADDRESS} \
		-Map ${PROG}.map -cref ${OBJS} ${LIBLIST}
	${OBJCOPY} -O binary ${PROG}.sym ${PROG}
	@@ sz=$$(ls -ln ${PROG} | tr -s ' ' | cut -d' ' -f5); \
	if [ "$$sz" -gt "$$${BOOTXX_MAXSIZE}" ]; then \
		echo "### ${PROG} size $$sz is larger than ${BOOTXX_MAXSIZE}" >&2 \
		rm -f ${PROG}; \
		! :; \
	else \
		: pad to sector boundary; \
		pad=$$(( 512 - ( $$sz & 511 ) )); \
		[ $$pad = 512 ] || \
		    dd if=/dev/zero bs=1 count=$$pad >>${PROG} 2>/dev/null; \
		echo "${PROG} size $$sz, $$((${BOOTXX_MAXSIZE} - $$sz)) free"; \
	fi

.include <bsd.prog.mk>
@


1.3
log
@Add ustarfs boot support.
This will be useful for disk size independent bootstrap installation image.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.bootxx,v 1.2 2009/04/03 10:38:13 tsutsui Exp $
d49 1
@


1.3.22.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD$
a48 1
	${_MKTARGET_LINK}
@


1.3.12.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.bootxx,v 1.3 2009/04/22 17:13:36 tsutsui Exp $
a48 1
	${_MKTARGET_LINK}
@


1.3.26.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD$
a48 1
	${_MKTARGET_LINK}
@


1.2
log
@Remove obsolete LIBSA_USE_MEMCPY and LIBSA_USE_MEMSET.
They were removed from <lib/libsa/stand.h> on December 2007.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.bootxx,v 1.1 2006/09/01 21:26:19 uwe Exp $
d10 4
@


1.1
log
@Initial import of NetBSD/landisk port by NONAKA Kimihiro <nonaka@@NetBSD.org>
@
text
@d1 1
a1 1
#	$NetBSD$
a28 2
		-DLIBSA_USE_MEMCPY \
		-DLIBSA_USE_MEMSET \
@


1.1.2.1
log
@file Makefile.bootxx was added on branch yamt-pdpolicy on 2006-09-03 15:23:20 +0000
@
text
@d1 63
@


1.1.2.2
log
@sync with head.
@
text
@a0 63
#	$NetBSD: Makefile.bootxx,v 1.1.2.1 2006/09/03 15:23:20 yamt Exp $

PROG?=		bootxx_${FS}

BOOTXX_SECTORS?= 15
BOOTXX_MAXSIZE?= (( ${BOOTXX_SECTORS} * 512 ))

SRCS=		pbr.S label.S bootxx.S boot1.c

LDFLAGS+=	-e start

CFLAGS=
CPPFLAGS+=	-DBOOTXX
CPPFLAGS+=	-DBOOTXX_SECTORS=${BOOTXX_SECTORS}
CPPFLAGS+=	-DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS}
CPPFLAGS+=	-DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS}
CPPFLAGS+=	-DXXfs_open=${FS}_open
CPPFLAGS+=	-DXXfs_close=${FS}_close
CPPFLAGS+=	-DXXfs_read=${FS}_read
CPPFLAGS+=	-DXXfs_stat=${FS}_stat
CPPFLAGS+=	-DFS=${FS}

CPPFLAGS+= -DLIBSA_SINGLE_FILESYSTEM=xxfs \
		-DLIBSA_NO_TWIDDLE \
		-DLIBSA_NO_FD_CHECKING \
		-DLIBSA_NO_RAW_ACCESS \
		-DLIBSA_NO_FS_WRITE \
		-DLIBSA_NO_FS_SEEK \
		-DLIBSA_USE_MEMCPY \
		-DLIBSA_USE_MEMSET \
		-DLIBSA_SINGLE_DEVICE=blkdev \
		-DLIBKERN_OPTIMISE_SPACE \
		-D"blkdevioctl(x,y,z)=EINVAL" \
		-D"blkdevclose(f)=0" \
		-D"devopen(f,n,fl)=(*(fl)=(void *)n,0)" \
		-DLIBSA_NO_DISKLABEL_MSGS

SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"

.include "../Makefile.bootprogs"

LIBLIST=	${LIBSA} ${LIBKERN}

CLEANFILES+=	${PROG}.sym ${PROG}.map

${PROG}: ${OBJS} ${LIBLIST}
	${LD} -o ${PROG}.sym ${LDFLAGS} -Ttext ${PRIMARY_LOAD_ADDRESS} \
		-Map ${PROG}.map -cref ${OBJS} ${LIBLIST}
	${OBJCOPY} -O binary ${PROG}.sym ${PROG}
	@@ sz=$$(ls -ln ${PROG} | tr -s ' ' | cut -d' ' -f5); \
	if [ "$$sz" -gt "$$${BOOTXX_MAXSIZE}" ]; then \
		echo "### ${PROG} size $$sz is larger than ${BOOTXX_MAXSIZE}" >&2 \
		rm -f ${PROG}; \
		! :; \
	else \
		: pad to sector boundary; \
		pad=$$(( 512 - ( $$sz & 511 ) )); \
		[ $$pad = 512 ] || \
		    dd if=/dev/zero bs=1 count=$$pad >>${PROG} 2>/dev/null; \
		echo "${PROG} size $$sz, $$((${BOOTXX_MAXSIZE} - $$sz)) free"; \
	fi

.include <bsd.prog.mk>
@


1.1.6.1
log
@file Makefile.bootxx was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:40:57 +0000
@
text
@d1 63
@


1.1.6.2
log
@sync with head
@
text
@a0 63
#	$NetBSD: Makefile.bootxx,v 1.1.6.1 2006/09/09 02:40:57 rpaulo Exp $

PROG?=		bootxx_${FS}

BOOTXX_SECTORS?= 15
BOOTXX_MAXSIZE?= (( ${BOOTXX_SECTORS} * 512 ))

SRCS=		pbr.S label.S bootxx.S boot1.c

LDFLAGS+=	-e start

CFLAGS=
CPPFLAGS+=	-DBOOTXX
CPPFLAGS+=	-DBOOTXX_SECTORS=${BOOTXX_SECTORS}
CPPFLAGS+=	-DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS}
CPPFLAGS+=	-DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS}
CPPFLAGS+=	-DXXfs_open=${FS}_open
CPPFLAGS+=	-DXXfs_close=${FS}_close
CPPFLAGS+=	-DXXfs_read=${FS}_read
CPPFLAGS+=	-DXXfs_stat=${FS}_stat
CPPFLAGS+=	-DFS=${FS}

CPPFLAGS+= -DLIBSA_SINGLE_FILESYSTEM=xxfs \
		-DLIBSA_NO_TWIDDLE \
		-DLIBSA_NO_FD_CHECKING \
		-DLIBSA_NO_RAW_ACCESS \
		-DLIBSA_NO_FS_WRITE \
		-DLIBSA_NO_FS_SEEK \
		-DLIBSA_USE_MEMCPY \
		-DLIBSA_USE_MEMSET \
		-DLIBSA_SINGLE_DEVICE=blkdev \
		-DLIBKERN_OPTIMISE_SPACE \
		-D"blkdevioctl(x,y,z)=EINVAL" \
		-D"blkdevclose(f)=0" \
		-D"devopen(f,n,fl)=(*(fl)=(void *)n,0)" \
		-DLIBSA_NO_DISKLABEL_MSGS

SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"

.include "../Makefile.bootprogs"

LIBLIST=	${LIBSA} ${LIBKERN}

CLEANFILES+=	${PROG}.sym ${PROG}.map

${PROG}: ${OBJS} ${LIBLIST}
	${LD} -o ${PROG}.sym ${LDFLAGS} -Ttext ${PRIMARY_LOAD_ADDRESS} \
		-Map ${PROG}.map -cref ${OBJS} ${LIBLIST}
	${OBJCOPY} -O binary ${PROG}.sym ${PROG}
	@@ sz=$$(ls -ln ${PROG} | tr -s ' ' | cut -d' ' -f5); \
	if [ "$$sz" -gt "$$${BOOTXX_MAXSIZE}" ]; then \
		echo "### ${PROG} size $$sz is larger than ${BOOTXX_MAXSIZE}" >&2 \
		rm -f ${PROG}; \
		! :; \
	else \
		: pad to sector boundary; \
		pad=$$(( 512 - ( $$sz & 511 ) )); \
		[ $$pad = 512 ] || \
		    dd if=/dev/zero bs=1 count=$$pad >>${PROG} 2>/dev/null; \
		echo "${PROG} size $$sz, $$((${BOOTXX_MAXSIZE} - $$sz)) free"; \
	fi

.include <bsd.prog.mk>
@


1.1.12.1
log
@file Makefile.bootxx was added on branch yamt-lazymbuf on 2006-12-30 20:46:24 +0000
@
text
@d1 63
@


1.1.12.2
log
@sync with head.
@
text
@a0 63
#	$NetBSD: Makefile.bootxx,v 1.1.12.1 2006/12/30 20:46:24 yamt Exp $

PROG?=		bootxx_${FS}

BOOTXX_SECTORS?= 15
BOOTXX_MAXSIZE?= (( ${BOOTXX_SECTORS} * 512 ))

SRCS=		pbr.S label.S bootxx.S boot1.c

LDFLAGS+=	-e start

CFLAGS=
CPPFLAGS+=	-DBOOTXX
CPPFLAGS+=	-DBOOTXX_SECTORS=${BOOTXX_SECTORS}
CPPFLAGS+=	-DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS}
CPPFLAGS+=	-DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS}
CPPFLAGS+=	-DXXfs_open=${FS}_open
CPPFLAGS+=	-DXXfs_close=${FS}_close
CPPFLAGS+=	-DXXfs_read=${FS}_read
CPPFLAGS+=	-DXXfs_stat=${FS}_stat
CPPFLAGS+=	-DFS=${FS}

CPPFLAGS+= -DLIBSA_SINGLE_FILESYSTEM=xxfs \
		-DLIBSA_NO_TWIDDLE \
		-DLIBSA_NO_FD_CHECKING \
		-DLIBSA_NO_RAW_ACCESS \
		-DLIBSA_NO_FS_WRITE \
		-DLIBSA_NO_FS_SEEK \
		-DLIBSA_USE_MEMCPY \
		-DLIBSA_USE_MEMSET \
		-DLIBSA_SINGLE_DEVICE=blkdev \
		-DLIBKERN_OPTIMISE_SPACE \
		-D"blkdevioctl(x,y,z)=EINVAL" \
		-D"blkdevclose(f)=0" \
		-D"devopen(f,n,fl)=(*(fl)=(void *)n,0)" \
		-DLIBSA_NO_DISKLABEL_MSGS

SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"

.include "../Makefile.bootprogs"

LIBLIST=	${LIBSA} ${LIBKERN}

CLEANFILES+=	${PROG}.sym ${PROG}.map

${PROG}: ${OBJS} ${LIBLIST}
	${LD} -o ${PROG}.sym ${LDFLAGS} -Ttext ${PRIMARY_LOAD_ADDRESS} \
		-Map ${PROG}.map -cref ${OBJS} ${LIBLIST}
	${OBJCOPY} -O binary ${PROG}.sym ${PROG}
	@@ sz=$$(ls -ln ${PROG} | tr -s ' ' | cut -d' ' -f5); \
	if [ "$$sz" -gt "$$${BOOTXX_MAXSIZE}" ]; then \
		echo "### ${PROG} size $$sz is larger than ${BOOTXX_MAXSIZE}" >&2 \
		rm -f ${PROG}; \
		! :; \
	else \
		: pad to sector boundary; \
		pad=$$(( 512 - ( $$sz & 511 ) )); \
		[ $$pad = 512 ] || \
		    dd if=/dev/zero bs=1 count=$$pad >>${PROG} 2>/dev/null; \
		echo "${PROG} size $$sz, $$((${BOOTXX_MAXSIZE} - $$sz)) free"; \
	fi

.include <bsd.prog.mk>
@


1.1.80.1
log
@Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.bootxx,v 1.3 2009/04/22 17:13:36 tsutsui Exp $
a9 4
.if ${FS} == ustarfs
SRCS+=		bios.S
.endif

d29 2
@


1.1.66.1
log
@sync with head.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.bootxx,v 1.1 2006/09/01 21:26:19 uwe Exp $
a9 4
.if ${FS} == ustarfs
SRCS+=		bios.S
.endif

d29 2
@


1.1.74.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.bootxx,v 1.3 2009/04/22 17:13:36 tsutsui Exp $
a9 4
.if ${FS} == ustarfs
SRCS+=		bios.S
.endif

d29 2
@
