From 5a84ab6dd69cb734a35bfb6f9e9b9c3a4ce9956d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 25 Oct 2022 15:31:07 +0200 Subject: pkgs: add tos-firmware --- flake.lock | 6 +++--- pkgs/default.nix | 6 +++++- pkgs/tos-firmware/default.nix | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 pkgs/tos-firmware/default.nix diff --git a/flake.lock b/flake.lock index ee51aaa..1cb9aaf 100644 --- a/flake.lock +++ b/flake.lock @@ -16,11 +16,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1665387968, - "narHash": "sha256-ooKVuc+8zIs58zpMqW3z78qokwN1nkv2Iv6dMqqKjXI=", + "lastModified": 1666688649, + "narHash": "sha256-i1Tq2VgXbEZKgjM2p2OqZdxcnK4FZjRZ9Oy4Ewx8gjA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "91d1eb9f2a9c4e3c9d68a59f6c0cada8c63d5340", + "rev": "03a00f66fc4e893dccba1579df6d0c83852e1c2c", "type": "github" }, "original": { 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 + ''; +} -- cgit v1.2.3