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

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Theron Tarigo
On 2019-08-14 11:04, Ian Lepore wrote:

> I can't understand what you guys are not-understanding.  New machinery
> has been added that says "if some module source code exists in this
> absolute fixed location on the build machine, then whenever you do any
> kernel build for any OS version or any arch, rebuild that module source
> code so that the the build machine's video drivers stay in sync with
> the build machine's kernel."
>
> Do you not see that for some of us, only a tiny fraction of the builds
> done (maybe none of them at all) involve the kernel for the build host
> machine or the video drivers for the build host machine?  And yet, for
> us, every build we do will now inapppropriately rebuild this video
> driver module which has nothing to do with the machine the build is
> targeting.
Most of the kernel builds I do _are_ for the host machine, yet I don't
want the new behavior either.  Why?  The build logic of the source tree
should be self-contained and easily understandable. Looking all over the
system and trying to automate fixes is what ports are for.

Automated hacks for this sort of situation, that do the right thing 90%
of the time but inevitably break down on other perfectly reasonable use
cases, are one of the factors that pushed me away from the operating
systems I used before FreeBSD.

Managing the host's kernel and needed modules from source from a single
tool certainly is useful, but I think it should be just that: a tool,
used when appropriate, not a default behavior.
This tool can be recommended to kmod port users/developers for local
system work while everyone else may continue using source tree as expected.

On 2019-08-14 11:06, Kyle Evans wrote:
> LOCAL_MODULES="" does seem like a sensible default when we're not
> building a native kernel.
More generally there should be a switch for defeating any and all
attempts to use anything "local" (non /usr/src).

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Daniel Eischen

> On Aug 14, 2019, at 6:59 PM, Steve Kargl <[hidden email]> wrote:
>
>> On Wed, Aug 14, 2019 at 06:40:28PM -0400, Daniel Eischen wrote:
>> I've lost the original thread, but would the sources in
>> /usr/local/sys/modules get built regardless of what
>> MAKEOBJDIRPREFIX is?  And, now that sources may be installed
>> by a port, what is the method for _just_ updating the sources?
>> Why do I even need to build and install the port?  Personally,
>> I would just rather have the drm-kmod sources just imported
>> into base and maintained there.
>
> You're joking right?  

Not fully, no.

> You remember drm and drm2 (aka drm-legacy-kmod).

Yes, I remember them.

--
DE
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Piotr Kubaj-6
In reply to this post by Theron Tarigo
Is it then possible to introduce another option - install only drm-kmod sources and don't build a module, so that a user that builds a new kernel often can build when he chooses to?

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Rozhuk Ivan-2
In reply to this post by Theron Tarigo
On Fri, 16 Aug 2019 16:32:18 -0700 (PDT)
"Rodney W. Grimes" <[hidden email]> wrote:

> > > >> > I've lost the original thread, but would the sources in    
> > > >/usr/local/sys/modules get built regardless of what
> > > >MAKEOBJDIRPREFIX is?  And, now that sources may be installed by
> > > >a port, what is the method for _just_ updating the sources?  Why
> > > >do I even need to build and install the port?  Personally, I
> > > >would just rather have the drm-kmod sources just imported into
> > > >base and maintained there.  If I have 2 or more different
> > > >checked out base src trees, how do I get the correct drm-kmod to
> > > >go with them if there is only one /usr/local/sys/modules?  Do I
> > > >need multiple port trees just to pull in out of tree module
> > > >sources?    
> > > >>
> > > >> In some ways, installing sources for DRM is a compromise for
> > > >> the fact    
> > > >that we    
> > > >> can't have DRM in the base source anymore (for various
> > > >> reasons).    
> > > >However,    
> > > >> virtualbox is also probably in that camp as well.    
> > > >
> > > >I applaud this effort to provide a source compile mode for DRM,
> > > >but I think it has come up a bit short on execution with
> > > >numorious problems sited.
> > > >
> > > >I too am not real happy that /usr/local/src is going to get
> > > >automatically invoked from my some odd 10+ src trees that
> > > >are of various WIP's.  I need a way to easily disable this
> > > >both on a global scale, and on a per src tree way.
> > > >
> > > >Rather than a default to on with an opt out mechanism perhaps
> > > >while we gain experience change this to a default to off with
> > > >an opt in mechanism?
> > > >
> > > >Sadly I do not have proposed solution, but something better
> > > >than what is there now needs to be found.
> > > >
> > >
> > > Could we have a .src.conf in the root of the tree to configure
> > > this on a tree by tree basis?
> > >
> > >  
> >
> >
> > I use better way:
> > /etc/make.conf:  
>
> That file is global to all src trees,
> so that does not achive the desired effect.

