This commit is contained in:
adisbladis 2024-02-06 15:52:10 +13:00
commit 1bc0910b37
7 changed files with 612 additions and 0 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# zephyr-nix
Develop Zephyr projects using Nix

122
default.nix Normal file
View File

@ -0,0 +1,122 @@
{ callPackage
, stdenv
, zephyr-src
, pyproject-nix
, lib
, fetchurl
, which
, autoPatchelfHook
, cmake
, python38
, pkgs
}:
let
sdk = lib.importJSON ./sdk.json;
inherit (sdk) version;
python3 = python38;
platform =
if stdenv.isLinux then "linux"
else if stdenv.isDarwin then "macos"
else throw "Unsupported platform";
arch =
if stdenv.isLinux then stdenv.hostPlatform.linuxArch
else if stdenv.isDarwin then stdenv.hostPlatform.darwinArch
else throw "Unsupported arch";
baseURL = "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${version}";
fetchSDKFile = file: fetchurl {
url = "${baseURL}/${file}";
sha256 = sdk.files.${file};
};
in
{
# Zephyr/west Python environment.
pythonEnv = callPackage ./python.nix {
inherit zephyr-src;
inherit pyproject-nix;
};
# Pre-package Zephyr SDK.
sdk = stdenv.mkDerivation (finalAttrs: {
pname = "zephyr-sdk";
inherit version;
srcs = [
(fetchSDKFile "zephyr-sdk-${version}_${platform}-${arch}_minimal.tar.xz")
] ++ map fetchSDKFile (map (target: "toolchain_${platform}-${arch}_${target}.tar.xz") finalAttrs.targets);
targets = [ ]; # Zephyr targets
nativeBuildInputs = [ which cmake autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc python38 ];
dontBuild = true;
dontUseCmakeConfigure = true;
sourceRoot = ".";
installPhase = ''
runHook preInstall
rm zephyr-sdk-$version/zephyr-sdk-${arch}-hosttools-standalone-*.sh
rm zephyr-sdk-$version/setup.sh;
mv zephyr-sdk-$version $out
mv $(ls | grep -v env-vars) $out/
runHook postInstall
'';
});
# Binary host tools provided by the Zephyr project.
hosttools = stdenv.mkDerivation {
pname = "zephyr-sdk-hosttools";
inherit version;
src = fetchSDKFile "hosttools_${platform}-${arch}.tar.xz";
nativeBuildInputs = [ which autoPatchelfHook ];
buildInputs = [ python3 ];
dontBuild = true;
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/usr/share/zephyr/hosttools
./zephyr-sdk-${arch}-hosttools-standalone-*.sh -d $out/usr/share/zephyr/hosttools
ln -s $out/usr/share/zephyr/hosttools/sysroots/${arch}-pokysdk-${platform}/usr/bin $out/bin
runHook postInstall
'';
};
# A variant of hosttools, but all tools are taken from nixpkgs.
hosttools-nix = stdenv.mkDerivation {
name = "zephyr-sdk-hosttools-nix";
dontUnpack = true;
dontBuild = true;
propagatedBuildInputs = with pkgs; [
bossa
dtc
nettle
openocd
qemu_full
shared-mime-info
];
installPhase = ''
mkdir $out
'';
};
}

316
flake.lock Normal file
View File

