summary refs log tree commit diff
Commit message (Collapse)AuthorAge
* vm: send cloud-hypervisor serial output to fileAlyssa Ross2023-12-05
| | | | | | | | | | | | This didn't originally go to a file, because I still had to use the serial console interactively for debugging sometimes. Now that things have settled a bit and the serial console is write-only, having serial go to a pty is just needlessly inconvenient. I've updated the crosvm target to put its logs in the same place, so the path to serial logs only has to be learned once. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* img/app: add networking to all test VMsAlyssa Ross2023-12-05
| | | | | | | | | This allows for some more testing of VMs that require networking. There still won't be internet access, but having the device at least be present allows for testing that the applications start up once waiting for the network times out. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm/sys/net: create TAPs for testing in namespaceAlyssa Ross2023-12-05
| | | | | | | This removes the need to do anything as root to make run with VMM=cloud-hypervisor or VMM=crosvm. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* Revert "vm: build command line into kernels"Alyssa Ross2023-12-05
| | | | | | | | | | | | | | | | | | This reverts commit 5f556f806a70f3787fe725254ccf3d245bd5bebc. This turns out to not really be workable on aarch64 at the moment, without giving things up — both crosvm and Cloud Hypervisor inject earlycon parameters onto the command line, which overrides the built-in command line. We could use CONFIG_CMDLINE_FORCE, but then we wouldn't know which serial console to use, because crosvm and Cloud Hypervisor both use different ones. There's discussion about making it possible to have the bootloader command line append to the built-in command line, but it's moving extremely slowly, so we can't count on it any time soon. Link: https://lore.kernel.org/lkml/20231110013817.2378507-1-danielwa@cisco.com/ Signed-off-by: Alyssa Ross <hi@alyssa.is>
* scripts/update-nixpkgs.sh: fix shellcheck warningAlyssa Ross2023-11-27
| | | | | Fixes: 2950ca4 ("scripts/update-nixpkgs.sh: use upstream Nixpkgs") Signed-off-by: Alyssa Ross <hi@alyssa.is>
* pkgs: fix pkgsStatic.cloud-hypervisor buildAlyssa Ross2023-11-27
| | | | | | | | In static builds, all build inputs are moved to propagated build inputs, so we need to inherit those as well. Fixes: 323e2bb ("pkgs: move cloud-hypervisor patch into Spectrum") Signed-off-by: Alyssa Ross <hi@alyssa.is>
* scripts/update-nixpkgs.sh: use upstream NixpkgsAlyssa Ross2023-11-26
| | | | | | | | | Updating to nixos-unstable seems like the most sensible default, but it can be overridden because sometimes we want to update to other branches, for example if they contain a fix for a problem in nixos-unstable. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* pkgs: move foot patch into SpectrumAlyssa Ross2023-11-26
| | | | | | This puts us on an upstream Nixpkgs commit! Signed-off-by: Alyssa Ross <hi@alyssa.is>
* pkgs: move cloud-hypervisor patch into SpectrumAlyssa Ross2023-11-26
| | | | | | | | | | | | Previously, this lived in our custom Nixpkgs tree. Since it would be nice to move away from having one of those, we need to bring this into Spectrum directly. This goes in an overlay because if some package in Nixpkgs uses Cloud Hypervisor, there's no point ending up with two Cloud Hypervisor builds in our build closure, one patched and one not. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* pkgs: call nixpkgs entrypoint outside of configAlyssa Ross2023-11-26
| | | | | | | By moving this call under our control, we can insert our own default Nixpkgs arguments, for example overlays, or maybe crossSystem. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/call-package.nix: take callPackage, not pkgsAlyssa Ross2023-11-26
| | | | | | | | | callPackage is the only actual useful bit of the scope for accessing all the packages we're interested in (since packages from Nixpkgs are not included in the scope except when going through callPackage), so to avoid mistakes, only pass callPackage around. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib: adjust interface for Nix filesAlyssa Ross2023-11-26
| | | | | | | | | | | | | | | | | | | | | | | This moves every directly-buildable Nix file in Spectrum from the old eval-config.nix interface to a new callPackage-based interface. This moves us in the direction of stopping files from directly importing each other, in favor of having a global package set that contains the Spectrum-specific packages. Aside from consistency with packages from Nixpkgs, the main advantage to this is that the packages will be correctly spliced, and so e.g. lseek being in nativeBuildInputs will now do the right thing. This is implemented using a scope, so the Spectrum packages are invisible to Nixpkgs, and are applied on top afterwards, in contrast to if an overlay was used. Having a customised package set also paves the way for bringing modifications to upstream packages (e.g. the Cloud Hypervisor virtio-gpu patches) into the Spectrum repository, allowing us to use an unmodified upstream Nixpkgs. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm: use linux from pkgsStaticAlyssa Ross2023-11-22
| | | | | | | | | I think the original reason for not using the pkgsStatic version of the kernel was just that it was built by cache.nixos.org. Now that we're using a custom configuration, it wouldn't be cached anyway, so let's not special case the kernel any more. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release/checks/doc-anchors.nix: avoid importAlyssa Ross2023-11-22
| | | | | | | | | Documentation's src isn't special — it's the same src that we already have access to. We could only check in Documentation's sourceRoot, but it's probably better not to anyway, since if AsciiDoc files did end up elsewhere, we'd want them to have valid links too. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* Documentation/Gemfile.lock: add aarch64-linuxAlyssa Ross2023-11-22
| | | | | | I'm not sure why these all need to be listed out explicitly… Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm: don't use buildPackages for kernelAlyssa Ross2023-11-21
| | | | | | | This was used just to get out of pkgsStatic, but when cross compiling, it won't give us a kernel for the architecture we want. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/nixpkgs.default.nix: updateAlyssa Ross2023-11-21
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm: unset FRAMEBUFFER_CONSOLE_DETECT_PRIMARYAlyssa Ross2023-11-21
| | | | | | | | Newer versions of Nixpkgs have started setting this. Since we don't have a framebuffer console in our kernels, when we're on that newer Nixpkgs, this will need to be unset. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm: build command line into kernelsAlyssa Ross2023-11-21
| | | | | | | | | | 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>
* tools/lseek: use finalPackageAlyssa Ross2023-11-12
| | | | | | | | | | | No need for manually calling lib.fix when this is built in to mkDerivation. I should have checked for other occurrences of lib.fix in 5e1c84a ("host/start-vm: use finalPackage"), but I didn't think to. This was the only remaining occurrence. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/rootfs: fix pkgsGui for cross compilationAlyssa Ross2023-11-12
| | | | | | | | When cross compiling, we don't need to disable systemd for packages used at build time, and so would require way more overrides. So only apply the overlay for the runtime packages. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vm: use finalPackageAlyssa Ross2023-11-06
| | | | | | | No need for manually calling lib.fix when this is built in to mkDerivation. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vm: have vm_command() borrow dirAlyssa Ross2023-11-05
| | | | | | | There's no need to take ownership of this. It can't be consumed to create config_dir, because it's still borrowed by vm_name. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vm: enable -Werror in Nix buildsAlyssa Ross2023-11-05
| | | | | | | | | | | | | | | | | | | This would have stopped me committing the warning fixed in 2441673 ("host/start-vm: remove unused import"). TUNGETIFF is cast to unsigned, which removes a warning caused by musl's idea of what an ioctl request is differing from Linux's[1]. C standard is now c2x, to disable a -Wpedantic warning about square bracket attributes not being valid in C11. -Wno-error=attributes is set, because the standard says that unknown attributes are supposed to be ignored by the compiler. Having a single warning about it is fine, but not an error. [1]: https://inbox.vuxu.org/musl/20200120171425.GL30412@brightrain.aerifal.cx/ Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vm: remove unused importAlyssa Ross2023-11-05
| | | | | Fixes: 7597328 ("host/start-vm: find config from symlink in service") Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vm: tests: remove pointless create_dirAlyssa Ross2023-11-05
| | | | | | | This has never been necessary. Fixes: bb13845 ("host/start-vm: test cloud-hypervisor command") Signed-off-by: Alyssa Ross <hi@alyssa.is>
* scripts/make-erofs.sh: use a fixed block sizeAlyssa Ross2023-10-21
| | | | | | | Otherwise, the block size used is system-dependent, which can lead to filesystem images incompatible with the VM kernels. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/start-vm: find config from symlink in serviceAlyssa Ross2023-10-13
| | | | | | | | | | This decouples start-vm from where VM configs are stored, and decouples VM configs from VM names, which will make it possible to have VMs that are built in to the system, and multiple VMs using the same config with different environments (e.g. the multiple instances of the same application). Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm/app/mg.nix: fix direct evaluationAlyssa Ross2023-10-13
| | | | | | | | | | This wasn't updated when eval-config.nix was changed and moved into lib. Importing the file and passing config in worked, but evaluating it directly didn't, because it tried to import a path that no longer exists. Fixes: c3fbeca ("lib/common.mk: init") Signed-off-by: Alyssa Ross <hi@alyssa.is>
* img/app: remove obsolete PATH ordering hackAlyssa Ross2023-10-11
| | | | | | QEMU no longer includes its own virtiofsd since 8.1.0. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* Add make targets for kernel debuggingAlyssa Ross2023-10-11
| | | | | | | | At the moment, only QEMU creates the GDB socket, so this only works with QEMU. cloud-hypervisor isn't built with GDB support, and it doesn't work very well anyway. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release/installer: use linuxPackages_latestAlyssa Ross2023-09-27
| | | | | | | | Spectrum itself uses linuxPackages_latest. It would be a shame if somebody's computer could run Spectrum, but not the installer, because the LTS kernel is too old to support their hardware. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* Use lib.getExe where possibleAlyssa Ross2023-09-27
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/nixpkgs.default.nix: updateAlyssa Ross2023-09-27
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm/app/hello-wayland.nix: removeAlyssa Ross2023-09-25
| | | | | | | | | | This was useful while it was the only Wayland client we could run, but since it doesn't start reliably[1], and we can now run complex clients, appvm-hello-wayland isn't really providing value any more. [1]: https://github.com/emersion/hello-wayland/pull/19 Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release/checks/wayland: use footAlyssa Ross2023-09-25
| | | | | | | | This is a more realistic test case, and it's more robust too, since we can look for a specific app ID rather than using a size-based heuristic. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release/checks/wayland: fix Nix syntaxAlyssa Ross2023-09-25
| | | | | | Okay, we /really/ need to have shell.nix files be part of release.nix. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release/checks/wayland: remove unnecessary #includeAlyssa Ross2023-09-25
| | | | | | <libweston/zalloc.h> is included by <libweston/libweston.h>. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm/app/foot.nix: don't create /run/opengl-driverAlyssa Ross2023-09-25
| | | | | | | | There are no Mesa drivers in VMs since the previous commit. I didn't notice this line was still here, now not doing anything useful. Fixes: 16db4a0 ("vm: remove mesa drivers") Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm: remove mesa driversAlyssa Ross2023-09-25
| | | | | | | | | | | | | This includes a revert of commit 1a754374028ced6eea2dd77a2f829b511d2e90ba. vm-lib/make-vm.nix was not the right place for the Mesa drivers to be added — it meant that every VM had its own copy of the drivers, whether it used them or not. And right now, nothing uses the Mesa drivers. This will only be the case if we do GPU passthrough at some point. When that happens, we can add them in a more sensible way, in img/app. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/rootfs: fix DejaVuSans.ttf linkAlyssa Ross2023-09-23
| | | | | | | This was a broken symlink without -ignorelinks. Adding the flag fixes it, and the changes to all other links look fine. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* vm/app/foot.nix: initAlyssa Ross2023-09-19
| | | | | | | | | | | This demonstrates that, as a result of upstream developments, we are now able to run clients without them freezing after a couple of seconds [1], and without crashing if they use the keymap [2]. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=70d1ace56db6c79d39dbe9c0d5244452b67e2fde [2]: https://chromium.googlesource.com/chromiumos/platform/crosvm/+/998597a1bd29432bdee28d298511549edff1434a Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/nixpkgs.default.nix: updateAlyssa Ross2023-09-19
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/nixpkgs.default.nix: updateAlyssa Ross2023-09-18
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* lib/nixpkgs.default.nix: updateAlyssa Ross2023-09-11
| | | | Signed-off-by: Alyssa Ross <hi@alyssa.is>
* release: increase size of install destinationAlyssa Ross2023-09-11
| | | | | | | The next Nixpkgs update will grow the image to the point it no longer fits. :( We'll make it smaller later. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* host/rootfs: disable libgudev testsAlyssa Ross2023-08-30
| | | | These are enabled by default in recent Nixpkgs.
* Documentation: emphasize Matrix over IRCAlyssa Ross2023-08-30
| | | | | | | Most people probably want Matrix. People looking for IRC will still easily find it. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* Documentation: update participating.html linksAlyssa Ross2023-08-26
| | | | | | This page has been moved into the documentation. Signed-off-by: Alyssa Ross <hi@alyssa.is>
* Documentation: restore participating.html anchorsAlyssa Ross2023-08-26
| | | | | | | | | | | This page used to be at <https://spectrum-os.org/participating.html>, which now redirects here. Let's keep the original anchors working. To have anchors for each mailing list, they have to be their own section. This probably makes more sense than a table anyway, and will render better on narrow viewports. Signed-off-by: Alyssa Ross <hi@alyssa.is>