1 # $NetBSD: Makefile.liveimage,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
3 # Common Makefile to create a bootable FS image for USB flash or emulators
9 # Basename of the liveimage
13 # target image size in MB
14 # (if empty default IMAGEMB in Makefile.bootimage is used)
16 # See Makefile.bootimage for other variables.
19 .if !target(check_LIVEIMGBASE)
20 check_LIVEIMGBASE: .PHONY .NOTMAIN
21 .if !defined(LIVEIMGBASE)
22 @echo "Error: LIVEIMGBASE is not set"
29 .if defined(LIVEIMAGEMB)
30 IMAGEMB= ${LIVEIMAGEMB}
33 IMGBASE= ${LIVEIMGBASE}
35 .include "${NETBSDSRCDIR}/distrib/common/bootimage/Makefile.bootimage"
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.
40 LIVEIMG_RELEASEDIR?= ${RELEASEMACHINEDIR}/installation/liveimage
42 # should be defined elsewhere?
45 live_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