head	1.4;
access;
symbols
	netbsd-11-0-RC5:1.4
	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.26
	netbsd-11-base:1.4
	netbsd-10-1-RELEASE:1.4
	perseant-exfatfs-base-20240630:1.4
	perseant-exfatfs:1.4.0.24
	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
	netbsd-10-0-RC1:1.4
	netbsd-10:1.4.0.22
	netbsd-10-base:1.4
	netbsd-9-3-RELEASE:1.4
	cjep_sun2x-base1:1.4
	cjep_sun2x:1.4.0.20
	cjep_sun2x-base:1.4
	cjep_staticlib_x-base1:1.4
	netbsd-9-2-RELEASE:1.4
	cjep_staticlib_x:1.4.0.18
	cjep_staticlib_x-base:1.4
	netbsd-9-1-RELEASE:1.4
	phil-wifi-20200421:1.4
	phil-wifi-20200411:1.4
	is-mlppp:1.4.0.16
	is-mlppp-base:1.4
	phil-wifi-20200406:1.4
	netbsd-8-2-RELEASE:1.4
	netbsd-9-0-RELEASE:1.4
	netbsd-9-0-RC2:1.4
	netbsd-9-0-RC1:1.4
	phil-wifi-20191119:1.4
	netbsd-9:1.4.0.14
	netbsd-9-base:1.4
	phil-wifi-20190609:1.4
	netbsd-8-1-RELEASE:1.4
	netbsd-8-1-RC1: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.3
	pgoyette-compat-0728:1.4
	netbsd-8-0-RELEASE:1.4
	phil-wifi:1.4.0.12
	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.3
	pgoyette-compat:1.4.0.10
	pgoyette-compat-base:1.4
	netbsd-7-1-1-RELEASE:1.3
	matt-nb8-mediatek:1.4.0.8
	matt-nb8-mediatek-base:1.4
	perseant-stdc-iso10646:1.4.0.6
	perseant-stdc-iso10646-base:1.4
	netbsd-8:1.4.0.4
	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.2
	prg-localcount2-base:1.4
	pgoyette-localcount-20170426:1.4
	bouyer-socketcan-base1:1.4
	pgoyette-localcount-20170320:1.4
	netbsd-7-1:1.3.0.20
	netbsd-7-1-RELEASE:1.3
	netbsd-7-1-RC2:1.3
	netbsd-7-nhusb-base-20170116:1.3
	bouyer-socketcan:1.3.0.18
	bouyer-socketcan-base:1.3
	pgoyette-localcount-20170107:1.3
	netbsd-7-1-RC1:1.3
	pgoyette-localcount-20161104:1.3
	netbsd-7-0-2-RELEASE:1.3
	localcount-20160914:1.3
	netbsd-7-nhusb:1.3.0.16
	netbsd-7-nhusb-base:1.3
	pgoyette-localcount-20160806:1.3
	pgoyette-localcount-20160726:1.3
	pgoyette-localcount:1.3.0.14
	pgoyette-localcount-base:1.3
	netbsd-7-0-1-RELEASE:1.3
	netbsd-7-0:1.3.0.12
	netbsd-7-0-RELEASE:1.3
	netbsd-7-0-RC3:1.3
	netbsd-7-0-RC2:1.3
	netbsd-7-0-RC1:1.3
	netbsd-6-0-6-RELEASE:1.2
	netbsd-6-1-5-RELEASE:1.2
	netbsd-7:1.3.0.10
	netbsd-7-base:1.3
	yamt-pagecache-base9:1.3
	yamt-pagecache-tag8:1.2.4.3
	netbsd-6-1-4-RELEASE:1.2
	netbsd-6-0-5-RELEASE:1.2
	tls-earlyentropy:1.3.0.8
	tls-earlyentropy-base:1.3
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3
	riastradh-drm2-base3:1.3
	netbsd-6-1-3-RELEASE:1.2
	netbsd-6-0-4-RELEASE:1.2
	netbsd-6-1-2-RELEASE:1.2
	netbsd-6-0-3-RELEASE:1.2
	netbsd-6-1-1-RELEASE:1.2
	riastradh-drm2-base2:1.3
	riastradh-drm2-base1:1.3
	riastradh-drm2:1.3.0.2
	riastradh-drm2-base:1.3
	netbsd-6-1:1.2.0.12
	netbsd-6-0-2-RELEASE:1.2
	netbsd-6-1-RELEASE:1.2
	khorben-n900:1.3.0.6
	netbsd-6-1-RC4:1.2
	netbsd-6-1-RC3:1.2
	agc-symver:1.3.0.4
	agc-symver-base:1.3
	netbsd-6-1-RC2:1.2
	netbsd-6-1-RC1:1.2
	yamt-pagecache-base8:1.3
	netbsd-6-0-1-RELEASE:1.2
	yamt-pagecache-base7:1.3
	matt-nb6-plus-nbase:1.2
	yamt-pagecache-base6:1.2
	netbsd-6-0:1.2.0.10
	netbsd-6-0-RELEASE:1.2
	netbsd-6-0-RC2:1.2
	tls-maxphys:1.2.0.8
	tls-maxphys-base:1.3
	matt-nb6-plus:1.2.0.6
	matt-nb6-plus-base:1.2
	netbsd-6-0-RC1:1.2
	yamt-pagecache-base5:1.2
	yamt-pagecache:1.2.0.4
	yamt-pagecache-base4:1.2
	netbsd-6:1.2.0.2
	netbsd-6-base:1.2;
