devlib icon indicating copy to clipboard operation
devlib copied to clipboard

`Module` configuration/installation issues

Open marcbonnici opened this issue 6 years ago • 1 comments

We currently have no method of specifying dependencies for modules, this can result in them failing to initialise due to an incorrect ordering. Therefore we need to introduce a dependency mechanism to determine if a required module is going to be installed at a later time or whether an error needs to be thrown.

Another issue is there are currently multiple ways of supplying configuration for a module which can conflict. For example a flashing module can be partially configured via the Platform and via user entered module configuration and the priority of which configuration is not clear.

marcbonnici avatar Nov 28 '19 16:11 marcbonnici

FWIW the problem is somewhat solved in LISA by loading them on demand whenever the attribute is accessed: https://github.com/ARM-software/lisa/blob/master/lisa/target.py#L340

This could also be easily exposed on a dedicated proxy object like target.lazy_module.sched in case you want to preserve target.sched behavior.

Note that this won't solve problems across module types, in case they need to be initialized in more than one batch (like if a regular module that wants to depend on a setup module, since the setup module would need to be initialized way earlier).

douglas-raillard-arm avatar Dec 27 '19 11:12 douglas-raillard-arm