Makefile.installimage revision 1.2.4.2 1 1.2.4.2 yamt # $NetBSD: Makefile.installimage,v 1.2.4.2 2012/04/17 00:02:32 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.2 yamt # See Makefile.bootimage for other variables.
12 1.2.4.2 yamt #
13 1.2.4.2 yamt
14 1.2.4.2 yamt .if !target(check_INSTIMGBASE)
15 1.2.4.2 yamt check_INSTIMGBASE: .PHONY .NOTMAIN
16 1.2.4.2 yamt .if !defined(INSTIMGBASE)
17 1.2.4.2 yamt @echo "Error: INSTIMGBASE is not set"
18 1.2.4.2 yamt @false
19 1.2.4.2 yamt .else
20 1.2.4.2 yamt @true
21 1.2.4.2 yamt .endif
22 1.2.4.2 yamt .endif
23 1.2.4.2 yamt
24 1.2.4.2 yamt SWAPMB= 0 # no swap
25 1.2.4.2 yamt OMIT_SWAPIMG= yes # nothing to write
26 1.2.4.2 yamt
27 1.2.4.2 yamt KERN_SET?= kern-GENERIC
28 1.2.4.2 yamt SETS?= modules base etc
29 1.2.4.2 yamt
30 1.2.4.2 yamt FSTAB_IN?= ${NETBSDSRCDIR}/distrib/common/bootimage/fstab.install.in
31 1.2.4.2 yamt
32 1.2.4.2 yamt .if ${USE_MBR} != "no"
33 1.2.4.2 yamt DISKPROTO_IN?= ${NETBSDSRCDIR}/distrib/common/bootimage/diskproto.noswap.mbr.in
34 1.2.4.2 yamt .else
35 1.2.4.2 yamt DISKPROTO_IN?= ${NETBSDSRCDIR}/distrib/common/bootimage/diskproto.noswap.in
36 1.2.4.2 yamt .endif
37 1.2.4.2 yamt
38 1.2.4.2 yamt # XXX: no permittion info for makefs(8)
39 1.2.4.2 yamt IMGDIR_EXTRA= ${RELEASEDIR}/${RELEASEMACHINEDIR} ${RELEASEMACHINEDIR}
40 1.2.4.2 yamt IMGDIR_EXCLUDE= -s ',./installation/cdrom.*,,gp'
41 1.2.4.2 yamt IMGDIR_EXCLUDE+= -s ',./installation/liveimage.*,,gp'
42 1.2.4.2 yamt IMGDIR_EXCLUDE+= -s ',./installation/installimage.*,,gp'
43 1.2.4.2 yamt
44 1.2.4.2 yamt IMGBASE= ${INSTIMGBASE}
45 1.2.4.2 yamt
46 1.2.4.2 yamt .include "${NETBSDSRCDIR}/distrib/common/bootimage/Makefile.bootimage"
47 1.2.4.2 yamt
48 1.2.4.2 yamt # INSTIMG_RELEASEDIR specifies where to install ${INSTIMGBASE}.img.gz.
49 1.2.4.2 yamt # This should be passed from etc/Makefile or etc/etc.${MACHINE}/Makefile.inc
50 1.2.4.2 yamt # but also set default here for manual builds.
51 1.2.4.2 yamt INSTIMG_RELEASEDIR?= ${RELEASEMACHINEDIR}/installation/installimage
52 1.2.4.2 yamt
53 1.2.4.2 yamt # should be defined elsewhere?
54 1.2.4.2 yamt MKDIR?= mkdir -p
55 1.2.4.2 yamt
56 1.2.4.2 yamt install_image: check_INSTIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
57 1.2.4.2 yamt ${MKDIR} ${INSTIMG_RELEASEDIR}
58 1.2.4.2 yamt ${RELEASE_INSTALL} ${IMGBASE}.img.gz ${INSTIMG_RELEASEDIR}
59 1.2.4.2 yamt # note ${MAKESUM} will be calculated in src/etc/Makefile
60 1.2.4.2 yamt
61 1.2.4.2 yamt release:
62 1.2.4.2 yamt
63