locks; strict;
comment	@# @;


1.4
date	2017.02.10.16.43.59;	author christos;	state Exp;
branches;
next	1.3;
commitid	uUOMTOtplR3gsqFz;

1.3
date	2012.11.03.14.25.32;	author tsutsui;	state Exp;
branches
	1.3.14.1
	1.3.18.1;
next	1.2;

1.2
date	2012.01.22.16.50.00;	author tsutsui;	state Exp;
branches
	1.2.4.1
	1.2.8.1;
next	1.1;

1.1
date	2012.01.22.03.53.30;	author tsutsui;	state Exp;
branches;
next	;

1.3.14.1
date	2017.03.20.06.52.04;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;

1.3.18.1
date	2017.04.21.16.51.09;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.2.4.1
date	2012.01.22.16.50.00;	author yamt;	state dead;
branches;
next	1.2.4.2;

1.2.4.2
date	2012.04.17.00.02.32;	author yamt;	state Exp;
branches;
next	1.2.4.3;

1.2.4.3
date	2013.01.16.05.26.01;	author yamt;	state Exp;
branches;
next	;

1.2.8.1
date	2012.11.20.02.57.41;	author tls;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Initial pass to be unaffected by build umask on build artifacts
1. ${MKDIR} -> ${MKDIR} ${MKDIRPERM}
2. ${CP} -> ${INSTALL} ${COPY} -m <perm>
@
text
@#	$NetBSD: Makefile.liveimage,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
#
# Common Makefile to create a bootable FS image for USB flash or emulators
#

#
# Required variables:
#	LIVEIMGBASE
#		Basename of the liveimage
#
# Optional variables:
#	LIVEIMAGEMB
#		target image size in MB
#		(if empty default IMAGEMB in Makefile.bootimage is used)
#
# See Makefile.bootimage for other variables.
#

.if !target(check_LIVEIMGBASE)
check_LIVEIMGBASE: .PHONY .NOTMAIN
.if !defined(LIVEIMGBASE)
	@@echo "Error: LIVEIMGBASE is not set"
	@@false
.else
	@@true
.endif
.endif

.if defined(LIVEIMAGEMB)
IMAGEMB=	${LIVEIMAGEMB}
.endif

IMGBASE=	${LIVEIMGBASE}

.include "${NETBSDSRCDIR}/distrib/common/bootimage/Makefile.bootimage"

# LIVEIMG_RELEASEDIR specifies where to install ${LIVEIMGBASE}.img.gz.
# This should be passed from etc/Makefile or etc/etc.${MACHINE}/Makefile.inc
# but also set default here for manual builds.
LIVEIMG_RELEASEDIR?=	${RELEASEMACHINEDIR}/installation/liveimage

# should be defined elsewhere? 
MKDIR?=		mkdir -p

live_image: check_LIVEIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
	${MKDIR} ${MKDIRPERM} ${LIVEIMG_RELEASEDIR}
	${RELEASE_INSTALL} ${IMGBASE}.img.gz ${LIVEIMG_RELEASEDIR}
	# note ${MAKESUM} will be calculated in src/etc/Makefile

release:

@


