ARM-software / devlib

Library for interaction with and instrumentation of remote devices.
Apache License 2.0
45 stars 77 forks source link

Integrate buildroot and add support for QEMU Linux target #667

Closed metin-arm closed 4 months ago

metin-arm commented 6 months ago

Commits:

setrofim commented 6 months ago

This should probably be implemented as a Platform rather than a Target, as this handles "hardware" rather than OS-level functionality; And that way, the same code can be used for Android targets running on QEMU as well.

douglas-raillard-arm commented 5 months ago

@setrofim I'm not sure platform would be appropriate either, we want an object that starts its life before the Target and survives after. Platform seems to be more for managing platform-specific interaction with a device (such as rebooting) more than spawning the device itself.

setrofim commented 5 months ago

we want an object that starts its life before the Target and survives after

A Platform is passed a a parameter on Target creation, so it is already assumed to exist before the Target (only if one is not provided, the Target will then create a "default" one). And the Target doesn't do anything to "terminate" a Platform, so there is no reason why the latter can't persist after the former stopped existing.

Platform seems to be more for managing platform-specific interaction with a device (such as rebooting) more than spawning the device itself.

Only because a device is not normally "spawned". However the interactions can include the initial target setup prior to execution (e.g. flashing images -- see VExpress platform). Support for Gem5 simulation (conceptually similar to QEMU) is implemented as a Platform and that includes optionally starting the simulation.

metin-arm commented 3 months ago

@douglas-raillard-arm, https://github.com/ARM-software/devlib/pull/677 is filed to address your comments except open questions here.