@ -0,0 +1,316 @@
{
"nodes": {
"crane": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"pyproject-nix",
"mdbook-nixdoc",
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1688772518,
"narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=",
"owner": "ipetkov",
"repo": "crane",
"rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"pyproject-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701473968,
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-root": {
"locked": {
"lastModified": 1692742795,
"narHash": "sha256-f+Y0YhVCIJ06LemO+3Xx00lIcqQxSKJHXT/yk1RTKxw=",
"owner": "srid",
"repo": "flake-root",
"rev": "d9a70d9c7a5fd7f3258ccf48da9335e9b47c3937",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "flake-root",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"mdbook-nixdoc": {
"inputs": {
"crane": "crane",
"flake-parts": [
"pyproject-nix",
"flake-parts"
],
"nix-github-actions": [
"pyproject-nix",
"nix-github-actions"
],
"nixpkgs": [
"pyproject-nix",
"nixpkgs"
],
"treefmt-nix": [
"pyproject-nix",
"treefmt-nix"
]
},
"locked": {
"lastModified": 1690987907,
"narHash": "sha256-p9iXhgEhV4Z5DPlS+9HlMOFBAc8v2B9SR5qEgOy+Qos=",
"owner": "adisbladis",
"repo": "mdbook-nixdoc",
"rev": "8563c0a3abe68f046a890846df406fcbaeb3d5b5",
"type": "github"
},
"original": {
"owner": "adisbladis",
"repo": "mdbook-nixdoc",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"pyproject-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701208414,
"narHash": "sha256-xrQ0FyhwTZK6BwKhahIkUVZhMNk21IEI1nUcWSONtpo=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "93e39cc1a087d65bcf7a132e75a650c44dd2b734",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1706913249,
"narHash": "sha256-x3M7iV++CsvRXI1fpyFPduGELUckZEhSv0XWnUopAG8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e92b6015881907e698782c77641aa49298330223",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1703255338,
"narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6df37dc6a77654682fe9f071c62b4242b5342e04",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"proc-flake": {
"locked": {
"lastModified": 1692742849,
"narHash": "sha256-Nv8SOX+O6twFfPnA9BfubbPLZpqc+UeK6JvIWnWkdb0=",
"owner": "srid",
"repo": "proc-flake",
"rev": "25291b6e3074ad5dd573c1cb7d96110a9591e10f",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "proc-flake",
"type": "github"
}
},
"pyproject-nix": {
"inputs": {
"flake-parts": "flake-parts",
"flake-root": "flake-root",
"mdbook-nixdoc": "mdbook-nixdoc",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_2",
"proc-flake": "proc-flake",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1705085606,
"narHash": "sha256-Hj+uqq/VXlKQwyKs85Jd0JcP49lI09Q2PTNX4S2FIGE=",
"owner": "nix-community",
"repo": "pyproject.nix",
"rev": "1e3581327260c4b4633f7b2ae923ee039f4446fa",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "pyproject.nix",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"pyproject-nix": "pyproject-nix",
"zephyr": "zephyr"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"pyproject-nix",
"mdbook-nixdoc",
"crane",
"flake-utils"
],
"nixpkgs": [
"pyproject-nix",
"mdbook-nixdoc",
"crane",
"nixpkgs"
]
},
"locked": {
"lastModified": 1688351637,
"narHash": "sha256-CLTufJ29VxNOIZ8UTg0lepsn3X03AmopmaLTTeHDCL4=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "f9b92316727af9e6c7fee4a761242f7f46880329",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"pyproject-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1702979157,
"narHash": "sha256-RnFBbLbpqtn4AoJGXKevQMCGhra4h6G2MPcuTSZZQ+g=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "2961375283668d867e64129c22af532de8e77734",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"zephyr": {
"flake": false,
"locked": {
"lastModified": 1697797249,
"narHash": "sha256-72QFsKOWkF6BiP4XgZAXXSBcN4t6yvhAeXCpgCYrhe8=",
"owner": "zephyrproject-rtos",
"repo": "zephyr",
"rev": "a6eef0ba3755f2530c5ce93524e5ac4f5be30194",
"type": "github"
},
"original": {
"owner": "zephyrproject-rtos",
"ref": "v3.5.0",
"repo": "zephyr",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

33
flake.nix Normal file
View File

@ -0,0 +1,33 @@
{
description = "Build Zephyr projects on Nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
pyproject-nix.url = "github:nix-community/pyproject.nix";
zephyr.url = "github:zephyrproject-rtos/zephyr/v3.5.0";
zephyr.flake = false;
};
outputs = { self, nixpkgs, zephyr, pyproject-nix }: (
let
inherit (nixpkgs) lib;
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
in
{
packages =
forAllSystems
(
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
pkgs.callPackages ./. {
zephyr-src = zephyr;
inherit pyproject-nix;
}
);
}
);
}

26
python.nix Normal file
View File

@ -0,0 +1,26 @@
{ python3
, zephyr-src
, pyproject-nix
, clang-tools
, gitlint
}:
let
python = python3.override {
self = python;
packageOverrides = self: super: {
clang-format = clang-tools;
inherit gitlint;
};
};
project = pyproject-nix.lib.project.loadRequirementsTxt {
requirements = zephyr-src + "/scripts/requirements.txt";
};
in
assert project.validators.validateVersionConstraints { inherit python; } == { };
python.withPackages (project.renderers.withPackages {
inherit python;
extraPackages = ps: [ ps.west ];
})

106
sdk.json Normal file
View File

@ -0,0 +1,106 @@
{
"files": {
"hosttools_linux-x86_64.tar.xz": "b9a1effc8c0bb089ac3b06e0981a04365cb3328042d766ec2715b4d7bdd4b9d0",
"toolchain_linux-x86_64_aarch64-zephyr-elf.tar.xz": "ebd062bdcdc8cbd111106d112147d845d3643260d1ed26135f4f041706042b8b",
"toolchain_linux-x86_64_arc-zephyr-elf.tar.xz": "51bfa93d460482340d513b8c0ce38e77306ec08f9017d8ffb8d631c91bf6ace4",
"toolchain_linux-x86_64_arc64-zephyr-elf.tar.xz": "59973703ed247af5bf2a273e702d1368d7b38f7dafcc2a16caaf5b55bddac896",
"toolchain_linux-x86_64_arm-zephyr-eabi.tar.xz": "d4278e95af74f8e9210b417e1cdc3ed45936cf6db9685d4174000a1a95b9f095",
"toolchain_linux-x86_64_microblazeel-zephyr-elf.tar.xz": "1019eef20d2a4392c325bfa3a691d739814e32db83b86d20571f8c08dd8c9c04",
"toolchain_linux-x86_64_mips-zephyr-elf.tar.xz": "28a7a3726c70fee903b3e00187935d223b1212fe3b82d381f6c999ca24d21fa6",
"toolchain_linux-x86_64_nios2-zephyr-elf.tar.xz": "b5384fce23b7a2a035b1a9a6b7309d25a31f6f395995358b60419459ffb46054",
"toolchain_linux-x86_64_riscv64-zephyr-elf.tar.xz": "95fd7dc49a7650bb740c721fa092784f73b53a41007f0beb3764c83ad71509d4",
"toolchain_linux-x86_64_sparc-zephyr-elf.tar.xz": "907218cad1a24a538174d78e91eb4775ef0148b32e9b9bb8d1b0f02f9e4e7de0",
"toolchain_linux-x86_64_x86_64-zephyr-elf.tar.xz": "a3474be6ba95d5c593e81996d3fcee5c3a283ca3c8fa148e35bb5494ddf39826",
"toolchain_linux-x86_64_xtensa-dc233c_zephyr-elf.tar.xz": "b4f4793a53e3af52be727d17ad7b23b8ad49ad897a460b15b936460e25ffb4bf",
"toolchain_linux-x86_64_xtensa-espressif_esp32_zephyr-elf.tar.xz": "07e6a82838981ac925dd632c88639253d729da628beb2bececaf79e9d771e220",
"toolchain_linux-x86_64_xtensa-espressif_esp32s2_zephyr-elf.tar.xz": "081edae1af7ffb07e2529a1afb973f9025c70732d6b7ec0aa7901324b64074bc",
"toolchain_linux-x86_64_xtensa-espressif_esp32s3_zephyr-elf.tar.xz": "d53f685a9e0d64de6a6e4b71b98bcf773d68653beb0ce52619626c6a81296275",
"toolchain_linux-x86_64_xtensa-intel_ace15_mtpm_zephyr-elf.tar.xz": "1d20422dcf6f38e524063d943ee7fb3b5620d6b31e47772181f21071cad5156c",
"toolchain_linux-x86_64_xtensa-intel_tgl_adsp_zephyr-elf.tar.xz": "8d08650f1256f8b9a06e0a59423f50a71a53bb739f707890e7858477b1976709",
"toolchain_linux-x86_64_xtensa-mtk_mt8195_adsp_zephyr-elf.tar.xz": "5922a5478a0dd2a89cdb435bad8bbfebf4234357679f16cb0cb8d46fcc2dd415",
"toolchain_linux-x86_64_xtensa-nxp_imx8m_adsp_zephyr-elf.tar.xz": "2856796517e277385a6f265ea372463c62138ccd3d0684dfc3ef66be1866f407",
"toolchain_linux-x86_64_xtensa-nxp_imx8ulp_adsp_zephyr-elf.tar.xz": "62bedb41be106c549764ed836345ede57a970a50dc4f8fde6835f00c4aa41c68",
"toolchain_linux-x86_64_xtensa-nxp_imx_adsp_zephyr-elf.tar.xz": "ecf705b1b39a75861023be699a850dc5901880e7ccd27dc61e5f6af1e070cde3",
"toolchain_linux-x86_64_xtensa-nxp_rt500_adsp_zephyr-elf.tar.xz": "4ceabfbcfab6a80fc3bc7894e1bbd86e06ab249cf48f1e6764df90d65223ae2f",
"toolchain_linux-x86_64_xtensa-nxp_rt600_adsp_zephyr-elf.tar.xz": "d318b596dcc361a1e4c6979fad9c4ef1de9fe73daf05f398e1aa73900251ab14",
"toolchain_linux-x86_64_xtensa-sample_controller_zephyr-elf.tar.xz": "db6822e42cfd001b8301ebb9f60c7b235ef16d827575b4df7e7c4cd27f426393",
"toolchain_macos-aarch64_aarch64-zephyr-elf.tar.xz": "1c8ab9a091717b8ec22c015d8c66d96dc0d9c28e57de2dfd1d15352a4c0ca891",
"toolchain_macos-aarch64_arc-zephyr-elf.tar.xz": "2dc0b3faf0ecaaffbad0e88bd4a8e149453cb54f33c70b949cc4661d31600d20",
"toolchain_macos-aarch64_arc64-zephyr-elf.tar.xz": "b8c27a2f73d0daa671f7ff7ef0f7dcb6a0ca8676a1e31bc565f0bb55f37ec2f2",
"toolchain_macos-aarch64_arm-zephyr-eabi.tar.xz": "84d14b8e3b46f4ff559b7fb2a627b66548f965f2c6ad70753397ff9245d765eb",
"toolchain_macos-aarch64_microblazeel-zephyr-elf.tar.xz": "0d87b928d36336d090ef7795997b610f57dbd59f0c30ae661cf321046521c5c0",
"toolchain_macos-aarch64_mips-zephyr-elf.tar.xz": "e74befb52a8aad2c85716cce79d830dfcc5e41754a321852abbe28445c9f58ac",
"toolchain_macos-aarch64_nios2-zephyr-elf.tar.xz": "87d0f07ac210def2c9623f0b2c890de7fc8c68088d33b5c5afdf05d71b558c89",
"toolchain_macos-aarch64_riscv64-zephyr-elf.tar.xz": "cdca37efbbaaf2631981068b176730da9ad8efd69eb0cd754418faf168beb94b",
"toolchain_macos-aarch64_sparc-zephyr-elf.tar.xz": "67a87d059496b4b3d26716b6a4b810b409012df9106395f92b0fab51eef67ef6",
"toolchain_macos-aarch64_x86_64-zephyr-elf.tar.xz": "fbea1cb993e731c644feb36fc3548c9b947516cd46a1f29cfa1307cbfe80955a",
"toolchain_macos-aarch64_xtensa-dc233c_zephyr-elf.tar.xz": "54793b93507db680f23b90afd2bad6ce3f519dd7946ddadff308c95244a0e052",
"toolchain_macos-aarch64_xtensa-espressif_esp32_zephyr-elf.tar.xz": "f31f12f7ca0533f867f3d7bd0f232124905bb6f6da9a7ce083e74632e65392b8",
"toolchain_macos-aarch64_xtensa-espressif_esp32s2_zephyr-elf.tar.xz": "47333d0dee178315ece7d7d4b8b64d016be5c5bc4aeb54451b5edd2543b27615",
"toolchain_macos-aarch64_xtensa-espressif_esp32s3_zephyr-elf.tar.xz": "1214175386f21970565109d915d8af32d14d25161ca3dfcfd34d8eb653a5f65b",
"toolchain_macos-aarch64_xtensa-intel_ace15_mtpm_zephyr-elf.tar.xz": "92cc5847980678b81fa7254833b0f46640f5cdcadcacbfa5936cb21621a0a135",
"toolchain_macos-aarch64_xtensa-intel_tgl_adsp_zephyr-elf.tar.xz": "7e419882944d894803ff50861a5eb63907a9be947fde30f49470bb624e57f6de",
"toolchain_macos-aarch64_xtensa-mtk_mt8195_adsp_zephyr-elf.tar.xz": "d219f718a3d7cee09953ea25b7168e722e46a9d2a5b106dde1d56a498de90382",
"toolchain_macos-aarch64_xtensa-nxp_imx8m_adsp_zephyr-elf.tar.xz": "7c5dd1eddbe406a25faace0928e6a9090ac160abb4130cda2aa59d2b48b90215",
"toolchain_macos-aarch64_xtensa-nxp_imx8ulp_adsp_zephyr-elf.tar.xz": "14b5af5e23dae82814b2e3da5d6198631b1f93d3be810636670ee77f6396b49a",
"toolchain_macos-aarch64_xtensa-nxp_imx_adsp_zephyr-elf.tar.xz": "68acb5f539e444f71c3e666de4472cfa98749dd72536fd601c21316babf23169",
"toolchain_macos-aarch64_xtensa-nxp_rt500_adsp_zephyr-elf.tar.xz": "e7f9f19b8138af118b941ce01a7959c7faf7e8b2b7e3d4e33e0d32146d48e048",
"toolchain_macos-aarch64_xtensa-nxp_rt600_adsp_zephyr-elf.tar.xz": "485a488f5d90f6e592d85580d8a80680b7be7f42133d6013456081fd8a792bc0",
"toolchain_macos-aarch64_xtensa-sample_controller_zephyr-elf.tar.xz": "746cd394645b34adb5eb2d1016124c8380baead69f588b9091374d044d5b4e11",
"toolchain_macos-x86_64_aarch64-zephyr-elf.tar.xz": "2c1cc8fff79d0e4a03c0026d907febce2e50a4745263ad89e742e6938ed022d0",
"toolchain_macos-x86_64_arc-zephyr-elf.tar.xz": "9fa325a6458651eb2a73124b1192457cb683db729fa96cee5334f915b7232152",
"toolchain_macos-x86_64_arc64-zephyr-elf.tar.xz": "2c8b702b139fe7e5360897260eda916b32f3b7da290251d516a998cf07e61737",
"toolchain_macos-x86_64_arm-zephyr-eabi.tar.xz": "b45e4a43ae53111267bb84d296bc29a4d8c811578aa8b1acf355fa90c3d8defe",
"toolchain_macos-x86_64_microblazeel-zephyr-elf.tar.xz": "ca095de661c896611b9dca4ab05f84d642d0d4732fb478846a2b74b11969ed11",
"toolchain_macos-x86_64_mips-zephyr-elf.tar.xz": "b947b7acc9e270ba54fd6d55e51ce6812fe04d8cae3bab5fdd3ef9ebefec7680",
"toolchain_macos-x86_64_nios2-zephyr-elf.tar.xz": "24a41dfff6adfe1dce32b461f9924ba40ea76df8b815a99b174e0f380e9d8a3c",
"toolchain_macos-x86_64_riscv64-zephyr-elf.tar.xz": "75f7a814af5db5d47af094e2b032e4db10f8018487281afbc5c10058b85e4db3",
"toolchain_macos-x86_64_sparc-zephyr-elf.tar.xz": "bd1d76b8f8381c67bb5421ec85cff69a3df562808800be90fa6edf3295e93bb1",
"toolchain_macos-x86_64_x86_64-zephyr-elf.tar.xz": "c31001270d39ff980a26d0916b23a0b0321433bc7132a870e1f1f30b6c79c5b7",
"toolchain_macos-x86_64_xtensa-dc233c_zephyr-elf.tar.xz": "8d603245c405dc6216196419fc3d845c7bba849860282241e82cbd2c679ffafb",
"toolchain_macos-x86_64_xtensa-espressif_esp32_zephyr-elf.tar.xz": "c60925c1d6d8eae914274f0710f60d1e577b42ad9b612e8d420d0d58fae22515",
"toolchain_macos-x86_64_xtensa-espressif_esp32s2_zephyr-elf.tar.xz": "a61b880070807201a20d7c2d7ef6b910a836c6ed10c530e10ed980629951444b",
"toolchain_macos-x86_64_xtensa-espressif_esp32s3_zephyr-elf.tar.xz": "39a37d71a25d781f232a79cd6e9465dd409788f8c7c43192976e89ae1fd0a15e",
"toolchain_macos-x86_64_xtensa-intel_ace15_mtpm_zephyr-elf.tar.xz": "78b6ffa62efac8b86eba1fd2f5052c7ab3378cf256943f9d48ccbbb1ce5caad1",
"toolchain_macos-x86_64_xtensa-intel_tgl_adsp_zephyr-elf.tar.xz": "75c1487819d746b9ed0aabd10eda12f12818c778af46b08ac753972c89d03932",
"toolchain_macos-x86_64_xtensa-mtk_mt8195_adsp_zephyr-elf.tar.xz": "38dd0c034e7c4fd364e37783f4a9d619409ee3cfd4300b277c84f1c02c4a928e",
"toolchain_macos-x86_64_xtensa-nxp_imx8m_adsp_zephyr-elf.tar.xz": "890ae1243deffb065d493b06c443212560f565d66391fe69feeb65fc0328fd90",
"toolchain_macos-x86_64_xtensa-nxp_imx8ulp_adsp_zephyr-elf.tar.xz": "cce92e45264c1d6162deec63540e00ae41130afeb7c6eb566590474193c8e850",
"toolchain_macos-x86_64_xtensa-nxp_imx_adsp_zephyr-elf.tar.xz": "a9181fc17810955bcdcbafec9c62bb010d9c0ea2649a8ea1b1885336025bc726",
"toolchain_macos-x86_64_xtensa-nxp_rt500_adsp_zephyr-elf.tar.xz": "90fdae78be71fb933140d14c00e6ad9f623ddc3f679112669c3357f2ee04c493",
"toolchain_macos-x86_64_xtensa-nxp_rt600_adsp_zephyr-elf.tar.xz": "935d2b91cac993773bc9d07c196afc5197acb74730eb0476e1a8b7485ac62e00",
"toolchain_macos-x86_64_xtensa-sample_controller_zephyr-elf.tar.xz": "2250f9f03f81bbc30c798cbb0e3fe9f1660b2fc6f48fcb69adbc9fce0986dd61",
"toolchain_windows-x86_64_aarch64-zephyr-elf.7z": "4e2beeeed1dc7109246cc68cec616ae0262d0c7ad2018d4ba7e19e6aad5bcea1",
"toolchain_windows-x86_64_arc-zephyr-elf.7z": "6eb204f9b533b6a60ae3dde95b23666c460db92235b5b4b8ba5cda8b03d3d449",
"toolchain_windows-x86_64_arc64-zephyr-elf.7z": "08e9c05e36b9f7fbfc9d45062ee12ab0833125342ba515686d8c744297659c0d",
"toolchain_windows-x86_64_arm-zephyr-eabi.7z": "d07619ff828b8c39648995cb4ec6e5acd4119a942962bb1505ff5f427dac0d72",
"toolchain_windows-x86_64_microblazeel-zephyr-elf.7z": "e1c282653bbd7d78b3e4fe53b843b8b0a37aaa2b890f93c0602d8fa529fcab44",
"toolchain_windows-x86_64_mips-zephyr-elf.7z": "79f737ddef4925cefbeb46dd0a9ba973e6e3a46cd6fedc0cf41b07cd5b3f8def",
"toolchain_windows-x86_64_nios2-zephyr-elf.7z": "0a22f74a9b4682bea1ebf34347757b5bc8136deb2c795bac06411dd0f97c128e",
"toolchain_windows-x86_64_riscv64-zephyr-elf.7z": "03475dbfc8b2fb59923daa929389b60e10afdc8c9a87ef3e77785acfbc9aa6e7",
"toolchain_windows-x86_64_sparc-zephyr-elf.7z": "79a8223ed8bb87b2dc704c5f5aa31692c5f9f7eaf0c4d0a4def4cb77fa475d49",
"toolchain_windows-x86_64_x86_64-zephyr-elf.7z": "a161b200187b6e7bcfc2fc2f266a753ac7f89e1690d620b11c1deb4bf651a7f6",
"toolchain_windows-x86_64_xtensa-dc233c_zephyr-elf.7z": "8ef59b65efe2404201c7e342015f3d93c7b824b774d57ede22249a95db5990ab",
"toolchain_windows-x86_64_xtensa-espressif_esp32_zephyr-elf.7z": "78db6ec88920049f2ee767552f16f2c132368397458189910d5c43e4fd0b40db",
"toolchain_windows-x86_64_xtensa-espressif_esp32s2_zephyr-elf.7z": "54de491115d0680c2db1eb69215069bf1a21f1455d178813487062032cb7ff3b",
"toolchain_windows-x86_64_xtensa-espressif_esp32s3_zephyr-elf.7z": "944c0a005593807501666a6b7d076199dbea55b6a81916085aa168a9255e947a",
"toolchain_windows-x86_64_xtensa-intel_ace15_mtpm_zephyr-elf.7z": "732ef0238c9c1fe9a6ac19f53f2ac33040174e442cf9b87bbf64ad39504fc059",
"toolchain_windows-x86_64_xtensa-intel_tgl_adsp_zephyr-elf.7z": "8ffb0520992f32812739ab642cf1a4ad8413a9c31e091cd124f13201cd699009",
"toolchain_windows-x86_64_xtensa-mtk_mt8195_adsp_zephyr-elf.7z": "87335accc99bfdfbadca8e92f4951ca8f4404345af9d319493de332743ecaf32",
"toolchain_windows-x86_64_xtensa-nxp_imx8m_adsp_zephyr-elf.7z": "3b77aee9341113907bae1a24acd3d26bfcfea076fb9ff2da2d39bf9043cddb4e",
"toolchain_windows-x86_64_xtensa-nxp_imx8ulp_adsp_zephyr-elf.7z": "6f6667339a3e3bb75720c0203b850af32eba616126fc2e853f37a31e2861edb7",
"toolchain_windows-x86_64_xtensa-nxp_imx_adsp_zephyr-elf.7z": "f18401d59fec3830f7841b68326ac870cc9af15b34e4c5aeeb9e90013f2b8a69",
"toolchain_windows-x86_64_xtensa-nxp_rt500_adsp_zephyr-elf.7z": "70683b8b515a404eb7361699a05e33e417ea2a9e619277b0ca3d25ac4f23faab",
"toolchain_windows-x86_64_xtensa-nxp_rt600_adsp_zephyr-elf.7z": "26bfa3d5e8ef16098b996449da5420010c42fa1d6b75335f9ecc5f5787e13f20",
"toolchain_windows-x86_64_xtensa-sample_controller_zephyr-elf.7z": "db97a2ace5b1609c5d36aaa42f6aef61d6300a5f7b1962ad4278c2ba078780aa",
"zephyr-sdk-0.16.5_linux-x86_64.tar.xz": "eb4495e2e04387c822f8482be116a8f4ab3d1d2bfc1c1aeb53ca67937acf0009",
"zephyr-sdk-0.16.5_linux-x86_64_minimal.tar.xz": "933ab6b4cd78dccf8fe0cf59d1b626efc309008408eaf848173c70360f848ee1",
"zephyr-sdk-0.16.5_macos-aarch64.tar.xz": "c42b84ff6ae888b4395c1a0162d08a8422042a8edb1fee23a39cddfe763d713d",
"zephyr-sdk-0.16.5_macos-aarch64_minimal.tar.xz": "aa0a0ff299c20e5c2ace11e1c40f7b9b6fd3f2629e4708a3dd1e273fd1991e89",
"zephyr-sdk-0.16.5_macos-x86_64.tar.xz": "2588f4ca042c5e88e61ccd82344a19ae9ddee987d7b796a3e6dcf10231ef2af9",
"zephyr-sdk-0.16.5_macos-x86_64_minimal.tar.xz": "b2cf29b7fa25e0459da559be1f957b3661d86560cfca8b8606277aad5ad77a78",
"zephyr-sdk-0.16.5_windows-x86_64.7z": "71ce28c45047870b3ff0e814953c604a2fb722448c448f8428d2a07e8bea91d5",
"zephyr-sdk-0.16.5_windows-x86_64_minimal.7z": "04055f0a7c73b9ee9c25ef10c080e663d9f34425a33661850a2e2b1e52d0a7bd"
},
"version": "0.16.5"
}

6
update-sdk Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
version=$1
curl -L "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v$version/sha256.sum" | jq -R -n "[ inputs | split(\" \") | {(.[2]): .[0]} ] | add | { \"files\": ., \"version\": \"$version\"}" > sdk.json