Date: Wed, 14 Aug 2019 10:22:17 -0700 From: John Baldwin <jhb@FreeBSD.org> To: Theron <theron.tarigo@gmail.com>, x11@freebsd.org Subject: Re: HEADSUP: drm-current-kmod now installs sources Message-ID: <f4aa3766-ee02-2558-4d39-069828f0d923@FreeBSD.org> In-Reply-To: <43f89238-bf40-0339-e21e-3a1777d9b431@gmail.com> References: <67ca217f-b7de-8707-c4de-51e3f895d06f@FreeBSD.org> <bee728a59abb033657a20de4e716698fb2b1c927.camel@freebsd.org> <b2951cc6-e5e8-6c14-6368-41d51f949011@FreeBSD.org> <43f89238-bf40-0339-e21e-3a1777d9b431@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8/14/19 9:38 AM, Theron wrote: > On 2019-08-14 09:08, John Baldwin wrote: >> 1) You can set LOCALBASE to a different path either in a kernel config >> (via makeoptions) or when invoking buildkernel. >> >> For example, I mount my rpi's sdcard at /mnt on my amd64 laptop and >> then cross-build into it, so I could set LOCALBASE to /mnt/usr/local when >> building the rpi's kernel to honor any kmod packages installed on the rpi. > > Normally LOCALBASE is interpreted by ports as the default for PREFIX, > meaning it should be a path _within_ the target system, not the path to > where it is mounted. There is DESTDIR for that. Now for kernel build > this is not a problem for the reason that LOCALBASE is being used just > to find sources, not to build ports. However, given how that variable > is normally used, it seems like a problem waiting to happen. It would > be better to use a variable specific to the purpose at hand. LOCALBASE is used in various other non-ports Makefiles to find things installed by ports/packages. There is in fact another variable I failed to mention (LOCAL_MODULES_DIR which defaults to LOCALBASE/sys/modules) and one could set that instead of LOCALBASE for the /mnt case. >>> How about when I'm doing a build of 11-stable for testing, but what's >>> in my /usr/local is sources for a 13-current driver? >> Given that the kmod's are supposed to be portable across branches, >> the build really shouldn't be breaking. But the same ability is still >> there to as above to disable builds either in general or for >> specific kernel configs or buildkernel invocations. > > The concern appears to be that there is no longer a clear way to > separate what base source tree does from what is in the local system's > configuration. Is there any one single knob to tell /usr/src not to use > any configuration from /usr/local? As I said, you can set LOCAL_MODULES="" in /etc/src.conf if you want a global knob, or you can set it with smaller granularity in either a kernel config or on the command line. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f4aa3766-ee02-2558-4d39-069828f0d923>