|
From: | Paolo Bonzini |
Subject: | Re: [PATCH 1/2] meson: introduce modules_arch |
Date: | Thu, 23 Sep 2021 09:18:02 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |