From f03fed54e0918912367c19c0e633b4366ab5093c Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Mon, 8 Sep 2008 22:36:11 +0000 Subject: [PATCH] Now automated test runs - installs and boots NixOS - on my computer. Some minor issue with socat transferring report from virtual machine to host, though. svn path=/nixos/trunk/; revision=12830 --- installer/cd-dvd/closed-install.nix | 4 ++++ .../remote-install-scripts/install-script.sh | 10 +++++++--- .../remote-install-scripts/install-test.sh | 4 ++-- installer/cd-dvd/rescue-cd-configurable.nix | 19 +++++++++++++------ 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/installer/cd-dvd/closed-install.nix b/installer/cd-dvd/closed-install.nix index 7ea2460ad98f..d7544ff22b83 100644 --- a/installer/cd-dvd/closed-install.nix +++ b/installer/cd-dvd/closed-install.nix @@ -66,4 +66,8 @@ in ''; } ]; + nix = pkgs: pkgs.nixCustomFun (pkgs.nixUnstable.src) + "" + ["nix-reduce-build" "nix-http-export.cgi"] + ["--with-docbook-xsl=\\\${pkgs.docbook5_xsl}/xml/xsl/docbook/"]; }).rescueCD diff --git a/installer/cd-dvd/remote-install-scripts/install-script.sh b/installer/cd-dvd/remote-install-scripts/install-script.sh index b6becd432f8d..fbacf6ff6a58 100755 --- a/installer/cd-dvd/remote-install-scripts/install-script.sh +++ b/installer/cd-dvd/remote-install-scripts/install-script.sh @@ -14,7 +14,7 @@ mkdir -p /mnt/etc/nixos cat > /mnt/etc/nixos/configuration.nix < /mnt/etc/nixos/configuration.nix <> report & if ( ! [ -d dvd/iso ] ) || ( [ -z "$USE_LEFTOVER_DVD" ] ); then rm dvd # unset NIXPKGS_CONFIG to reduce host -> image configuration leak - NIXPKGS_CONFIG= nix-build -o dvd /etc/nixos/nixos/configuration/closed-install.nix || + NIXPKGS_CONFIG= nix-build -o dvd /etc/nixos/nixos/installer/cd-dvd/closed-install.nix || { echo "Failed to build LiveDVD" >&2 ; exit 2; }; fi; @@ -52,7 +52,7 @@ if ( ! [ -f install-test.img ] ) || ( [ -z "$JUST_BOOT" ] ); then ) | ssh -l root -i /var/certs/ssh/id_livedvd -o StrictHostKeyChecking=no 127.0.0.1 -p 4425 fi; -./qemu/bin/qemu --kernel-kqemu -m 512 install-test.img -no-reboot +./qemu/bin/qemu --kernel-kqemu -m 128 install-test.img -no-reboot echo "Report contains: " cat report diff --git a/installer/cd-dvd/rescue-cd-configurable.nix b/installer/cd-dvd/rescue-cd-configurable.nix index f660a7fe3030..a00164a2088c 100644 --- a/installer/cd-dvd/rescue-cd-configurable.nix +++ b/installer/cd-dvd/rescue-cd-configurable.nix @@ -40,14 +40,16 @@ */ ,additionalFiles ? [] ,compressImage ? false - ,nixpkgsPath ? ../../nixpkgs + ,nixpkgsPath ? ../../../nixpkgs ,additionalJobs ? [] - ,intel3945FWEnable ? false + ,intel3945FWEnable ? true + ,intel4965FWEnable ? true ,cdLabel ? "NIXOS_INSTALLATION_CD" ,relName ? if builtins.pathExists ../../relname then builtins.readFile ../../relname else "nixos-${builtins.readFile ../../VERSION}" + ,nix ? pkgs: pkgs.nix }: let realLib = if lib != null then lib else (import (nixpkgsPath+"/pkgs/lib")); @@ -151,6 +153,7 @@ rec { kernelModules = bootKernelModules; extraModulePackages = ((extraModulePackages pkgs) ++(if aufs then [(kernelPackages pkgs).aufs] else []) + ++(pkgs.lib.optional intel3945FWEnable (kernelPackages pkgs).iwlwifi) ); }; @@ -159,6 +162,13 @@ rec { sshd = { enable = sshdEnabled; }; xserver = { enable = false; }; + + udev = { + addFirmware = [] + ++ (pkgs.lib.optional intel3945FWEnable pkgs.iwlwifi3945ucode) + ++ (pkgs.lib.optional intel4965FWEnable pkgs.iwlwifi4965ucode) + ; + }; extraJobs = [ # Unpack the NixOS/Nixpkgs sources to /etc/nixos. @@ -314,6 +324,7 @@ rec { ] ++ (packages pkgs); checkConfigurationOptions = true; cleanStart = cleanStart; + nix = nix pkgs; }; users = { @@ -326,10 +337,6 @@ rec { } ]; - networking = { - enableIntel3945ABGFirmware = intel3945FWEnable; - }; - }; in preConfiguration // (arbitraryOverrides preConfiguration); configurations = [{