Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Created January 2, 2021 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/3f238420cd764bc3e449d41b84dbc763 to your computer and use it in GitHub Desktop.
Save cleverca22/3f238420cd764bc3e449d41b84dbc763 to your computer and use it in GitHub Desktop.
{ runCommand, eeprom-extractor, rpi-eeprom, time }:
runCommand "extracted" { buildInputs = [ eeprom-extractor time ]; } ''
for channel in beta critical stable; do
for file in ${rpi-eeprom}/firmware/$channel/pieeprom*.bin; do
cp -v $file $channel-$(basename $file)
done
done
mkdir $out
cd $out
for file in $NIX_BUILD_TOP/*.bin; do
name=$(basename $file)
name=''${name%.*}
echo $file X ''$name
mkdir $name
pushd $name
command time -v extractor $file
popd
done
''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment