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