1.3
log
@Allow overriding live-image and install-image sizes by
INSTIMAGEMB (for install-images), USBIMAGEMB (for x86 sd0root liveimages),
and EMUIMAGEMB (for other liveimages) variables.
Per discussion on current-users@@:
http://mail-index.NetBSD.org/current-users/2012/10/29/msg021368.html
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.liveimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
d46 1
a46 1
	${MKDIR} ${LIVEIMG_RELEASEDIR}
@


1.3.18.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.liveimage,v 1.4 2017/02/10 16:43:59 christos Exp $
d46 1
a46 1
	${MKDIR} ${MKDIRPERM} ${LIVEIMG_RELEASEDIR}
@


1.3.14.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.liveimage,v 1.4 2017/02/10 16:43:59 christos Exp $
d46 1
a46 1
	${MKDIR} ${MKDIRPERM} ${LIVEIMG_RELEASEDIR}
@


1.2
log
@Fix checks for RELEASEDIR (and xxxxIMGBASE) variables to perform it
only on live_image or install_image targets.  PR toolchain/45864
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.liveimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
d11 5
d29 4
@


1.2.8.1
log
@Resync to 2012-11-19 00:00:00 UTC
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.liveimage,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
a10 5
# Optional variables:
#	LIVEIMAGEMB
#		target image size in MB
#		(if empty default IMAGEMB in Makefile.bootimage is used)
#
a23 4
.if defined(LIVEIMAGEMB)
IMAGEMB=	${LIVEIMAGEMB}
.endif

@


1.2.4.1
log
@file Makefile.liveimage was added on branch yamt-pagecache on 2012-04-17 00:02:32 +0000
@
text
@d1 42
@


1.2.4.2
log
@sync with head
@
text
@a0 42
#	$NetBSD$
#
# Common Makefile to create a bootable FS image for USB flash or emulators
#

#
# Required variables:
#	LIVEIMGBASE
#		Basename of the liveimage
#
# See Makefile.bootimage for other variables.
#

.if !target(check_LIVEIMGBASE)
check_LIVEIMGBASE: .PHONY .NOTMAIN
.if !defined(LIVEIMGBASE)
	@@echo "Error: LIVEIMGBASE is not set"
	@@false
.else
	@@true
.endif
.endif

IMGBASE=	${LIVEIMGBASE}

.include "${NETBSDSRCDIR}/distrib/common/bootimage/Makefile.bootimage"

# LIVEIMG_RELEASEDIR specifies where to install ${LIVEIMGBASE}.img.gz.
# This should be passed from etc/Makefile or etc/etc.${MACHINE}/Makefile.inc
# but also set default here for manual builds.
LIVEIMG_RELEASEDIR?=	${RELEASEMACHINEDIR}/installation/liveimage

# should be defined elsewhere? 
MKDIR?=		mkdir -p

live_image: check_LIVEIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
	${MKDIR} ${LIVEIMG_RELEASEDIR}
	${RELEASE_INSTALL} ${IMGBASE}.img.gz ${LIVEIMG_RELEASEDIR}
	# note ${MAKESUM} will be calculated in src/etc/Makefile

release:

@


1.2.4.3
log
@sync with (a bit old) head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.liveimage,v 1.2.4.2 2012/04/17 00:02:32 yamt Exp $
a10 5
# Optional variables:
#	LIVEIMAGEMB
#		target image size in MB
#		(if empty default IMAGEMB in Makefile.bootimage is used)
#
a23 4
.if defined(LIVEIMAGEMB)
IMAGEMB=	${LIVEIMAGEMB}
.endif

@


1.1
log
@Add "live-image" and "install-image" target support to build.sh.

"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
 msdosfs or partitioning MD label structures) support this target.

"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.

For more details (and known issue) see following posts on netbsd-bugs@@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html

No particular comments about implementation, and
"go ahead" comments from mrg@@, riz@@ and christos@@.

Closes PR toolchain/45153 and PR misc/45155.
@
text
@d1 1
a1 1
#	$NetBSD$
d14 3
a16 2
.if empty(LIVEIMGBASE)
.BEGIN:
d19 2
a21 4
.if empty(RELEASEDIR)
.BEGIN:
	@@echo "Error: RELEASEDIR is not set"
	@@false
d36 1
a36 1
live_image: ${IMGBASE}.img.gz
@

