-
Notifications
You must be signed in to change notification settings - Fork 71
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
External packages #455
Open
gparmer
wants to merge
7
commits into
gwsystems:main
Choose a base branch
from
gparmer:external_packages
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
External packages #455
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8c96044
Updated Makefiles to pass along the make include path.
gparmer fdc8978
CPU burn component, and simple composition script on top of the composer
gparmer f041af4
TRANSIENT COMMIT
gparmer 1645b07
Added logic to drive component's compilation path and use github repos.
gparmer 115b8e4
External components can be pulled into the system.
gparmer ac3bf7a
merging with xinyu's code
gparmer 2a04983
VAS -> external merge
gparmer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[system] | ||
description = "Simple system running only a CPU-burn component." | ||
|
||
[[components]] | ||
name = "booter" | ||
img = "no_interface.llbooter" | ||
implements = [{interface = "init"}, {interface = "addr"}] | ||
deps = [{srv = "kernel", interface = "init", variant = "kernel"}] | ||
constructor = "kernel" | ||
|
||
[[components]] | ||
name = "burn" | ||
img = "no_interface.burn" | ||
deps = [{srv = "booter", interface = "init"}, {srv = "booter", interface = "addr"}] | ||
constructor = "booter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[system] | ||
description = "Test for the hello world external component" | ||
|
||
[[components]] | ||
name = "hw1" | ||
img = "" | ||
repo = "github:gparmer/hello_world" | ||
deps = [{srv = "kernel", interface = "init", variant = "kernel"}] | ||
constructor = "kernel" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Required variables used to drive the compilation process. It is OK | ||
# for many of these to be empty. | ||
# | ||
# The set of interfaces that this component exports for use by other | ||
# components. This is a list of the interface names. | ||
INTERFACE_EXPORTS = | ||
# The interfaces this component is dependent on for compilation (this | ||
# is a list of directory names in interface/) | ||
INTERFACE_DEPENDENCIES = | ||
# The library dependencies this component is reliant on for | ||
# compilation/linking (this is a list of directory names in lib/) | ||
LIBRARY_DEPENDENCIES = component | ||
# Note: Both the interface and library dependencies should be | ||
# *minimal*. That is to say that removing a dependency should cause | ||
# the build to fail. The build system does not validate this | ||
# minimality; that's on you! | ||
|
||
include Makefile.subsubdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <llprint.h> | ||
|
||
void | ||
cos_init(void) | ||
{ | ||
/* Burn all of the cycles! CPUs are glorified space heaters, right? */ | ||
printc("CPU cycle burn: component %ld, thread id %ld, core %d.\n", | ||
cos_compid(), cos_thdid(), cos_coreid()); | ||
|
||
while (1) ; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## CPU Burn Component | ||
|
||
A simple component that burns CPU cycles, nothing else. | ||
Can be used in test scenarios as background, CPU-intensive computations. | ||
|
||
### Description | ||
|
||
Simple infinite loop, nothing more. | ||
|
||
### Usage and Assumptions | ||
|
||
Only depends on the `init` interface, so it can be used anywhere from on top of the constructor, all the way to as a component under the scheduler. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!.gitignore | ||
!README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# External Repositories | ||
|
||
Composite current enables components to be defined externally from the main repo, thus providing increased autonomy in development. | ||
Each repository in this directory is pulled from github, and can contain a set of components and composition scripts. | ||
These repositories can be thought of as part of the Composite ecosystem, but not as part of the "standard library" of necessary functionalities. | ||
|
||
A number of awkward realities with the current system: | ||
|
||
- Composite does *not* maintain the repos downloaded here in any way. | ||
If the upstream repo is changed, you must manually do a `git pull` in the repo (or remove it so it is re-cloned). | ||
Comparably, if you update the external repo, you should manually commit/push, etc... | ||
- The Composite repo ignores all repos in here. | ||
Never add them. | ||
The proper course of action would be to do a PR to the main Composite repo adding your component instead. | ||
|
||
## TODO: Libraries and Interfaces | ||
|
||
It should be possible to also define libraries and interfaces in external repositories. | ||
This is more complicated as the dependencies for these are | ||
|
||
1. not properly maintained by the composer (libraries aren't properly rebuilt when one of their dependencies changed), and | ||
2. these dependencies are tracked by the build system, so updating them to enable dependencies are repositories requires most structural updates to the build system. | ||
|
||
There are no hard blockers to doing this; we just need more time and will! |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@betahxy Is this an error? Looks like this comes from a merge with your code. I might have done this incorrectly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gparmer This is OK. I'll add this back. Not a big problem.