2017-02-10 19:43:59 +03:00
|
|
|
# $NetBSD: Makefile.liveimage,v 1.4 2017/02/10 16:43:59 christos Exp $
|
2012-01-22 07:53:29 +04:00
|
|
|
#
|
|
|
|
# Common Makefile to create a bootable FS image for USB flash or emulators
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Required variables:
|
|
|
|
# LIVEIMGBASE
|
|
|
|
# Basename of the liveimage
|
|
|
|
#
|
2012-11-03 18:25:32 +04:00
|
|
|
# Optional variables:
|
|
|
|
# LIVEIMAGEMB
|
|
|
|
# target image size in MB
|
|
|
|
# (if empty default IMAGEMB in Makefile.bootimage is used)
|
|
|
|
#
|
2012-01-22 07:53:29 +04:00
|
|
|
# See Makefile.bootimage for other variables.
|
|
|
|
#
|
|
|
|
|
2012-01-22 20:50:00 +04:00
|
|
|
.if !target(check_LIVEIMGBASE)
|
|
|
|
check_LIVEIMGBASE: .PHONY .NOTMAIN
|
|
|
|
.if !defined(LIVEIMGBASE)
|
2012-01-22 07:53:29 +04:00
|
|
|
@echo "Error: LIVEIMGBASE is not set"
|
|
|
|
@false
|
2012-01-22 20:50:00 +04:00
|
|
|
.else
|
|
|
|
@true
|
2012-01-22 07:53:29 +04:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2012-11-03 18:25:32 +04:00
|
|
|
.if defined(LIVEIMAGEMB)
|
|
|
|
IMAGEMB= ${LIVEIMAGEMB}
|
|
|
|
.endif
|
|
|
|
|
2012-01-22 07:53:29 +04:00
|
|
|
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
|
|
|
|
|
2012-01-22 20:50:00 +04:00
|
|
|
live_image: check_LIVEIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
|
2017-02-10 19:43:59 +03:00
|
|
|
${MKDIR} ${MKDIRPERM} ${LIVEIMG_RELEASEDIR}
|
2012-01-22 07:53:29 +04:00
|
|
|
${RELEASE_INSTALL} ${IMGBASE}.img.gz ${LIVEIMG_RELEASEDIR}
|
|
|
|
# note ${MAKESUM} will be calculated in src/etc/Makefile
|
|
|
|
|
|
|
|
release:
|
|
|
|
|