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

Abstract away board and toolchain details #216

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wom-bat
Copy link
Contributor

@wom-bat wom-bat commented Aug 26, 2024

Put the common bits in a makefile snippet.

Put the common bits in a makefile snippet.

Signed-off-by: Peter Chubb <[email protected]>
@wom-bat wom-bat marked this pull request as draft August 26, 2024 05:26
@wom-bat
Copy link
Contributor Author

wom-bat commented Aug 26, 2024

Is this a good idea?

@Ivan-Velickovic
Copy link
Collaborator

I don't think it's worse like this but I'm not sure if it's an improvement either.

Having the toolchain extracted makes more sense than the boards I think.

There is a bit of duplication with the boards in each example but it's really simple, just for the device classes.

@Kswin01
Copy link
Contributor

Kswin01 commented Aug 26, 2024

I think that it is a good improvement imo. Especially when we change names of devices to their proper names (like meson eth changing to dwmac4.20), or have devices with peripherals of completely different names (like the star64 with snps-uart, dwmac5.1 eth), just having a central config for that specific board will be easier for users.

But that's more from the perspective of LionsOS, where the tooling will eventually deal with all of this. After discussing with Ivan, maybe the board abstractions don't necessarily belong in the sDDF.

@wom-bat
Copy link
Contributor Author

wom-bat commented Aug 26, 2024

But that's more from the perspective of LionsOS, where the tooling will eventually deal with all of this. After discussing with Ivan, maybe the board abstractions don't necessarily belong in the sDDF.

I was mostly thinking about this for LionsOS, but would like to have the same mechanism everywhere, and this seemed the right place to start.
I'm also thinking, that maybe it should be in a separate configuration/build system tree. Except I hate multiplying the number of submodules we need.

@Ivan-Velickovic
Copy link
Collaborator

I guess I don't really know what problem we're trying to solve? Why is the current approach inadequate?

@Ivan-Velickovic
Copy link
Collaborator

I guess I don't really know what problem we're trying to solve? Why is the current approach inadequate?

What I mean by this is that the simpler approach seems fine for sDDF example systems and the abstraction is probably better left solely to LionsOS.

@wom-bat
Copy link
Contributor Author

wom-bat commented Aug 26, 2024

I guess I don't really know what problem we're trying to solve? Why is the current approach inadequate?

What I mean by this is that the simpler approach seems fine for sDDF example systems and the abstraction is probably better left solely to LionsOS.

I'm not sure the current approach is scalable to many many boards. Merely including a board description file, rather than repeating a huge if-then-else chain means:

  • Adding new boards to an existing project is easier (although one still has to create the system file)
  • Modifying a board's config (e.g., switching qemu_virt_aarch64 to use Cortex A76 instead of A53) can be done in one place and tested for all examples
  • documenting the board's components is in one place, rather than spread through multiple examples
  • It's much easier to generate the makefiles, assuming the LionsOS config tool will do that.

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.

3 participants