-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(system-cfg): Add a global system configuration package #10
Conversation
This recipe assigns atf and u-boot as its dependencies forcing their builds through their own recipes. During the installPhase, this recipe copies the binaries generated to proper directory. Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
This recipe assigns openSBI as its dependency forcing its build through its own recipe. During the installPhase, this recipe copies the binaries generated to proper directory. Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
This looks good. I have just made a few adjustments for clarity and coherence: This LGTM. I have only two comments regarding this PR:
|
re: @Diogo21Costa 1: My idea behind the naming was that the recipe would encompass more than platform-related attributes. As it stands, it currently receives and outputs the directories for the bao-tests repo and test sources, which are not tied to the platform. However, I do agree that the proposed name might not be the best. 2: The firmware being on the PR is a mistake of mine. We should discuss in the #9 . Nonetheless, I disagree with the creation of more directories. Wher would you put the u-boot, atf and openSBI packages on your directory tree? I think it is a much cleaner and scalable solution to have a single .nix file per platform under the firmware folder. The package link (firmware/$platform) clearly identifies what it contains and for what target. The remaining packages (u-boot, atf, openSBI, etc) have their own folder. Lastly, I don't think you have any firmware tied to architecture. Maybe only the toolchain. And further separating the recipes would increase the complexity of the system. |
Ok, now I see. It makes sense to me now. What do you think about changing the naming to something like
Crystal clear to me now! Moreover, I agree with this struct. |
This recipe is based on the already existing platforms recipe. Ideally, in the future, the platform recipe is removed. Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
Include the directory for bao-tests and tests sources to the global system configurations. Currently, the baremetal patch is also as a configuration but it will be remove from the framework in the future. Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
97ba5eb
to
ca88f13
Compare
I've updated the PR to use your suggest naming. |
PR Description
This PR attempts to create a configuration file that concentrate the majority of system configurations used by throughout all packages. These include: platform, toolchain, architecture name, path directories to the test sources and repos, among others.
The main goal of this PR is to decrease the verbose in the several package recipes as well as improving the readability and development of system recipes (default.nix).
The following code is required in the default.nix being built.
It allows for the calling of packages to be done with less inputs, which were often repeated. Using a guest package as an example. It inherits the system-cfg attribute from the recipe which contains the attributes that were previously inputs. (e.g. bao-tests, tests_srcs, baremetal_patch).
It also allows the recipe to be written with less verbose, using the attributes available in the system-cfg. The following example ilustrates how the attributtes are intended to be used, without requiring the recipe to use the previous dictionaries to decipher which is the architecture and toolchain names.
Considerations
I'm opening this PR as a draft, hoping to invite some discussion and insights.
P.S.: please ignore the 3 first commits. These belong to #9 . And this PR assumes that #9 is accepted