Skip to content

Instantly share code, notes, and snippets.

@samueldr
Created June 21, 2022 20:33
Show Gist options
  • Select an option

  • Save samueldr/63933ce5245e8a1316824eba29230318 to your computer and use it in GitHub Desktop.

Select an option

Save samueldr/63933ce5245e8a1316824eba29230318 to your computer and use it in GitHub Desktop.
static dtc for armv7l
#
# Dirty override to compile a static dtc binary for armv7l
#
# $ git rev-parse HEAD
# 0d68d7c857fe301d49cdcd56130e0beea4ecd5aa
# $ nix-build -I nixpkgs=./. ./dtc-static.nix
#
{ pkgs ? import <nixpkgs> { } }:
pkgs.pkgsCross.armv7l-hf-multiplatform.pkgsStatic.dtc.overrideAttrs (_: {
makeFlags = [ "PYTHON=python" "V=1" "CFLAGS=-fPIC" "dtc" ];
installTargets = [ "dtc" ];
postInstall = ''
mkdir -p $out/bin
cp dtc $out/bin/
'';
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment