aboutsummaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-10-25 15:31:07 +0200
committerKarel Kočí <cynerd@email.cz>2022-10-25 15:31:07 +0200
commit5a84ab6dd69cb734a35bfb6f9e9b9c3a4ce9956d (patch)
tree6fda21f7b48b83355a7e7505f2043a92ffe05013 /pkgs
parent2cc6c594f3c7a1c9c4d99fd8f10d3d385a1006bf (diff)
downloadnixturris-5a84ab6dd69cb734a35bfb6f9e9b9c3a4ce9956d.tar.gz
nixturris-5a84ab6dd69cb734a35bfb6f9e9b9c3a4ce9956d.tar.bz2
nixturris-5a84ab6dd69cb734a35bfb6f9e9b9c3a4ce9956d.zip
pkgs: add tos-firmware
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/default.nix6
-rw-r--r--pkgs/tos-firmware/default.nix19
2 files changed, 24 insertions, 1 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 082cca1..19a1f28 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -22,7 +22,11 @@ let
readDir ./patches-linux-5.15)));
};
- # NOR Firmwares
+ # NOR Firmware as considered stable by Turris and shipped in Turris OS
+ tosFirmwareOmnia = callPackage ./tos-firmware { board = "omnia"; };
+ tosFirmwareMox = callPackage ./tos-firmware { board = "mox"; };
+
+ # NOR Firmwares build in Nix
armTrustedFirmwareTurrisMox = buildArmTrustedFirmware rec {
platform = "a3700";
extraMeta.platforms = ["aarch64-linux"];
diff --git a/pkgs/tos-firmware/default.nix b/pkgs/tos-firmware/default.nix
new file mode 100644
index 0000000..89e7ebf
--- /dev/null
+++ b/pkgs/tos-firmware/default.nix
@@ -0,0 +1,19 @@
+{ stdenvNoCC, fetchgit
+, board
+}:
+
+stdenvNoCC.mkDerivation rec {
+ pname = "tos-firmware-" + board;
+ version = "6.0";
+ src = fetchgit {
+ url = "https://gitlab.nic.cz/turris/os/packages.git";
+ rev = "v" + version;
+ sha256 = "087gxdvkrykm2ghn23zscq5nw86am4jqf4nj5hzf6bmc6zxgdnhg";
+ };
+
+ installPhase = ''
+ mkdir -p $out
+ cp hardware/${board}/${board}-firmware/files/* $out/
+ rm $out/config.sh
+ '';
+}