Skip to content

Commit

Permalink
clean up and test booting an encalve on kernel 6.8 (doesn't work)
Browse files Browse the repository at this point in the history
  • Loading branch information
cottand committed Apr 3, 2024
1 parent 121c5b0 commit 5776d61
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 84 deletions.
6 changes: 3 additions & 3 deletions examples/bringYourOwnKernel/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 25 additions & 31 deletions examples/bringYourOwnKernel/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,41 +46,33 @@

# kernel = pkgs.linux;

eif = let kernel = pkgs.linux_4_19; in
nitro.buildEif {
# kernel = kernel + "/Image";
# kernelConfig = kernel.configfile;
kernel = nitro.blobs.aarch64.kernel;
kernelConfig = nitro.blobs.aarch64.kernelConfig;

eif = nitro.mkEif {
# use AWS' nitro-cli kernel and kernelConfig
# inherit (nitro.blobs) kernel kernelConfig;
kernel = kernel + "/Image";
kernelConfig = kernel.configfile;

name = "eif-hello-world";
name = "eif-hello-world";

cmdline = "reboot=k panic=30 pci=off nomodules console=ttyS0 random.trust_cpu=on root=/dev/ram0";
ramdisks = nitro.mkRamdisksFrom {
nsmKo = null;
rootfs = nixStoreFrom { rootPaths = [ myScript ]; };
entrypoint = "${myScript}/bin/hello";

# init = nitro.blobs.aarch64.init;
# init = nitroPkgs.eif-init;
# init = "${goinit}/bin/init";


# nsmKo = nitro.blobs.aarch64.nsmKo;
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ myScript ];
pathsToLink = [ "/bin" ];
};
# cmdline = "reboot=k panic=30 pci=off modules_load=nsm console=ttyS0 random.trust_cpu=on root=/dev/ram0";
cmdline = "reboot=k panic=30 pci=off nomodules console=ttyS0 random.trust_cpu=on root=/dev/ram0";
entrypoint = "/bin/hello";
env = "";
};
};

# eif-rc = nitro.mkEif {
# # use AWS' nitro-cli kernel and kernelConfig
# # inherit (nitro.blobs) kernel kernelConfig;
# kernel = kernel + "/Image";
# kernelConfig = kernel.configfile;

# name = "eif-hello-world";
# ramdisks = nitro.mkRamdisksFrom {
# nsmKo = nitroPkgs.nitroKernelModule.override {
# kernel = kernel;
# };
# rootfs = nixpkgs.legacyPackages.${system}.hello;
# entrypoint = "/bin/hello";
# env = "";
# };
# };



eif2 = nitro.mkEif {
Expand Down Expand Up @@ -121,7 +113,9 @@
# init = "${goinit}/bin/init";


nsmKo = nitro.blobs.aarch64.nsmKo;
nsmKo =
# null; # also works!
nitro.blobs.aarch64.nsmKo;
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ myScript ];
Expand Down
10 changes: 0 additions & 10 deletions initgo.nix

This file was deleted.

40 changes: 0 additions & 40 deletions nitroKernelModule.nix

This file was deleted.

0 comments on commit 5776d61

Please sign in to comment.