[BACK]Return to Makefile.minirootkmod CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / distrib / common

File: [cvs.NetBSD.org] / src / distrib / common / Makefile.minirootkmod (download)

Revision 1.3, Tue Aug 5 15:40:58 2014 UTC (6 years, 3 months ago) by apb
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, is-mlppp-base, is-mlppp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi
Changes since 1.2: +2 -2 lines

Use ${TOOL_GZIP_N} instead of ${TOOL_GZIP} -n, and similarly
use ${TOOL_GZIP_N} -9 instead of ${TOOL_GZIP} -9n, etc.

This will pass -nT instead of just -n if the gzip program is
actually pigz.

#	$NetBSD: Makefile.minirootkmod,v 1.3 2014/08/05 15:40:58 apb Exp $
# Makefile snippet to build a miniroot kernel module (e.g. miniroot.kmod)
# Required variables:
#	NETBSDSRCDIR	top level of src tree (set by <bsd.own.mk>)
# Optional variables:
#	MINIROOT	Basename of the kernel module to be created.
#			".kmod" will be appended to get the file name.
#			[default: miniroot]
#	RAMDISK		Basename of the ramdisk to be embedded in the
#			kernel module.  This is used as both a directory
#			name (${.CURDIR}/../ramdisks/${RAMDISK}) and
#			as a file name within the .OBJDIR of that
#			directory (${RAMDISK}.fs).  [default: ramdisk]

MINIROOT?=	miniroot
RAMDISK?=	ramdisk

.include <bsd.own.mk>
.include "${.PARSEDIR}/Makefile.distrib"

MKMAN=		no

# SRCMOD is a skeleton version of miniroot.kmod, without an embedded ramdisk.
# It should already have been created by "make install" in
# .../sys/modules/miniroot, and its name includes literal "miniroot",
# not variable ${MINIROOT}.
# DSTMOD is a copy of SRCMOD that is modified to include an embedded ramdisk.
# It will be created by rules in this Makefile.
# RAMDISKFS is the ramdisk image to be included inside DSTMOD.  It should
# already have been created by the Makefile in RAMDISKSRCDIR.
SRCMOD=		${DESTDIR}/stand/${MACHINE}/${MODULEVER}/modules/miniroot/miniroot.kmod

		${OBJCOPY} --add-section miniroot=${RAMDISKFS} \
		    --set-section-flags miniroot=alloc,contents,load,data \
		    ${SRCMOD} ${DSTMOD}.tmp
		${TOOL_GZIP_N} -9c < ${DSTMOD}.tmp > ${DSTMOD}
		rm -f ${DSTMOD}.tmp

.include <bsd.prog.mk>

release:	${PROG}