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 25SWAPMB= 0 # no swap 26OMIT_SWAPIMG= yes # nothing to write 27 28KERN_SET?= kern-GENERIC 29SETS?= modules base etc 30 31FSTAB_IN?= ${NETBSDSRCDIR}/distrib/common/bootimage/fstab.install.in 32 33.if ${USE_MBR} != "no" 34DISKPROTO_IN?= ${NETBSDSRCDIR}/distrib/common/bootimage/diskproto.noswap.mbr.in 35.else 36DISKPROTO_IN?= ${NETBSDSRCDIR}/distrib/common/bootimage/diskproto.noswap.in 37.endif 38 39# XXX: no permittion info for makefs(8) 40IMGDIR_EXTRA= ${RELEASEDIR}/${RELEASEMACHINEDIR} ${RELEASEMACHINEDIR} 41IMGDIR_EXCLUDE= -s ',./installation/cdrom.*,,gp' 42IMGDIR_EXCLUDE+= -s ',./installation/liveimage.*,,gp' 43IMGDIR_EXCLUDE+= -s ',./installation/installimage.*,,gp' 44 45IMGBASE= ${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. 52INSTIMG_RELEASEDIR?= ${RELEASEMACHINEDIR}/installation/installimage 53 54# should be defined elsewhere? 55MKDIR?= mkdir -p 56 57install_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 62release: 63 64