diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 14:38:35 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 15:05:16 +0100 |
commit | 5f556f806a70f3787fe725254ccf3d245bd5bebc (patch) | |
tree | 5b0d181d1aed03067e6c0539fff42c8aba255ad3 /img | |
parent | f52039feb89c3414b27036a4ea0554d72d5a2d01 (diff) | |
download | spectrum-5f556f806a70f3787fe725254ccf3d245bd5bebc.tar spectrum-5f556f806a70f3787fe725254ccf3d245bd5bebc.tar.gz spectrum-5f556f806a70f3787fe725254ccf3d245bd5bebc.tar.bz2 spectrum-5f556f806a70f3787fe725254ccf3d245bd5bebc.tar.lz spectrum-5f556f806a70f3787fe725254ccf3d245bd5bebc.tar.xz spectrum-5f556f806a70f3787fe725254ccf3d245bd5bebc.tar.zst spectrum-5f556f806a70f3787fe725254ccf3d245bd5bebc.zip |
vm: build command line into kernels
The kernel command line is policy, and shouldn't be hardcoded in start-vm. We could add a mechanism for customising it at some point (this would probably be helpful for custom VMs), but we don't need that at the moment, since for our built-in VMs we're using custom-configured kernels anyway. Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'img')
-rw-r--r-- | img/app/Makefile | 4 | ||||
-rw-r--r-- | img/app/default.nix | 2 |
2 files changed, 3 insertions, 3 deletions
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; |