All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: build config via DT names
@ 2018-02-10 15:52 Enrico Weigelt, metux IT consult
  2018-02-12 23:13 ` Frank Rowand
  0 siblings, 1 reply; 10+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2018-02-10 15:52 UTC (permalink / raw)
  To: linux-kernel

Hi folks,

I've regularily have the task of configuring a kernel for a given DT.
To make this a little bit easier, I'd like to do this automatically.

The tuff task here is getting a mapping between dt compatible strings
and corresponding CONFIG_* flags. Automatically extracting it from the
source code seems pretty tricky, especially w/ corner cases (eg. some
drivers support groups of devices, depending on config options) - IMHO
it will need some code changes anyways.

Therefore I propose a simple approach using the existing Kconfig system:

Add an extra (toplevel) menu and config flag naming scheme which
directly map DT compatible strings to config flags. For example:

 > fsl,mpc5200-gpio <=> CONFIG_DTDEV_FSL_MPC5200_GPIO

 > config CONFIG_DTDEV_FSL_MPC5200_GPIO
 >    tristate "fsl,mpc5200-gpio"
 >    select GPIO_MPC5200

Note that these flags are separate from the actual drivers - they just
enable them automatically. Of course they'll have to be maintained by
the driver maintainers.


What do you think about this idea ?


--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-02-13 16:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-10 15:52 RFC: build config via DT names Enrico Weigelt, metux IT consult
2018-02-12 23:13 ` Frank Rowand
     [not found]   ` <d55f95cc-228b-e65f-b46c-2f314f4fa582-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-12 23:24     ` Frank Rowand
2018-02-12 23:24       ` Frank Rowand
     [not found]       ` <52140da5-0d49-c861-d752-8de9e4927380-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-13 13:16         ` Enrico Weigelt, metux IT consult
2018-02-13 13:16           ` Enrico Weigelt, metux IT consult
2018-02-13 15:19     ` Rob Herring
2018-02-13 15:19       ` Rob Herring
     [not found]       ` <CAL_JsqJXJA+Z7b6SoUx=MVK_C=vcMRAibapriOi+Wss6L1ahsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-13 16:21         ` Enrico Weigelt
2018-02-13 16:21           ` Enrico Weigelt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.