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