Skip to content

Commit 03dbe2e

Browse files
macpijanfilipleple
authored andcommitted
toolchain: add sdcc and xxd
Required to to build dasharo-ec module. Need to pin SDCC version to 4.2.0 to avoid Dasharo/dasharo-issues#1785 and be in sync with ec-sdk: Dasharo/ec-sdk#2 Using 3.8.0 in nix toolchain (as originally used in ec-sdk) was not feasible: #2062 (comment) Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
1 parent 7f9a7bf commit 03dbe2e

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

flake.lock

Lines changed: 18 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,23 @@
44
# Inputs define external dependencies and their sources.
55
inputs = {
66
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Using the unstable channel for the latest packages, while flake.lock fixates the commit reused until changed.
7+
# No flake for 3.8.0
8+
# Pinned nixpkgs for sdcc 4.2.0 - matches: https://github.com/Dasharo/ec-sdk/pull/2
9+
# sdcc 4.5.0 has optimizer bug: https://github.com/Dasharo/dasharo-issues/issues/1785
10+
nixpkgs-sdcc.url = "github:nixos/nixpkgs/7a339d87931bba829f68e94621536cad9132971a";
711
flake-utils.url = "github:numtide/flake-utils"; # Utilities for flake functionality.
812
};
913
# Outputs are the result of the flake, including the development environment and Docker image.
1014
outputs = {
1115
self,
1216
flake-utils,
1317
nixpkgs,
18+
nixpkgs-sdcc,
1419
...
1520
}:
1621
flake-utils.lib.eachDefaultSystem (system: let
1722
pkgs = nixpkgs.legacyPackages.${system}; # Accessing the legacy package set.
23+
pkgs-sdcc = nixpkgs-sdcc.legacyPackages.${system}; # Pinned for sdcc 4.2.0
1824
lib = pkgs.lib; # The standard Nix packages library.
1925

2026
# Dependencies are the packages required for the Heads project.
@@ -63,11 +69,13 @@
6369
psmisc #process tools like killall, pstree, etc
6470
python3 # me_cleaner, coreboot
6571
rsync # coreboot
72+
pkgs-sdcc.sdcc # Dasharo EC build — pinned to 4.2.0 (matches Debian oldstable, 4.5 has optimizer bug)
6673
sharutils
6774
texinfo
6875
unzip
6976
wget
7077
which
78+
xxd # Dasharo EC build
7179
xz
7280
zip
7381
zlib

0 commit comments

Comments
 (0)