Home | History | Annotate | Line # | Download | only in bootimage
Makefile.installimage revision 1.1
      1 #	$NetBSD: Makefile.installimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
      2 #
      3 # Common Makefile to create a bootable installation image for USB flash etc.
      4 #
      5 
      6 #
      7 # Required variables:
      8 #	INSTIMGBASE
      9 #		Basename of the liveimage
     10 #
     11 # See Makefile.bootimage for other variables.
     12 #
     13 
     14 .if empty(INSTIMGBASE)
     15 .BEGIN:
     16 	@echo "Error: INSTIMGBASE is not set"
     17 	@false
     18 .endif
     19 .if empty(RELEASEDIR)
     20 .BEGIN:
     21 	@echo "Error: RELEASEDIR is not set"
     22 	@false
     23 .endif
     24 
     25 SWAPMB=		0			# no swap
     26 OMIT_SWAPIMG=	yes			# nothing to write
     27 
     28 KERN_SET?=	kern-GENERIC
     29 SETS?=		modules base etc
     30 
     31 FSTAB_IN?=	${NETBSDSRCDIR}/distrib/common/bootimage/fstab.install.in
     32 
     33 .if ${USE_MBR} != "no"
     34 DISKPROTO_IN?=	${NETBSDSRCDIR}/distrib/common/bootimage/diskproto.noswap.mbr.in
     35 .else
     36 DISKPROTO_IN?=	${NETBSDSRCDIR}/distrib/common/bootimage/diskproto.noswap.in
     37 .endif
     38 
     39 # XXX: no permittion info for makefs(8)
     40 IMGDIR_EXTRA=	${RELEASEDIR}/${RELEASEMACHINEDIR}	${RELEASEMACHINEDIR}
     41 IMGDIR_EXCLUDE= 	-s ',./installation/cdrom.*,,gp'
     42 IMGDIR_EXCLUDE+=	-s ',./installation/liveimage.*,,gp'
     43 IMGDIR_EXCLUDE+=	-s ',./installation/installimage.*,,gp'
     44 
     45 IMGBASE=        ${INSTIMGBASE}
     46 
     47 .include "${NETBSDSRCDIR}/distrib/common/bootimage/Makefile.bootimage"
     48 
     49 # INSTIMG_RELEASEDIR specifies where to install ${INSTIMGBASE}.img.gz.
     50 # This should be passed from etc/Makefile or etc/etc.${MACHINE}/Makefile.inc
     51 # but also set default here for manual builds.
     52 INSTIMG_RELEASEDIR?=	${RELEASEMACHINEDIR}/installation/installimage
     53 
     54 # should be defined elsewhere? 
     55 MKDIR?=		mkdir -p
     56 
     57 install_image: ${IMGBASE}.img.gz
     58 	${MKDIR} ${INSTIMG_RELEASEDIR}
     59 	${RELEASE_INSTALL} ${IMGBASE}.img.gz ${INSTIMG_RELEASEDIR}
     60 	# note ${MAKESUM} will be calculated in src/etc/Makefile
     61 
     62 release:
     63 
     64