AUTOLOAD module depending on target

I'd like to autoload a module, but only for a single device. I know there is a autoload/autoprobe function available, but I can't seem to find a way to use it depending on the device. is there any way to load a module automatically if it's selected for a device, but not for another?

Do it manually based on MAC?

Thanks for your input, but what I wanted to do is something different. So let me explain again, maybe a little less abstract:

I want to autoload a module (g_ether in this case) for all the raspberry pi zero devices. This will not be in my home setup (I know how to do that), but upstream, because I think the device support for the zeros is a bit lacking here. So I have multiple options to do that: just declare g_ether an autoload module in general for all devices (would probably be ok), or, even better: just make it autoload for the raspberry pi zero. So what I'm asking for here is a way for the second option.

are you talking about image creation or dynamic runtime loading? (are you expecting early boot support for the module?)

is there any existing precedent or guidance from upstream?

would create a real ship-storm... and definately wont be ok...

I couldn't find any precedent in upstream, that's why I'm asking here. However, it's totally possible I just missed something obvious. I'm not requiring early boot support, and entry in /etc/modules.d/ would be enough.

ok... in this case my 2c...

at best you are looking at

  1. buildtime (default-off~togglable) enablement (semi-impractical unless you break out that board to it's own definition)
  2. userspace enablement

(cant really see a seperate/sub-board only for this nor 'majority' favour out of the box)

i'd suggest to you an (init.d) package or pr that implements a particular g_ based on gpio-jumpers (and/or config/PACKAGE options/s) this would also lend itself to the whole target if not more...