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