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

kernel: Add cmdline to the built artifacts #41

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions kernel/cmdline/aarch64.cmdline
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
reboot=k panic=30 pci=off nomodules console=ttyS0 random.trust_cpu=on root=/dev/ram0
1 change: 1 addition & 0 deletions kernel/cmdline/x86_64.cmdline
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
reboot=k panic=30 pci=off nomodules console=ttyS0 i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd random.trust_cpu=on
10 changes: 10 additions & 0 deletions kernel/kernel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ let
else
abort "Unsupported architecture '${arch}'"
);

cmdline_file = (
if arch == "aarch64" then
./cmdline/aarch64.cmdline
else if arch == "x86_64" then
./cmdline/x86_64.cmdline
else
abort "Unsupported architecture '${arch}'"
);
in
pkgs.stdenv.mkDerivation rec {
pname = "nitro-enclaves-kernel";
Expand Down Expand Up @@ -88,6 +97,7 @@ pkgs.stdenv.mkDerivation rec {
cp arch/${kern_arch}/boot/${kern_image} $out/
cp drivers/misc/nsm.ko $out/
cp .config $out/${kern_image}.config
cp ${cmdline_file} $out/cmdline
'';

# The Nitro Enclaves loader on aarch64 loads the target image at the image provided target address.
Expand Down