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

Microchip icicle kit platform support #165

Closed
wants to merge 1 commit into from
Closed

Microchip icicle kit platform support #165

wants to merge 1 commit into from

Conversation

gngram
Copy link
Contributor

@gngram gngram commented Jun 8, 2023

  • HardenOS1.0
  • Address sanitizer disabled
  • By default docker is disabled

@vilvo
Copy link
Contributor

vilvo commented Jun 8, 2023

Thanks a lot for your PR. We're in the process of enabling out of tree ghaf-configurations - which does not mean we could not merge this as RISC-V reference - so I'll share you the a recent outline for the ghaf structure development that has impact to the review of this PR. Please see the outline of coming ghaf changes below:
image

Given above, I'd like you to clarify if you want to introduce this target as new reference and maintain it.
If that's open, we could also consider this PR as candidate for out-of-tree ghaf configuration. There's recent template support for it available #164
Please let me know your view.

In the case of Icicle kit, Ghaf deployment contains of creating a SD Image which includes UBoot and Linux kernel from Microchip and Ghaf based NixOS rootfs:

1. To build Ghaf SD image:
Run the `nix build .#packages.riscv64-linux.mpfs-icicle-kit-release` command.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also instruct here to use the -debug target? Considering other reference targets, -release is of very limited usefulness. Also, all the possible debug channels (ssh|serial|..) should go to -debug-targets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added instructions to build image for debug target too.

flake.nix Show resolved Hide resolved
flake.nix Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This goes against ghaf reference configuration defined packages on host - that will be more minimal in the next phases. See https://tiiuae.github.io/ghaf/features/features.html#next-steps

As these are not essential to the configuration I'd propose two things:

  • please refactor this to a development module
  • make them user (ghaf) packages or packages for user passed passed as argument to the module. As systemPackages they are made available to all users (incl. root) which should be avoided.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried to use development modules, for package management need to discuss.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brianmcgillion and @mikatammi are in the process of refactoring the ghaf modules behind external API that is configurable instead of static as it has been. They merged a few modules just yesterday. See f9e49ec#diff-802221ea9e0a54520f90631da97263b93204b5dec385457827d48e34b001286bR16 for example.

/* Networking */
/* ========== */

networking.hostName = "ghaf-host";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be used from common definitions for reference configuration - see

networking.hostName = "ghaf-host";

Hardware specifics should not override / conflict / duplicate with the common networking.hostName - this will keep a ghaf system on different hardware more familiar for developers/users.

Copy link
Contributor Author

@gngram gngram Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created a new variant of networking.nix for such platforms which doesn't use vm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this should be tested by another person. We can come back to it when we've worked with the other structural changes I requested.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will push some commits with the structural changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, please squash (or --amend) the future commits in the branch into one and force push to your PR branch.

Please also note that there was automated nix fmt-check failing and should be fixed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And commits must be signed - see https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification
in addition to DCO Signed-off-by:
Branch protection will block unsigned commits from getting merged.

@@ -0,0 +1,16 @@
{pkgs, ... } :
{
environment.systemPackages = with pkgs; [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these come from stdenv and can be used in callPackage with whatever nix declared development packages. We should not put them to host and to systemPackages - who ever needs these can use specific nix-shell -p <package>or nix develop with flakes. Leaving them out will also reduce the image size and decrease build time.

Copy link
Contributor

@vilvo vilvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address questions and/or structural change requests.

flake.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@vilvo vilvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicating nixpkgs and nixos-hardware for all the targets is not a good idea.

+ HardenOS1.0
+ Address sanitizer disabled
+ By default docker is disabled

Signed-off-by: Ganga Ram <[email protected]>
@gngram gngram closed this by deleting the head repository Jun 29, 2023
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