From 12e025491af86a12f4a3348409a26a3fd9270016 Mon Sep 17 00:00:00 2001 From: zuckerberg <5-zuckerberg@users.noreply.git.neet.dev> Date: Sun, 9 May 2021 10:30:27 -0400 Subject: [PATCH] add n1 clusterboard compute module --- flake.nix | 4 ++++ machines/compute/common.nix | 16 ++++++++++++++++ machines/compute/n1/configuration.nix | 9 +++++++++ machines/compute/sopine-baseboard-ethernet.dtbo | Bin 0 -> 323 bytes machines/compute/sopine-baseboard-ethernet.dts | 15 +++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 machines/compute/common.nix create mode 100644 machines/compute/n1/configuration.nix create mode 100644 machines/compute/sopine-baseboard-ethernet.dtbo create mode 100644 machines/compute/sopine-baseboard-ethernet.dts diff --git a/flake.nix b/flake.nix index e1c2d0a..9fc6e02 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,10 @@ system = "aarch64-linux"; modules = [ ./machines/storage/s0/configuration.nix ]; }; + "n1" = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ ./machines/compute/n1/configuration.nix ]; + }; }; }; } diff --git a/machines/compute/common.nix b/machines/compute/common.nix new file mode 100644 index 0000000..8130a71 --- /dev/null +++ b/machines/compute/common.nix @@ -0,0 +1,16 @@ +{ config, ... }: + +{ + imports = [ + ../../common/common.nix + ]; + + nix.flakes.enable = true; + + networking.interfaces.eth0.useDHCP = true; + + hardware.deviceTree.enable = true; + hardware.deviceTree.overlays = [ + ./sopine-baseboard-ethernet.dtbo # fix pine64 clusterboard ethernet + ]; +} \ No newline at end of file diff --git a/machines/compute/n1/configuration.nix b/machines/compute/n1/configuration.nix new file mode 100644 index 0000000..0803930 --- /dev/null +++ b/machines/compute/n1/configuration.nix @@ -0,0 +1,9 @@ +{ config, ... }: + +{ + imports = [ + ../common.nix + ]; + + networking.hostName = "n1"; +} \ No newline at end of file diff --git a/machines/compute/sopine-baseboard-ethernet.dtbo b/machines/compute/sopine-baseboard-ethernet.dtbo new file mode 100644 index 0000000000000000000000000000000000000000..aad9bc9a19c6f187487c44a813ef868e1d985951 GIT binary patch literal 323 zcmcb>`|m9S1EVto1A_$v1ET-~1A_(w1A`y~0|SW7z`(#@%)r2K1H?eXj8Hx^0|SE? zh#j0CkeQdNP@Y+mp^%hVoSKxMSd;>iU|;~Lv1VXkU@OSXOEojmDb5EmbP=jRT(~$x zVopwZW?o)ukxp@Go~c2mZlak9*dWHVqQvyv)VvZ0127+CF34^{{o?#&{nV0-)S|r9 z5(mR%V*>*Nh!O_I`1t&?)S{fk%J_JYCXgN$1_lOM1_s723=9lRNSHG>KP5GXAvr&{ lAh9GfDJPYoB(W$xwM4fdu_Ob@StS*^DXBS$mAVDR3;+q; */ + target-path = "/soc/ethernet@1c30000"; + __overlay__ { + allwinner,tx-delay-ps = <500>; + }; + }; + +};