-
-
Save cleverca22/cf965f58caa80fdd65a5119d96cbdec3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
nixpkgs = builtins.fetchTarball "https://github.com/nixos/nixpkgs/archive/038afc6.tar.gz"; | |
pkgs = import nixpkgs {}; | |
in { | |
changeConfig = { bootconf, eeprom, ts }: | |
pkgs.runCommand "eeprom.img" { | |
buildInputs = [ pkgs.raspberrypi-eeprom ]; | |
} '' | |
cp ${eeprom} pieeprom.bin | |
mkdir $out | |
# Apply config | |
rpi-eeprom-config --config ${bootconf} --out $out/pieeprom.bin pieeprom.bin | |
sha256sum $out/pieeprom.bin | cut -d' ' -f1 > $out/pieeprom.sig | |
echo 'ts: ${ts}' >> $out/pieeprom.sig | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment