1# $NetBSD: Makefile.liveimage,v 1.3 2012/11/03 14:25:32 tsutsui Exp $ 2# 3# Common Makefile to create a bootable FS image for USB flash or emulators 4# 5 6# 7# Required variables: 8# LIVEIMGBASE 9# Basename of the liveimage 10# 11# Optional variables: 12# LIVEIMAGEMB 13# target image size in MB 14# (if empty default IMAGEMB in Makefile.bootimage is used) 15# 16# See Makefile.bootimage for other variables. 17# 18 19.if !target(check_LIVEIMGBASE) 20check_LIVEIMGBASE: .PHONY .NOTMAIN 21.if !defined(LIVEIMGBASE) 22 @echo "Error: LIVEIMGBASE is not set" 23 @false 24.else 25 @true 26.endif 27.endif 28 29.if defined(LIVEIMAGEMB) 30IMAGEMB= ${LIVEIMAGEMB} 31.endif 32 33IMGBASE= ${LIVEIMGBASE} 34 35.include "${NETBSDSRCDIR}/distrib/common/bootimage/Makefile.bootimage" 36 37# LIVEIMG_RELEASEDIR specifies where to install ${LIVEIMGBASE}.img.gz. 38# This should be passed from etc/Makefile or etc/etc.${MACHINE}/Makefile.inc 39# but also set default here for manual builds. 40LIVEIMG_RELEASEDIR?= ${RELEASEMACHINEDIR}/installation/liveimage 41 42# should be defined elsewhere? 43MKDIR?= mkdir -p 44 45live_image: check_LIVEIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz 46 ${MKDIR} ${LIVEIMG_RELEASEDIR} 47 ${RELEASE_INSTALL} ${IMGBASE}.img.gz ${LIVEIMG_RELEASEDIR} 48 # note ${MAKESUM} will be calculated in src/etc/Makefile 49 50release: 51 52