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

lib/systems: Add Genode platform definitions #83292

Merged
merged 1 commit into from Mar 26, 2020
Merged

Conversation

@ehmry
Copy link
Member

@ehmry ehmry commented Mar 24, 2020

Motivation for this change

Genode is a post-UNIX operating system framework featuring capability-based security, user-mode drivers, and a kernel-agnostic system ABI. Genode can emulate enough of POSIX that a significant portion of Nixpkgs should work in theory. For demonstrations of Genode on x86 and ARM see the following recordings from FOSDEM'20: https://fosdem.org/2020/schedule/event/uk_sculpt/ https://fosdem.org/2020/schedule/event/uk_genode_armv8/.

This patchs adds the x86_64-genode and aarch64-genode systems to lib/systems. According to RFC0046 this will be a tier 7 platform, no support, just simple platform definitions. Adding definitions here allows toolchain and porting work to be done in overlays and flakes without relying on a pinned Nixpkgs revision. Even if it takes a long time to port packages over to platforms.genode having a cross stdenv is useful for native Genode development.

Porting Nix to Genode has been tried before, however I don't believe it is practical for the foreseeable future. It is however possible to build a Genode hypervisor system with NixOS guest VMs within a single expression, so cross-compilation is still useful.

Things done

I have a working LLVM toolchain and I'm building simple systems that I can boot on my laptop.
The toolchain overlay is at https://git.sr.ht/~ehmry/genodepkgs/tree/master/overlay/. I would like to upstream any LLVM patches I make, so I would prefer to keep the toolchain patches in an overlay until that happens or the situation changes.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@ehmry ehmry requested review from Ericson2314, matthewbauer and nbp as code owners Mar 24, 2020
@ehmry ehmry force-pushed the ehmry:tier7 branch from ad9d46b to 4491683 Mar 24, 2020
Add platform definitions for 64-bit ARM and x86. This is sufficient for
for building Genode where a toolchain is provided as an overlay.

Toolchain: git+https://git.sr.ht/~ehmry/genodepkgs?rev=14fc773ac9ecd2cbb30cb4612b284eee83d83546
@ehmry ehmry force-pushed the ehmry:tier7 branch from 4491683 to 9f91fa0 Mar 24, 2020
@ehmry ehmry requested review from edolstra and Infinisil as code owners Mar 24, 2020
@Ericson2314 Ericson2314 merged commit 3150fc9 into NixOS:master Mar 26, 2020
12 checks passed
12 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@ehmry
Copy link
Member Author

@ehmry ehmry commented Mar 26, 2020

@ehmry ehmry deleted the ehmry:tier7 branch Mar 26, 2020
@Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Mar 26, 2020

Yes I suppose so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.