Re: HEADSUP: drm-current-kmod now installs sources

John Baldwin <[email protected]>
Newsgroups gmane.os.freebsd.devel.x11
Message-ID <[email protected]>
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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.