Skip to content

Instantly share code, notes, and snippets.

@atomicstack
Last active May 6, 2025 12:36
Show Gist options
  • Save atomicstack/9c43e452c4b7cefb37c1e78f65b0b1fa to your computer and use it in GitHub Desktop.
Save atomicstack/9c43e452c4b7cefb37c1e78f65b0b1fa to your computer and use it in GitHub Desktop.
a one-liner to fetch the latest revisions of /boot/*.{elf,dat} in the RPi firmware repository (because it's a 14GB repo and cloning takes forever, and we're only interested in ~20MB of data). requires the command line utils wget and jq
wget --base=https://github.com/raspberrypi/firmware/raw/master/ -i <( wget -qO- https://github.com/raspberrypi/firmware/raw/master/boot/ | grep 'react-app.embeddedData' | perl -nE 's{\s+<script[^>]+>}{}; s{</script>}{}; say' | jq -r '.payload.tree.items[].path | select(test("(elf|dat)$"))' )
@atomicstack
Copy link
Author

Updated again to deal with embedded JSON

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment