diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-10-14 18:43:03 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-10-14 18:43:03 +0000 |
commit | 645eff3a855254a1fd4271016d679ddf41bda9b5 (patch) | |
tree | 0d9ce821aa8023f5b24efd533b7ba7701d8a6cb1 /sys/arch/armv7 | |
parent | 1f9195d8cf739e4124db4512200c8278bbda6957 (diff) |
Kernel builds now happen in compile/CONFIG/obj@ -> /usr/obj/... [or ./obj/,
if srctree is not rooted at /usr/src]. As a result, stock GENERIC & RAMDISK
kernels are commited to the tree, to ensure the src tree can be "readonly"
during builds, with all writes occuring inside the obj space. config -b
options are handled by ../Makefile.inc. The canonical new way to configure
one of these kernels is:
% cd /sys/arch/amd64/compile/GENERIC.MP
% doas make obj
% make config
% make
% doas cp obj/bsd /bsd
The build infrastructure will use this new mechanism in a de-escalation
way using BUILDUSER.
Much help from natano and tb.
Diffstat (limited to 'sys/arch/armv7')
-rw-r--r-- | sys/arch/armv7/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/armv7/compile/.cvsignore | 2 | ||||
-rw-r--r-- | sys/arch/armv7/compile/GENERIC/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/armv7/compile/Makefile | 8 | ||||
-rw-r--r-- | sys/arch/armv7/compile/Makefile.inc | 19 | ||||
-rw-r--r-- | sys/arch/armv7/compile/RAMDISK/Makefile | 1 | ||||
-rw-r--r-- | sys/arch/armv7/conf/Makefile.armv7 | 4 |
7 files changed, 34 insertions, 5 deletions
diff --git a/sys/arch/armv7/Makefile b/sys/arch/armv7/Makefile index 87b1e547b33..749b3d6025e 100644 --- a/sys/arch/armv7/Makefile +++ b/sys/arch/armv7/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2016/05/31 18:37:03 tedu Exp $ +# $OpenBSD: Makefile,v 1.5 2016/10/14 18:42:58 deraadt Exp $ S= ${.CURDIR}/../.. KFILE= GENERIC @@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags NOPROG= NOMAN= NOOBJ= -SUBDIR= stand +SUBDIR= stand compile # config the fattest kernel we can find into a temporary dir # to create a Makefile. Then use make to pull some variables diff --git a/sys/arch/armv7/compile/.cvsignore b/sys/arch/armv7/compile/.cvsignore deleted file mode 100644 index b72af3039e6..00000000000 --- a/sys/arch/armv7/compile/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -GENERIC -RAMDISK diff --git a/sys/arch/armv7/compile/GENERIC/Makefile b/sys/arch/armv7/compile/GENERIC/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/armv7/compile/GENERIC/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/armv7/compile/Makefile b/sys/arch/armv7/compile/Makefile new file mode 100644 index 00000000000..4f5fc1a4e9a --- /dev/null +++ b/sys/arch/armv7/compile/Makefile @@ -0,0 +1,8 @@ +# $OpenBSD: Makefile,v 1.1 2016/10/14 18:42:59 deraadt Exp $ + +.if make(obj) || make(clean) +SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \) +#SUBDIR=GENERIC RAMDISK +.endif + +.include <bsd.subdir.mk> diff --git a/sys/arch/armv7/compile/Makefile.inc b/sys/arch/armv7/compile/Makefile.inc new file mode 100644 index 00000000000..d79a8803ef2 --- /dev/null +++ b/sys/arch/armv7/compile/Makefile.inc @@ -0,0 +1,19 @@ +SYSDIR != cd ${.CURDIR}/../../../..; pwd +CONFDIR != cd ${.CURDIR}/../../conf; pwd + +.if ${.CURDIR} == ${.OBJDIR} +.PHONY: config +config: + @echo make obj required first >&2 + @false +.elif !exists(${OBJDIR}/Makefile) +.PHONY: config clean +config: + config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T} + +clean: + +.endif + +.include <bsd.obj.mk> + diff --git a/sys/arch/armv7/compile/RAMDISK/Makefile b/sys/arch/armv7/compile/RAMDISK/Makefile new file mode 100644 index 00000000000..01b5f23410c --- /dev/null +++ b/sys/arch/armv7/compile/RAMDISK/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/sys/arch/armv7/conf/Makefile.armv7 b/sys/arch/armv7/conf/Makefile.armv7 index 6cf7f820a8a..9fc0d03bda8 100644 --- a/sys/arch/armv7/conf/Makefile.armv7 +++ b/sys/arch/armv7/conf/Makefile.armv7 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.armv7,v 1.14 2016/09/24 19:13:03 kettenis Exp $ +# $OpenBSD: Makefile.armv7,v 1.15 2016/10/14 18:43:01 deraadt Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -131,6 +131,8 @@ lint: ${CFILES} ioconf.c param.c | \ grep -v 'static function .* unused' +obj: + depend: @touch $@ |