Makefile.bootimage revision 1.4
11.4Sriz# $NetBSD: Makefile.bootimage,v 1.4 2012/04/09 19:22:49 riz Exp $ 21.1Stsutsui# 31.1Stsutsui# Copyright (c) 2009, 2010, 2011 Izumi Tsutsui. All rights reserved. 41.1Stsutsui# 51.1Stsutsui# Redistribution and use in source and binary forms, with or without 61.1Stsutsui# modification, are permitted provided that the following conditions 71.1Stsutsui# are met: 81.1Stsutsui# 1. Redistributions of source code must retain the above copyright 91.1Stsutsui# notice, this list of conditions and the following disclaimer. 101.1Stsutsui# 2. Redistributions in binary form must reproduce the above copyright 111.1Stsutsui# notice, this list of conditions and the following disclaimer in the 121.1Stsutsui# documentation and/or other materials provided with the distribution. 131.1Stsutsui# 141.1Stsutsui# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 151.1Stsutsui# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 161.1Stsutsui# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 171.1Stsutsui# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 181.1Stsutsui# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 191.1Stsutsui# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 201.1Stsutsui# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 211.1Stsutsui# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 221.1Stsutsui# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 231.1Stsutsui# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 241.1Stsutsui 251.1Stsutsui# 261.1Stsutsui# Makefile to create a bootable FS image for USB flash or emulators 271.1Stsutsui# 281.1Stsutsui 291.1Stsutsui# 301.1Stsutsui# Required variables: 311.1Stsutsui# RELEASEDIR 321.1Stsutsui# Should be defined in nbmake-${MACHINE} 331.1Stsutsui# IMGBASE 341.1Stsutsui# Basename of the image 351.1Stsutsui# 361.1Stsutsui# Optional variables: 371.1Stsutsui# BOOTDISK 381.1Stsutsui# device name of target bootable disk specified in /etc/fstab 391.1Stsutsui# (default: sd0) 401.1Stsutsui# USE_MBR 411.1Stsutsui# set yes if target disk image requires MBR partition 421.1Stsutsui# (defautl: no) 431.1Stsutsui# USE_SUNLABEL 441.1Stsutsui# set yes if target disk image requires Sun's label 451.1Stsutsui# (default: no) 461.1Stsutsui# INSTALLBOOT_AFTER_DISKLABEL (untested) 471.1Stsutsui# set yes if the target ${MACHINE} requires disklabel 481.1Stsutsui# to run installboot(8), like hp300 491.1Stsutsui# (default: empty) 501.1Stsutsui# IMAGEMB 511.1Stsutsui# target image size in MB 521.1Stsutsui# (default: 2048) 531.1Stsutsui# SWAPMB 541.1Stsutsui# swap size in target image in MB 551.1Stsutsui# (default: 128) 561.1Stsutsui# KERN_SET 571.1Stsutsui# kernel set name which should be extracted into image 581.1Stsutsui# (default: kern-GENERIC) 591.1Stsutsui# SETS 601.1Stsutsui# binary sets that should be extracted into image 611.1Stsutsui# (default: modules base etc comp games man misc tests text 621.1Stsutsui# xbase xcomp xetc xfont xserver) 631.1Stsutsui# SETS_DIR 641.1Stsutsui# directory path where binary sets are stored 651.1Stsutsui# (default: ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets) 661.1Stsutsui# IMGFILE_EXTRA 671.1Stsutsui# list of additional files to be copied into images, 681.1Stsutsui# containing one or more tuples of the form: 691.1Stsutsui# FILE TARGETPATH 701.1Stsutsui# for installation image etc. 711.1Stsutsui# (default: empty) 721.1Stsutsui# IMGDIR_EXTRA 731.1Stsutsui# list of additional directories to be copied into images, 741.1Stsutsui# containing one or more tuples of the form: 751.1Stsutsui# DIR TARGETPATH 761.1Stsutsui# for installation image etc. 771.1Stsutsui# (default: empty) 781.1Stsutsui# XXX: currently permittions in IMGDIR_EXTRA are not handled 791.1Stsutsui# IMGDIR_EXCLUDE 801.1Stsutsui# pax(1) options to exclude files which should not copied 811.1Stsutsui# into TARGETPATH in IMGDIR_EXTRA 821.1Stsutsui# (default: empty) 831.1Stsutsui# FSTAB_IN 841.1Stsutsui# template file of /etc/fstab 851.1Stsutsui# (default: ${DISTRIBDIR}/common/bootimage/fstab.in) 861.1Stsutsui# SPEC_IN 871.1Stsutsui# default files of spec file for makefs(8) 881.1Stsutsui# (default: ${DISTRIBDIR}/common/bootimage/spec.in) 891.1Stsutsui# SPEC_EXTRA 901.1Stsutsui# additional files of spec file for makefs(8) 911.1Stsutsui# (default: empty) 921.1Stsutsui# IMGMAKEFSOPTIONS 931.1Stsutsui# options passed to makefs(8) to create root file system 941.1Stsutsui# (default: -o bsize=16384,fsize=2048,density=8192) 951.1Stsutsui# PRIMARY_BOOT 961.1Stsutsui# primary boot loader that should be installed into 971.1Stsutsui# the target image via installboot(8) 981.1Stsutsui# (default: empty) 991.1Stsutsui# SECONDARY_BOOT 1001.1Stsutsui# secondary bootloader that should be put into the target image 1011.1Stsutsui# (default: empty) 1021.1Stsutsui# SECONDARY_BOOT_ARG 1031.1Stsutsui# extra arguments that should be passed to installboot(8) 1041.1Stsutsui# to specify the secondary bootloader 1051.1Stsutsui# (default: empty) 1061.1Stsutsui# DISKPROTO_IN 1071.1Stsutsui# template file of disklabel -R 1081.1Stsutsui# (default: ${DISTRIBDIR}/common/bootimage/diskproto.in 1091.1Stsutsui# or ${DISTRIBDIR}/common/bootimage/diskproto.mbr.in) 1101.1Stsutsui# OMIT_SWAPIMG 1111.1Stsutsui# no need to put swap partition into image (for USB stick) 1121.1Stsutsui# (default: no) 1131.1Stsutsui# 1141.1Stsutsui 1151.1Stsutsui.include <bsd.sys.mk> # for HOST_SH 1161.1Stsutsui.include <bsd.own.mk> # 1171.1Stsutsui.include <bsd.endian.mk> # for TARGET_ENDIANNESS 1181.1Stsutsui 1191.1Stsutsui.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" 1201.1Stsutsui 1211.1Stsutsui.if empty(IMGBASE) 1221.1Stsutsui.BEGIN: 1231.1Stsutsui @echo "Error: IMGBASE is not set" 1241.1Stsutsui @false 1251.1Stsutsui.endif 1261.1Stsutsui 1271.1Stsutsui# should be defined elsewhere? 1281.1StsutsuiCAT?= cat 1291.1StsutsuiCHMOD?= chmod 1301.1StsutsuiCP?= cp 1311.1StsutsuiDD?= dd 1321.1StsutsuiMKDIR?= mkdir -p 1331.1StsutsuiRM?= rm 1341.1Stsutsui 1351.1Stsutsui# 1361.1Stsutsui# common definitions for image 1371.1Stsutsui# 1381.1StsutsuiBOOTDISK?= sd0 1391.1StsutsuiUSE_MBR?= no 1401.1StsutsuiUSE_SUNLABEL?= no 1411.1StsutsuiINSTALLBOOT_AFTER_DISKLABEL?= no 1421.1Stsutsui 1431.1Stsutsui# 1441.1Stsutsui# size parameters for image 1451.1Stsutsui# 1461.1StsutsuiIMAGEMB?= 2048 # 2048MB 1471.1StsutsuiSWAPMB?= 128 # 128MB 1481.1Stsutsui 1491.3Stsutsui# XXX: SWAPMB could be zero and expr(1) returns exit status 1 in that case 1501.1StsutsuiIMAGESECTORS!= expr ${IMAGEMB} \* 1024 \* 1024 / 512 1511.3StsutsuiSWAPSECTORS!= expr ${SWAPMB} \* 1024 \* 1024 / 512 || true 1521.1Stsutsui 1531.1Stsutsui.if ${USE_MBR} == "no" 1541.1StsutsuiLABELSECTORS?= 0 1551.1Stsutsui.else 1561.1Stsutsui#LABELSECTORS?= 63 # historical 1571.1Stsutsui#LABELSECTORS?= 32 # 16KB aligned 1581.1StsutsuiLABELSECTORS?= 2048 # 1MB aligned for modern flash devices 1591.1Stsutsui.endif 1601.1Stsutsui 1611.1StsutsuiFSSECTORS!= expr ${IMAGESECTORS} - ${SWAPSECTORS} - ${LABELSECTORS} 1621.1StsutsuiFSSIZE!= expr ${FSSECTORS} \* 512 1631.1Stsutsui 1641.1Stsutsui# parameters for disklabel and MBR 1651.1StsutsuiHEADS= 64 1661.1StsutsuiSECTORS= 32 1671.1StsutsuiCYLINDERS!= expr ${IMAGESECTORS} / \( ${HEADS} \* ${SECTORS} \) 1681.1StsutsuiSECPERCYLINDERS!= expr ${HEADS} \* ${SECTORS} 1691.1StsutsuiMBRHEADS= 255 1701.1StsutsuiMBRSECTORS= 63 1711.1StsutsuiMBRCYLINDERS!= expr ${IMAGESECTORS} / \( ${MBRHEADS} \* ${MBRSECTORS} \) 1721.1StsutsuiMBRNETBSD= 169 1731.1Stsutsui 1741.1StsutsuiBSDPARTSECTORS!= expr ${IMAGESECTORS} - ${LABELSECTORS} 1751.1StsutsuiFSOFFSET= ${LABELSECTORS} 1761.1StsutsuiSWAPOFFSET!= expr ${LABELSECTORS} + ${FSSECTORS} 1771.1Stsutsui 1781.1Stsutsui# parameters for sunlabel 1791.1StsutsuiFSCYLINDERS!= expr ${FSSECTORS} / \( ${HEADS} \* ${SECTORS} \) 1801.3StsutsuiSWAPCYLINDERS!= expr ${SWAPSECTORS} / \( ${HEADS} \* ${SECTORS} \) || true 1811.1Stsutsui 1821.1Stsutsui 1831.1Stsutsui# 1841.1Stsutsui# definitions to create root fs 1851.1Stsutsui# 1861.1StsutsuiSETS_DEFAULT= modules base etc comp games man misc tests text 1871.1Stsutsui.if ${MKX11} != "no" 1881.1StsutsuiSETS_DEFAULT+= xbase xcomp xetc xfont xserver 1891.1Stsutsui.endif 1901.1Stsutsui 1911.1StsutsuiKERN_SET?= kern-GENERIC 1921.1StsutsuiSETS?= ${SETS_DEFAULT} 1931.1StsutsuiIMG_SETS= ${KERN_SET} ${SETS} 1941.1StsutsuiSETS_DIR?= ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets 1951.1Stsutsui 1961.1StsutsuiFSTAB_IN?= ${DISTRIBDIR}/common/bootimage/fstab.in 1971.1StsutsuiSPEC_IN?= ${DISTRIBDIR}/common/bootimage/spec.in 1981.1Stsutsui 1991.1StsutsuiIMGMAKEFSOPTIONS?= -o bsize=16384,fsize=2048,density=8192 2001.1Stsutsui 2011.1StsutsuiWORKDIR?= work 2021.1StsutsuiWORKSPEC?= work.spec 2031.1StsutsuiWORKFSTAB?= work.fstab 2041.1StsutsuiWORKRCCONF?= work.rc.conf 2051.1StsutsuiWORKFS?= work.rootfs 2061.1StsutsuiTARGETFS?= imgroot.fs 2071.1Stsutsui 2081.1StsutsuiCLEANFILES+= ${WORKSPEC} ${WORKFSTAB} ${WORKRCCONF} ${WORKFS} 2091.1StsutsuiCLEANFILES+= ${TARGETFS} 2101.1Stsutsui 2111.1Stsutsui# 2121.1Stsutsui# create root file system for the image 2131.1Stsutsui# 2141.1Stsutsui${TARGETFS}: prepare_md_post 2151.1Stsutsui @if [ ! -d ${RELEASEDIR}/${RELEASEMACHINEDIR} ]; then \ 2161.1Stsutsui echo "Missing ${RELEASEDIR}/${RELEASEMACHINEDIR}, aborting"; \ 2171.1Stsutsui false; \ 2181.1Stsutsui fi; 2191.1Stsutsui @${MKDIR} ${WORKDIR} 2201.1Stsutsui.for set in ${IMG_SETS} 2211.1Stsutsui @if [ ! -f ${SETS_DIR}/${set}.tgz ]; then \ 2221.1Stsutsui echo "Missing ${SETS_DIR}/${set}.tgz, aborting"; \ 2231.1Stsutsui false; \ 2241.1Stsutsui fi 2251.1Stsutsui @echo Extracting ${set}.tgz ... 2261.1Stsutsui @(cd ${WORKDIR}; ${TOOL_PAX} -rnz -f ${SETS_DIR}/${set}.tgz .) 2271.1Stsutsui.endfor 2281.1Stsutsui.if defined(SECONDARY_BOOT) 2291.1Stsutsui @echo Copying secondary boot... 2301.1Stsutsui ${CP} -f ${WORKDIR}/usr/mdec/${SECONDARY_BOOT} ${WORKDIR} 2311.1Stsutsui.endif 2321.1Stsutsui @echo Preparing /etc/fstab ... 2331.1Stsutsui ${TOOL_SED} "s/@@BOOTDISK@@/${BOOTDISK}/" < ${FSTAB_IN} > ${WORKFSTAB} 2341.1Stsutsui ${CP} ${WORKFSTAB} ${WORKDIR}/etc/fstab 2351.1Stsutsui @echo Setting rc_configured=YES in /etc/rc.conf ... 2361.1Stsutsui ${TOOL_SED} "s/rc_configured=NO/rc_configured=YES/" \ 2371.1Stsutsui < ${WORKDIR}/etc/rc.conf > ${WORKRCCONF} 2381.1Stsutsui ${CP} ${WORKRCCONF} ${WORKDIR}/etc/rc.conf 2391.1Stsutsui.if defined(IMGDIR_EXTRA) 2401.1Stsutsui @echo Copying extra dirs... 2411.1Stsutsui.for _SRCDIR _TARGET in ${IMGDIR_EXTRA} 2421.1Stsutsui @if [ ! -d ${_SRCDIR} ]; then \ 2431.1Stsutsui echo "${_SRCDIR} is not directory, aborting"; \ 2441.1Stsutsui false; \ 2451.1Stsutsui fi 2461.1Stsutsui ${MKDIR} ${WORKDIR}/${_TARGET} 2471.1Stsutsui (cd ${_SRCDIR} ; \ 2481.1Stsutsui ${TOOL_PAX} -rw -pe -v \ 2491.1Stsutsui ${IMGDIR_EXCLUDE} \ 2501.1Stsutsui . ${.OBJDIR}/${WORKDIR}/${_TARGET} ) 2511.1Stsutsui.endfor 2521.1Stsutsui.endif 2531.1Stsutsui.if defined(IMGFILE_EXTRA) 2541.1Stsutsui @echo Copying extra files... 2551.1Stsutsui.for _SRC _TARGET in ${IMGFILE_EXTRA} 2561.1Stsutsui @if [ ! -f ${_SRC} ]; then \ 2571.1Stsutsui echo "${_SRC} in IMGFILE_EXTRA not found, aborting"; \ 2581.1Stsutsui false; \ 2591.1Stsutsui fi 2601.1Stsutsui @if [ -f ${_SRC} ]; then \ 2611.1Stsutsui echo ${CP} ${_SRC} ${WORKDIR}/${_TARGET}; \ 2621.1Stsutsui ${CP} ${_SRC} ${WORKDIR}/${_TARGET}; \ 2631.1Stsutsui fi 2641.1Stsutsui.endfor 2651.1Stsutsui.endif 2661.1Stsutsui @echo Preparing spec files for makefs... 2671.1Stsutsui ${RM} -f ${WORKSPEC} 2681.1Stsutsui cat ${WORKDIR}/etc/mtree/* | \ 2691.1Stsutsui ${TOOL_SED} -e 's/ size=[0-9]*//' > ${WORKSPEC} 2701.1Stsutsui ${HOST_SH} ${WORKDIR}/dev/MAKEDEV -s all | \ 2711.1Stsutsui ${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' >> ${WORKSPEC} 2721.1Stsutsui cat ${SPEC_IN} >> ${WORKSPEC} 2731.1Stsutsui.if defined(SECONDARY_BOOT) 2741.1Stsutsui echo "./${SECONDARY_BOOT} type=file uname=root gname=wheel mode=0444" \ 2751.1Stsutsui >> ${WORKSPEC} 2761.1Stsutsui.endif 2771.1Stsutsui.if defined(SPEC_EXTRA) 2781.1Stsutsui cat ${SPEC_EXTRA} >> ${WORKSPEC} 2791.1Stsutsui.endif 2801.4Sriz @echo Creating rootfs... 2811.1Stsutsui # XXX /var/spool/ftp/hidden is unreadable 2821.1Stsutsui ${CHMOD} +r ${WORKDIR}/var/spool/ftp/hidden 2831.1Stsutsui ${TOOL_MAKEFS} -M ${FSSIZE} -m ${FSSIZE} \ 2841.1Stsutsui -B ${TARGET_ENDIANNESS} \ 2851.1Stsutsui -F ${WORKSPEC} -N ${WORKDIR}/etc \ 2861.1Stsutsui ${IMGMAKEFSOPTIONS} \ 2871.1Stsutsui ${WORKFS} ${WORKDIR} 2881.1Stsutsui.if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} == "no" 2891.1Stsutsui ${TOOL_INSTALLBOOT} -vm ${MACHINE} ${WORKFS} \ 2901.1Stsutsui ${WORKDIR}/usr/mdec/${PRIMARY_BOOT} ${SECONDARY_BOOT_ARG} 2911.1Stsutsui.endif 2921.1Stsutsui @echo done. 2931.1Stsutsui mv ${WORKFS} ${.TARGET} 2941.1Stsutsui 2951.1Stsutsui# 2961.1Stsutsui# definitions to create image 2971.1Stsutsui# 2981.1Stsutsui.if ${USE_MBR} != "no" 2991.1StsutsuiDISKPROTO_IN?= ${DISTRIBDIR}/common/bootimage/diskproto.mbr.in 3001.1Stsutsui.else 3011.1StsutsuiDISKPROTO_IN?= ${DISTRIBDIR}/common/bootimage/diskproto.in 3021.1Stsutsui.endif 3031.1Stsutsui 3041.1StsutsuiOMIT_SWAPIMG?= no 3051.1Stsutsui 3061.1StsutsuiWORKMBR?= work.mbr 3071.1StsutsuiWORKSWAP?= work.swap 3081.1StsutsuiWORKLABEL?= work.diskproto 3091.1StsutsuiWORKIMG?= work.img 3101.1Stsutsui 3111.1StsutsuiCLEANFILES+= ${WORKMBR} ${WORKSWAP} 3121.1StsutsuiCLEANFILES+= ${WORKLABEL}.tmp ${WORKLABEL} 3131.1StsutsuiCLEANFILES+= ${WORKIMG} ${IMGBASE}.img 3141.1Stsutsui 3151.1Stsutsui${WORKLABEL}: 3161.1Stsutsui ${TOOL_SED} \ 3171.1Stsutsui -e "s/@@SECTORS@@/${SECTORS}/" \ 3181.1Stsutsui -e "s/@@HEADS@@/${HEADS}/" \ 3191.1Stsutsui -e "s/@@SECPERCYLINDERS@@/${SECPERCYLINDERS}/" \ 3201.1Stsutsui -e "s/@@CYLINDERS@@/${CYLINDERS}/" \ 3211.1Stsutsui -e "s/@@IMAGESECTORS@@/${IMAGESECTORS}/" \ 3221.1Stsutsui -e "s/@@FSSECTORS@@/${FSSECTORS}/" \ 3231.1Stsutsui -e "s/@@FSOFFSET@@/${FSOFFSET}/" \ 3241.1Stsutsui -e "s/@@SWAPSECTORS@@/${SWAPSECTORS}/" \ 3251.1Stsutsui -e "s/@@SWAPOFFSET@@/${SWAPOFFSET}/" \ 3261.1Stsutsui -e "s/@@BSDPARTSECTORS@@/${BSDPARTSECTORS}/" \ 3271.1Stsutsui < ${DISKPROTO_IN} > ${WORKLABEL}.tmp 3281.1Stsutsui mv ${WORKLABEL}.tmp ${WORKLABEL} 3291.1Stsutsui 3301.1Stsutsui${IMGBASE}.img: ${TARGETFS} ${WORKLABEL} 3311.1Stsutsui.if ${LABELSECTORS} != "0" 3321.1Stsutsui @echo creating MBR labels... 3331.1Stsutsui ${DD} if=/dev/zero of=${WORKMBR} seek=$$((${IMAGESECTORS} - 1)) count=1 3341.1Stsutsui ${TOOL_FDISK} -f -u \ 3351.1Stsutsui -b ${MBRCYLINDERS}/${MBRHEADS}/${MBRSECTORS} \ 3361.1Stsutsui -0 -a -s ${MBRNETBSD}/${FSOFFSET}/${BSDPARTSECTORS} \ 3371.1Stsutsui -i -c ${WORKDIR}/usr/mdec/mbr \ 3381.1Stsutsui -F ${WORKMBR} 3391.1Stsutsui ${DD} if=${WORKMBR} count=${LABELSECTORS} | \ 3401.1Stsutsui ${CAT} - ${TARGETFS} > ${WORKIMG} 3411.1Stsutsui.else 3421.1Stsutsui ${CP} ${TARGETFS} ${WORKIMG} 3431.1Stsutsui.endif 3441.1Stsutsui.if ${OMIT_SWAPIMG} == "no" 3451.1Stsutsui ${DD} if=/dev/zero of=${WORKSWAP} seek=$$((${SWAPSECTORS} - 1)) count=1 3461.1Stsutsui ${CAT} ${WORKSWAP} >> ${WORKIMG} 3471.1Stsutsui.endif 3481.1Stsutsui.if ${USE_SUNLABEL} != "no" 3491.1Stsutsui @echo Creating sun disklabel... 3501.1Stsutsui printf 'V ncyl %d\nV nhead %d\nV nsect %d\na %d %d/0/0\nb %d %d/0/0\nW\n' \ 3511.1Stsutsui ${CYLINDERS} ${HEADS} ${SECTORS} \ 3521.1Stsutsui ${FSOFFSET} ${FSCYLINDERS} ${FSCYLINDERS} ${SWAPCYLINDERS} | \ 3531.1Stsutsui ${TOOL_SUNLABEL} -nq ${WORKIMG} 3541.1Stsutsui.endif 3551.1Stsutsui ${TOOL_DISKLABEL} -R -F ${WORKIMG} ${WORKLABEL} 3561.1Stsutsui.if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} != "no" 3571.1Stsutsui ${TOOL_INSTALLBOOT} -vm ${MACHINE} ${WORKIMG} \ 3581.1Stsutsui ${WORKDIR}/usr/mdec/${PRIMARY_BOOT} 3591.1Stsutsui.endif 3601.1Stsutsui mv ${WORKIMG} ${.TARGET} 3611.1Stsutsui 3621.1Stsutsui 3631.1StsutsuiCLEANFILES+= ${IMGBASE}.img.gz ${IMGBASE}.img.gz.tmp 3641.1Stsutsui 3651.1Stsutsui${IMGBASE}.img.gz: ${IMGBASE}.img 3661.1Stsutsui ${TOOL_GZIP} -9c ${IMGBASE}.img > ${.TARGET}.tmp 3671.1Stsutsui mv ${.TARGET}.tmp ${.TARGET} 3681.1Stsutsui 3691.1Stsutsuiclean: 3701.1Stsutsui @if [ -d ${WORKDIR}/var/spool/ftp/hidden ]; then \ 3711.1Stsutsui ${CHMOD} +r ${WORKDIR}/var/spool/ftp/hidden; \ 3721.1Stsutsui fi # XXX 3731.1Stsutsui ${RM} -fr ${WORKDIR} 3741.1Stsutsui 3751.1Stsutsuiprepare_md_post: .PHONY 3761.1Stsutsuiimage_md_post: .PHONY 3771.1Stsutsuiimage_md_pre: .PHONY 3781.1Stsutsui 3791.1Stsutsui.include <bsd.prog.mk> 380