Date: Wed, 30 Aug 2017 01:09:38 +0200 From: Jan Beich <jbeich@FreeBSD.org> To: Johannes M Dieterich <jmd@freebsd.org> Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, Jung-uk Kim <jkim@freebsd.org>, ports-committers@freebsd.org Subject: Re: svn commit: r448928 - in head/graphics: . drm-next-kmod Message-ID: <fuca-t1hp-wny@FreeBSD.org> In-Reply-To: <4lsq-vvzq-wny@FreeBSD.org> (Jan Beich's message of "Wed, 30 Aug 2017 00:40:09 %2B0200") References: <20170829205351.Horde.cJ-BkOZLFgXWSRXmqFSiczx@www.poelloepaeae.de> <4lsq-vvzq-wny@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jan Beich <jbeich@FreeBSD.org> writes: > Johannes M Dieterich <jmd@freebsd.org> writes: > >> Jung-uk Kim =E2=80=93 Tue., 29. August 2017 16:46 >>> On 08/29/2017 13:13, Jan Beich wrote: >>> > Johannes M Dieterich <jmd@FreeBSD.org> writes: >>> >=20 >>> >> Author: jmd >>> >> Date: Tue Aug 29 16:32:19 2017 >>> >> New Revision: 448928 >>> >> URL: svnweb.freebsd.org/changeset/ports/448928 >>> >> >>> >> Log: >>> >> New port: graphics/drm-next-kmod. >>> > [...] >>> >> +USES=3D kmod uidfix >>> >=20 >>> > Fails to build if SRC_BASE !=3D /usr/src. With SRCTOP undefined the p= ort >>> > relies on /sys symlink existing and pointing to a real location. The >>> > latter conflicts with $SRC_BASE/etc/Makefile hardcoding "usr/src/sys". >>> >=20 >>> > Maybe add MAKE_ENV =3D SRCTOP=3D"${SRC_BASE}" to fix the following. >>> >=20 >>> > $ make DISABLE_MAKE_JOBS=3D >>> > =3D=3D=3D> Building for drm-next-kmod-g20170825 >>> > =3D=3D=3D> drm (all) >>> > Warning: Object directory not changed from original >>> > /usr/ports/graphics/drm-next-kmod/work/kms-drm-4ee5acb/drm >>> > =3D=3D=3D> amd (all) >>> > make[3]: >>> > "/usr/ports/graphics/drm-next-kmod/work/kms-drm-4ee5acb/amd/Makefile" >>> > line 3: Cannot open /sys/conf/kern.opts.mk >>> > make[3]: Fatal errors encountered -- cannot continue >>> > make[3]: stopped in /usr/ports/graphics/drm-next-kmod/work/kms-drm-4e= e5acb/amd >>> > *** Error code 1 >> >> ... my understanding is that for kmods we require /usr/src? > > Custom base system source location when building kernel modules has been > supported for a long time, probably as long as non-root builds. Before > SRC_BASE existed such ports usually relied on SYSDIR directly which > is defined by bsd.kmod.mk. > >> I checked with kwm and he pointed out that people not >> running /non-usr/src systems should set SRC_BASE properly in their >> Mk/Uses/kmod.mk (I haven't tested this). > > I have both SRC_BASE and SYSDIR defined via environment. No issues with > other -kmod ports for >5 years. > > Did you miss that this port doesn't respect SRC_BASE at all? Why not get rid of SRC_BASE unnecessary abstraction in the vendor source? kern.opts.mk is already included by <bsd.kmod.mk>, so doing so manually and from the top-level Makefile is of dubious benefit. $ fgrep -r SRC_BASE /usr/share/mk Exit 1 =2D-- Makefile.orig 2017-08-23 00:35:05 UTC +++ Makefile @@ -1,9 +1,5 @@ # $FreeBSD$ =20 =2DSYSDIR?=3D${SRC_BASE}/sys =2D =2D.include "${SYSDIR}/conf/kern.opts.mk" =2D SUBDIR=3D drm \ amd \ i915 \ @@ -19,7 +15,10 @@ SUBDIR=3D drm \ # WARNING: THIS WILL CHANGE THE SOURCE TREE! ONLY USE IF THERE ARE NO OTH= ER # CHANGES THAT NEED TO BE RECOVERED! # +.if make(drm2-debug-source-changes) +SYSDIR?=3D /usr/src/sys # set by <bsd.kmod.mk> otherwise DRM_DEBUG_EXCLUDES=3D drm_mipi_dsi|drm_panel|linux_hdmi|ttm/ttm_object +.endif drm2-debug-source-changes: find ${SYSDIR}/dev/drm -name '*.[ch]' | \ egrep -v '(${DRM_DEBUG_EXCLUDES}).c' | \ =2D-- amd/Makefile.orig 2017-08-23 00:35:05 UTC +++ amd/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ =20 =2D.include "${SRCTOP}/sys/conf/kern.opts.mk" +.include "${SYSDIR}/conf/kern.opts.mk" =20 .if ${MACHINE_CPUARCH} =3D=3D "amd64" _amdgpu=3D amdgpu =2D-- amd/amdgpu/Makefile.orig 2017-08-23 00:35:05 UTC +++ amd/amdgpu/Makefile @@ -135,7 +135,7 @@ SRCS=3D amdgpu_acpi.c \ =20 CFLAGS+=3D -I${.CURDIR:H:H}/linuxkpi/dummy/include CFLAGS+=3D -I${.CURDIR:H:H}/linuxkpi/gplv2/include =2DCFLAGS+=3D -I${SRC_BASE}/sys/compat/linuxkpi/common/include +CFLAGS+=3D -I${SYSDIR}/compat/linuxkpi/common/include =20 CFLAGS+=3D -I${.CURDIR:H:H}/include CFLAGS+=3D -I${.CURDIR:H:H}/include/drm =2D-- amd/amdkfd/Makefile.orig 2017-08-23 00:35:05 UTC +++ amd/amdkfd/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ =20 =2D#.PATH: ${SRCTOP}/sys/dev/drm/amd/amdkfd +#.PATH: ${SYSDIR}/dev/drm/amd/amdkfd =20 KMOD =3D amdkfd =20 @@ -36,7 +36,7 @@ SRCS =3D \ =20 CFLAGS+=3D -I${.CURDIR:H:H}/linuxkpi/dummy/include CFLAGS+=3D -I${.CURDIR:H:H}/linuxkpi/gplv2/include =2DCFLAGS+=3D -I${SRC_BASE}/sys/compat/linuxkpi/common/include +CFLAGS+=3D -I${SYSDIR}/compat/linuxkpi/common/include =20 CFLAGS+=3D -I${.CURDIR:H:H}/include CFLAGS+=3D -I${.CURDIR:H:H}/include/drm =2D-- drm/Makefile.orig 2017-08-23 00:35:05 UTC +++ drm/Makefile @@ -83,7 +83,7 @@ SRCS=3D ati_pcigart.c \ =20 CFLAGS+=3D -I${.CURDIR:H}/linuxkpi/dummy/include CFLAGS+=3D -I${.CURDIR:H}/linuxkpi/gplv2/include =2DCFLAGS+=3D -I${SRC_BASE}/sys/compat/linuxkpi/common/include +CFLAGS+=3D -I${SYSDIR}/compat/linuxkpi/common/include CFLAGS+=3D -I${.CURDIR} CFLAGS+=3D -I${.CURDIR}/ttm CFLAGS+=3D -I${.CURDIR:H}/include =2D-- i915/Makefile.orig 2017-08-23 00:35:05 UTC +++ i915/Makefile @@ -93,7 +93,7 @@ CLEANFILES+=3D ${KMOD}.ko.full ${KMOD}.ko.debug =20 CFLAGS+=3D -I${.CURDIR:H}/linuxkpi/dummy/include CFLAGS+=3D -I${.CURDIR:H}/linuxkpi/gplv2/include =2DCFLAGS+=3D -I${SRC_BASE}/sys/compat/linuxkpi/common/include +CFLAGS+=3D -I${SYSDIR}/compat/linuxkpi/common/include =20 CFLAGS+=3D -I${.CURDIR:H}/include CFLAGS+=3D -I${.CURDIR:H}/include/drm =2D-- lindebugfs/Makefile.orig 2017-08-23 00:35:05 UTC +++ lindebugfs/Makefile @@ -9,6 +9,6 @@ SRCS=3D vnode_if.h \ =20 CFLAGS+=3D -I${.CURDIR}/../linuxkpi/dummy/include CFLAGS+=3D -I${.CURDIR}/../linuxkpi/gplv2/include =2DCFLAGS+=3D -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+=3D -I${SYSDIR}/compat/linuxkpi/common/include =20 .include <bsd.kmod.mk> =2D-- linuxkpi/Makefile.orig 2017-08-23 00:35:05 UTC +++ linuxkpi/Makefile @@ -37,7 +37,7 @@ CFLAGS+=3D -include ${.CURDIR}/../drm/drm_os_config.h CFLAGS+=3D -I${.CURDIR}/../include CFLAGS+=3D -I${.CURDIR}/dummy/include CFLAGS+=3D -I${.CURDIR}/gplv2/include =2DCFLAGS+=3D -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+=3D -I${SYSDIR}/compat/linuxkpi/common/include CFLAGS+=3D '-DKBUILD_MODNAME=3D"${KMOD}"' =20 .include <bsd.kmod.mk> =2D-- radeon/Makefile.orig 2017-08-23 00:35:05 UTC +++ radeon/Makefile @@ -113,7 +113,7 @@ SRCS=3D atom.c \ =20 CFLAGS+=3D -I${.CURDIR:H}/linuxkpi/dummy/include CFLAGS+=3D -I${.CURDIR:H}/linuxkpi/gplv2/include =2DCFLAGS+=3D -I${SRC_BASE}/sys/compat/linuxkpi/common/include +CFLAGS+=3D -I${SYSDIR}/compat/linuxkpi/common/include =20 CFLAGS+=3D -I${.CURDIR:H}/include CFLAGS+=3D -I${.CURDIR:H}/include/drm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQF8BAEBCgBmBQJZpfQyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3b3BAIANEuAVCugHe22AfG8hA3cVFy fbqvRguxr1ixjX9DJ13lhtQCs5Nv6COUwRdzzJbzQwI56Q6uOKy6cMlri8Uj06CE 4Wtw4BLg3l60/v4N4Jgz3BCqjhYJwvqgiHBrZ2glGFFZqU7g6wG7dcmuhbWGPlWV ZECAlKnqJMgHYAn264iTb8PHnat7eiZrfzREEpF4JvauqJydIALLOFMggeBAtiW8 dCdDhJLb5IaYgvBcmnhAVYHIdyfbFmIiIpQgUhWwjU0TLF16o6oo+dfdJ5ixKs/M fxe/6PN/ZgbcEugKG20x7i85DvbVMHfWwXk2l3SrX2soPGUwuoTMNWm01PwRQbw= =nM9o -----END PGP SIGNATURE----- --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fuca-t1hp-wny>