forked from M-Labs/nix-servo
not-os: enable networking
This commit is contained in:
parent
1aee5344a5
commit
1f62e6a35e
11
flake.nix
11
flake.nix
@ -228,6 +228,15 @@
|
|||||||
mkbootimage boot.bif $out/boot.bin
|
mkbootimage boot.bif $out/boot.bin
|
||||||
echo file binary-dist $out/boot.bin >> $out/nix-support/hydra-build-products
|
echo file binary-dist $out/boot.bin >> $out/nix-support/hydra-build-products
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Pinned qemu version due to networking errors in recent version 8.2.0
|
||||||
|
qemu = pkgs.qemu.overrideAttrs (oldAttrs: rec {
|
||||||
|
version = "8.1.3";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://download.qemu.org/qemu-${version}.tar.xz";
|
||||||
|
hash = "sha256-Q8wXaAQQVYb3T5A5jzTp+FeH3/QA07ZA2B93efviZbs=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
not-os-configured = (import patched-not-os {
|
not-os-configured = (import patched-not-os {
|
||||||
inherit nixpkgs;
|
inherit nixpkgs;
|
||||||
@ -241,7 +250,7 @@
|
|||||||
not-os-qemu = { board ? "zc706" }: let
|
not-os-qemu = { board ? "zc706" }: let
|
||||||
qemuScript = ''
|
qemuScript = ''
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export PATH=${pkgs.qemu}/bin:$PATH
|
export PATH=${qemu}/bin:$PATH
|
||||||
IMGDIR=$(mktemp -d /tmp/not-os-qemu-XXXXXX)
|
IMGDIR=$(mktemp -d /tmp/not-os-qemu-XXXXXX)
|
||||||
BASE=$(realpath $(dirname $0))
|
BASE=$(realpath $(dirname $0))
|
||||||
qemu-img create -F raw -f qcow2 -b $BASE/sd-image.img $IMGDIR/sd-overlay.qcow2 512M
|
qemu-img create -F raw -f qcow2 -b $BASE/sd-image.img $IMGDIR/sd-overlay.qcow2 512M
|
||||||
|
@ -66,10 +66,10 @@ index c61f9d6..4e30d4b 100644
|
|||||||
config = {
|
config = {
|
||||||
system.build.bootStage2 = pkgs.substituteAll {
|
system.build.bootStage2 = pkgs.substituteAll {
|
||||||
diff --git a/zynq_image.nix b/zynq_image.nix
|
diff --git a/zynq_image.nix b/zynq_image.nix
|
||||||
index 3fa23ab..484a063 100644
|
index 3fa23ab..695d876 100644
|
||||||
--- a/zynq_image.nix
|
--- a/zynq_image.nix
|
||||||
+++ b/zynq_image.nix
|
+++ b/zynq_image.nix
|
||||||
@@ -1,66 +1,62 @@
|
@@ -1,66 +1,63 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -136,6 +136,7 @@ index 3fa23ab..484a063 100644
|
|||||||
- passAsFile = [ "qemuScript" ];
|
- passAsFile = [ "qemuScript" ];
|
||||||
+ networking.hostName = "zynq";
|
+ networking.hostName = "zynq";
|
||||||
+ not-os.sd = true;
|
+ not-os.sd = true;
|
||||||
|
+ not-os.simpleStaticIp = true;
|
||||||
+ system.build.zynq_image = pkgs.runCommand "zynq_image" {
|
+ system.build.zynq_image = pkgs.runCommand "zynq_image" {
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
} ''
|
} ''
|
||||||
|
Loading…
Reference in New Issue
Block a user