Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

nova.nix 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. { config, pkgs, lib, ... }:
  2. with lib;
  3. let
  4. localPackages = pkgs.buildPackages;
  5. utils = import ../lib {
  6. inherit (config.nixpkgs) system localSystem crossSystem;
  7. inherit pkgs;
  8. };
  9. bootDir = pkgs.runCommand "${config.system.name}-bootdir" { } ''
  10. mkdir $out
  11. gz() {
  12. gzip --keep --to-stdout "$1" > "$2"
  13. }
  14. gz ${pkgs.genodePackages.genodeSources}/tool/boot/bender $out/bender.gz
  15. gz ${pkgs.genodePackages.NOVA}/hypervisor-x86_64 $out/hypervisor.gz
  16. gz ${config.genode.boot.image}/image.elf $out/image.elf.gz
  17. '';
  18. in {
  19. genode.core = {
  20. prefix = "nova-";
  21. supportedSystems = [ "x86_64-genode" ];
  22. basePackages = with pkgs.genodePackages; [ base-nova rtc_drv ];
  23. };
  24. genode.boot = {
  25. image =
  26. utils.novaImage config.system.name { } config.genode.boot.configFile;
  27. };
  28. genode.boot.storePaths =
  29. lib.optional (config.genode.boot.storeBackend != "tarball") bootDir;
  30. virtualisation.qemu.options =
  31. lib.optionals (!config.virtualisation.useBootLoader) [
  32. "-kernel '${pkgs.genodePackages.bender}/share/bender/bender'"
  33. "-initrd '${pkgs.genodePackages.NOVA}/hypervisor-x86_64 arg=iommu logmem novpid serial,${config.genode.boot.image}/image.elf'"
  34. ];
  35. virtualisation.qemu.kernel = "${pkgs.genodePackages.bender}/share/bender/bender";
  36. virtualisation.qemu.initrd = "${pkgs.genodePackages.NOVA}/hypervisor-x86_64";
  37. virtualisation.qemu.cmdline = "arg=iommu logmem novpid serial,${config.genode.boot.image}/image.elf";
  38. boot.loader.grub.extraEntries = ''
  39. menuentry 'Genode on NOVA' {
  40. insmod multiboot2
  41. insmod gzio
  42. multiboot2 ${bootDir}/bender.gz serial_fallback
  43. module2 ${bootDir}/hypervisor.gz hypervisor iommu logmem novga novpid serial
  44. module2 ${bootDir}/image.elf.gz image.elf
  45. }
  46. '';
  47. }