Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move platform definitions to separate repositories #214

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

martinling
Copy link
Member

To simplify maintenance of the LUNA project, we'd like platform definitions to be kept in separate repositories going forward. The aim is to avoid having to update the LUNA package for every new platform, or platform change.

Platform definitions for Cynthion hardware have been added to the Cynthion repository, and @mndza is preparing a luna-boards repository to contain other board definitions for LUNA which are not currently maintained elsewhere.

Moving platform definitions out of the LUNA repository means that auto-detection of connected hardware will need to work differently to how it does currently. The approach implemented in this PR is that:

  1. The get_appropriate_platform function will look for the apollo_fpga module, and if it is present, check for an Apollo-based device.
  2. If an Apollo-based device is found, it will check for an APOLLO_PLATFORMS table in known modules, currently cynthion and luna_boards. If a corresponding platform is found, it will be used.
  3. In any other case, LUNA will require the LUNA_PLATFORM environment variable to be set to select a platform.

This approach is intended to be backwards-compatible with existing usage. It may be extended to support other autodetection methods, or other sources of platform definitions.

@martinling
Copy link
Member Author

Marking this as ready for review since the corresponding PRs have been merged to the Cynthion and luna-boards repos.

Platform definitions will now be kept in separate repositories.

Auto-detection will be used if the apollo_fpga module is present, and
the detected Apollo device is supported by the installed 'cynthion' or
'luna_boards' modules.

In all other cases, the LUNA_PLATFORM environment variable must be set
for get_appropriate_platform() to return a platform.
@miek miek merged commit 76d2eed into greatscottgadgets:main Jan 4, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants