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