summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--host/start-vm/lib.rs1
-rw-r--r--host/start-vm/tests/vm_command-basic.rs2
-rw-r--r--img/app/Makefile4
-rw-r--r--img/app/default.nix2
-rw-r--r--release/checks/wayland/default.nix4
-rw-r--r--vm/sys/net/Makefile4
-rw-r--r--vm/sys/net/default.nix2
7 files changed, 8 insertions, 11 deletions
diff --git a/host/start-vm/lib.rs b/host/start-vm/lib.rs
index 32ba34d..16d8fe3 100644
--- a/host/start-vm/lib.rs
+++ b/host/start-vm/lib.rs
@@ -60,7 +60,6 @@ pub fn vm_command(dir: &Path, api_socket_fd: RawFd) -> Result<Command, String> {
 
     let mut command = Command::new("cloud-hypervisor");
     command.args(["--api-socket", &format!("fd={api_socket_fd}")]);
-    command.args(["--cmdline", "console=ttyS0 root=PARTLABEL=root"]);
     command.args(["--memory", "size=128M,shared=on"]);
     command.args(["--console", "pty"]);
     command.arg("--kernel");
diff --git a/host/start-vm/tests/vm_command-basic.rs b/host/start-vm/tests/vm_command-basic.rs
index 0abe23b..3b8ef0e 100644
--- a/host/start-vm/tests/vm_command-basic.rs
+++ b/host/start-vm/tests/vm_command-basic.rs
@@ -29,8 +29,6 @@ fn main() -> std::io::Result<()> {
     let expected_args = vec![
         OsStr::new("--api-socket"),
         OsStr::new("fd=4"),
-        OsStr::new("--cmdline"),
-        OsStr::new("console=ttyS0 root=PARTLABEL=root"),
         OsStr::new("--memory"),
         OsStr::new("size=128M,shared=on"),
         OsStr::new("--console"),
diff --git a/img/app/Makefile b/img/app/Makefile
index 8ac20c8..8137c48 100644
--- a/img/app/Makefile
+++ b/img/app/Makefile
@@ -104,7 +104,7 @@ run-qemu: $(imgdir)/appvm/blk/root.img start-virtiofsd
 	@../../scripts/run-qemu.sh -m 128 -cpu host -kernel $(KERNEL) -vga none \
 	    -drive file=$(imgdir)/appvm/blk/root.img,if=virtio,format=raw,readonly=on \
 	    -drive file=$(RUN_IMG),if=virtio,format=raw,readonly=on \
-	    -append "root=PARTLABEL=root nokaslr" \
+	    -append nokaslr \
 	    -gdb unix:build/gdb.sock,server,nowait \
 	    -netdev user,id=net0 \
 	    -device virtio-net,netdev=net0,mac=0A:B3:EC:00:00:00 \
@@ -127,7 +127,6 @@ run-cloud-hypervisor: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-vi
 	    --fs tag=virtiofs0,socket=build/virtiofsd.sock \
 	    --gpu socket=build/vhost-user-gpu.sock \
 	    --kernel $(KERNEL) \
-	    --cmdline "root=PARTLABEL=root" \
 	    --console tty \
 	    --serial pty
 .PHONY: run-cloud-hypervisor
@@ -136,7 +135,6 @@ run-crosvm: $(imgdir)/appvm/blk/root.img start-vhost-user-gpu start-virtiofsd
 	$(CROSVM_RUN) \
 	    --disk $(imgdir)/appvm/blk/root.img \
 	    --disk $(RUN_IMG) \
-	    -p "console=ttyS0 root=PARTLABEL=root" \
 	    --vhost-user-fs build/virtiofsd.sock:virtiofs0 \
 	    --vhost-user-gpu build/vhost-user-gpu.sock \
 	    --serial type=file,hardware=serial,path=build/crosvm.log \
diff --git a/img/app/default.nix b/img/app/default.nix
index ab87eda..d20d109 100644
--- a/img/app/default.nix
+++ b/img/app/default.nix
@@ -59,6 +59,8 @@ let
 
   kernel = (buildPackages.linux_latest.override {
     structuredExtraConfig = with lib.kernel; {
+      CMDLINE_BOOL = yes;
+      CMDLINE = freeform "console=ttyS0 root=PARTLABEL=root";
       VIRTIO = yes;
       VIRTIO_PCI = yes;
       VIRTIO_BLK = yes;
diff --git a/release/checks/wayland/default.nix b/release/checks/wayland/default.nix
index 713b924..aa4a3d2 100644
--- a/release/checks/wayland/default.nix
+++ b/release/checks/wayland/default.nix
@@ -18,13 +18,13 @@ config.pkgs.nixosTest ({ lib, pkgs, ... }: {
     systemd.services.cloud-hypervisor = {
       after = [ "crosvm-gpu.service" "weston.service" ];
       requires = [ "crosvm-gpu.service" "weston.service" ];
-      serviceConfig.ExecStart = "${lib.getExe pkgs.cloud-hypervisor} --memory shared=on --disk path=${appvm}/img/appvm/blk/root.img,readonly=on --disk path=${run}/blk/run.img,readonly=on --cmdline \"console=ttyS0 root=PARTLABEL=root\" --gpu socket=/run/crosvm-gpu.sock --serial tty --console null --kernel ${appvm}/img/appvm/vmlinux";
+      serviceConfig.ExecStart = "${lib.getExe pkgs.cloud-hypervisor} --memory shared=on --disk path=${appvm}/img/appvm/blk/root.img,readonly=on --disk path=${run}/blk/run.img,readonly=on --gpu socket=/run/crosvm-gpu.sock --serial tty --console null --kernel ${appvm}/img/appvm/vmlinux";
     };
 
     systemd.services.crosvm = {
       after = [ "crosvm-gpu.service" "weston.service" ];
       requires = [ "crosvm-gpu.service" "weston.service" ];
-      serviceConfig.ExecStart = "${lib.getExe pkgs.crosvm} run -s /run/crosvm --disk ${appvm}/img/appvm/blk/root.img --disk ${run}/blk/run.img -p \"console=ttyS0 root=PARTLABEL=root\" --vhost-user-gpu /run/crosvm-gpu.sock --serial type=stdout,hardware=virtio-console,stdin=true ${appvm}/img/appvm/vmlinux";
+      serviceConfig.ExecStart = "${lib.getExe pkgs.crosvm} run -s /run/crosvm --disk ${appvm}/img/appvm/blk/root.img --disk ${run}/blk/run.img --vhost-user-gpu /run/crosvm-gpu.sock --serial type=stdout,hardware=virtio-console,stdin=true ${appvm}/img/appvm/vmlinux";
       serviceConfig.ExecStop = "${lib.getExe pkgs.crosvm} stop /run/crosvm";
     };
 
diff --git a/vm/sys/net/Makefile b/vm/sys/net/Makefile
index df1db8a..5e65f92 100644
--- a/vm/sys/net/Makefile
+++ b/vm/sys/net/Makefile
@@ -101,7 +101,7 @@ debug:
 run-qemu: build/host/data/netvm/blk/root.img
 	@../../../scripts/run-qemu.sh -m 128 -cpu host -kernel $(KERNEL) -vga none \
 	    -drive file=build/host/data/netvm/blk/root.img,if=virtio,format=raw,readonly=on \
-	    -append "root=PARTLABEL=root nokaslr" \
+	    -append nokaslr \
 	    -gdb unix:build/gdb.sock,server,nowait \
 	    -netdev user,id=net0 \
 	    -device e1000e,netdev=net0 \
@@ -121,7 +121,6 @@ run-cloud-hypervisor: build/host/data/netvm/blk/root.img
 	    --net tap=tap0 \
 	    --net tap=tap1,mac=0A:B3:EC:80:00:00 \
 	    --kernel $(KERNEL) \
-	    --cmdline "root=PARTLABEL=root" \
 	    --console tty \
 	    --serial pty
 .PHONY: run-cloud-hypervisor
@@ -129,7 +128,6 @@ run-cloud-hypervisor: build/host/data/netvm/blk/root.img
 run-crosvm: build/host/data/netvm/blk/root.img
 	$(CROSVM_RUN) \
 	    --disk build/host/data/netvm/blk/root.img \
-	    -p "console=ttyS0 root=PARTLABEL=root" \
 	    --net tap-name=tap0 \
 	    --net tap-name=tap1,mac=0A:B3:EC:80:00:00 \
 	    --serial type=file,hardware=serial,path=build/crosvm.log \
diff --git a/vm/sys/net/default.nix b/vm/sys/net/default.nix
index 98749d1..208223f 100644
--- a/vm/sys/net/default.nix
+++ b/vm/sys/net/default.nix
@@ -68,6 +68,8 @@ let
 
   kernel = (buildPackages.linux_latest.override {
     structuredExtraConfig = with lib.kernel; {
+      CMDLINE_BOOL = yes;
+      CMDLINE = freeform "console=ttyS0 root=PARTLABEL=root";
       VIRTIO = yes;
       VIRTIO_PCI = yes;
       VIRTIO_BLK = yes;