You can override this using
env __MAKE_CONF=PATH_TO_MAKE.CONF SRCCONF=PATH_TO_SRC.CONF


> > # Modules to build with kernel.
> > PORTS_MODULES+= graphics/drm-fbsd12.0-kmod
> > graphics/gpu-firmware-kmod  
>
> Can we some how trigger that from either a kernel conf file,
> or at least on a per src tree basis?  Ala cy's .src.conf?

I dont know, never use it.

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

John Baldwin
In reply to this post by Theron Tarigo
On 8/16/19 2:51 PM, Rodney W. Grimes wrote:

>> On 8/14/19 3:40 PM, Daniel Eischen wrote:
>>> I've lost the original thread, but would the sources in /usr/local/sys/modules get built regardless of what MAKEOBJDIRPREFIX is?  And, now that sources may be installed by a port, what is the method for _just_ updating the sources?  Why do I even need to build and install the port?  Personally, I would just rather have the drm-kmod sources just imported into base and maintained there.  If I have 2 or more different checked out base src trees, how do I get the correct drm-kmod to go with them if there is only one /usr/local/sys/modules?  Do I need multiple port trees just to pull in out of tree module sources?
>>
>> In some ways, installing sources for DRM is a compromise for the fact that we
>> can't have DRM in the base source anymore (for various reasons).  However,
>> virtualbox is also probably in that camp as well.
>
> I applaud this effort to provide a source compile mode for DRM,
> but I think it has come up a bit short on execution with numorious
> problems sited.

Do you have a reported problem vs a theoretical problem?  The
only reported problem I've seen is that LOCAL_MODULES="" doesn't
work.  That and Cy reported a build error from a recent commit to
head due to LOCAL_MODULES working as intended.

> I too am not real happy that /usr/local/src is going to get
> automatically invoked from my some odd 10+ src trees that
> are of various WIP's.  I need a way to easily disable this
> both on a global scale, and on a per src tree way.

Modulo the LOCAL_MODULES="" not working (you have to just use
LOCAL_MODULES=) this already exists.  You can set it in
/etc/src.conf, in a kernel config, or on the command line.

> Rather than a default to on with an opt out mechanism perhaps
> while we gain experience change this to a default to off with
> an opt in mechanism?

It's head, not stable.  We can't gain experience with something
that isn't turned on.

--
John Baldwin
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

John Baldwin
In reply to this post by Theron Tarigo
On 8/16/19 5:33 PM, Rozhuk Ivan wrote:

> On Fri, 16 Aug 2019 17:23:08 -0700
> John Baldwin <[hidden email]> wrote:
>
>>> I use better way:
>>> /etc/make.conf:
>>> # Modules to build with kernel.
>>> PORTS_MODULES+= graphics/drm-fbsd12.0-kmod
>>> graphics/gpu-firmware-kmod  
>>
>> This doesn't work for folks who use pre-built packages.
>>
>
> I update mine /usr/src via rsync from other mine server, so any
> changes made by port or me or ... will lost.
>
> Probably there is must be some solution like special folder where
> ports can store some file with port name, that automaticly go to
> PORTS_MODULES on build kernel.
> And probably pkg can do with this something for "folks who use pre-built packages".

That is what this framework does.  Ports install a Makefile to
/usr/local/sys/modules/<packagename>/Makefile.  That makefile is invoked during
the 'modules' stages of buildkernel and installkernel.  In the case of
drm-current-kmod, the port installs sources into subdirectories of
/usr/local/sys/modules/drm-current-kmod and installs a top-level Makefile
in /usr/local/sys/modules/drm-current-kmod/Makefile that uses bsd.subdir.mk
to recurse into those subdirectories.

Currently, LOCAL_MODULES is automatically populated to a list of the
directories in /usr/local/sys/modules and the debate is about when
LOCAL_MODULES should be auto-populated or not.

--
John Baldwin
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"