Skip to content

Commit d0a7cdb

Browse files
committed
toolchain: add sdcc and xdd
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 4c43a0f commit d0a7cdb

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,36 @@
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+
# Pinned nixpkgs for sdcc 4.2.0 — matches Debian oldstable.
8+
# Requires (void) prototype patches (included in patches/dasharo-ec).
9+
# sdcc 4.5.0 has optimizer bug ("EVELYN the modified DOG") on smfi.c.
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.
2127
# Organized into subsets for clarity and maintainability.
2228
deps = with pkgs; [
2329
# Core build utilities
2430
autoconf
25-
avrdude # Dasharo EC build
2631
automake
2732
bashInteractive
2833
coreutils #basic tools like ls, cp, mv, kill)
2934
bc
3035
bison # Generate flashmap descriptor parser
3136
bzip2
32-
cargo # Dasharo EC build
3337
cacert
3438
ccache
3539
coreboot-utils #consumed by diffoscope for ifdtool cbfsutils etc
@@ -61,18 +65,17 @@
6165
patch
6266
perl
6367
pkg-config
64-
pkgsCross.avr.buildPackages.gcc # Dasharo EC build
65-
pkgsCross.avr.libcCross # Dasharo EC build
6668
procps #process tools like free, pidof, pkill, top, vmstat, watch, etc
6769
psmisc #process tools like killall, pstree, etc
6870
python3 # me_cleaner, coreboot
6971
rsync # coreboot
70-
sdcc # Dasharo EC build
72+
pkgs-sdcc.sdcc # Dasharo EC build — pinned to 4.2.0 (matches Debian oldstable, 4.5 has optimizer bug)
7173
sharutils
7274
texinfo
7375
unzip
7476
wget
7577
which
78+
xxd # Dasharo EC build
7679
xz
7780
zip
7881
zlib

0 commit comments

Comments
 (0)