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
Contributor

@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.

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
Copy link
Contributor Author

ehmry commented Mar 26, 2020

Shall we move forward with creating a @NixOS/exotic-platform-maintainers team?

https://github.com/NixOS/rfcs/blob/master/rfcs/0046-platform-support-tiers.md
NixOS/rfcs#46

@ehmry ehmry deleted the tier7 branch March 26, 2020 05:58
@Ericson2314
Copy link
Member

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
Development

Successfully merging this pull request may close these issues.

None yet

2 participants