On 21/09/21 15:46, Jose R. Ziviani wrote:
Alternatively, you could C-ify the contents of config-devices.mak, and embed
them in the per-arch modinfo-*.c; and record CONFIG_* symbols for each
module (e.g. '{ "CONFIG_QXL", "hw-display-qxl" }' from a
'module_config("CONFIG_QXL")' line in the global modinfo.c file. Then
before loading a module you do a binary search on the per-arch
config-devices array.
With a per-arch modinfo-*.c we don't even need a modinfo.c global, do
we?
Each target could be linked to its own modinfo-target.c only.
Yes, I suppose you don't need it. However, you may want to use
different Python scripts to generate modinfo-*.c (currently from
config-devices.mak only) and modinfo.c (from compile_commands.json and
various sources), so it may be handy to separate them.
Paolo