Created
March 27, 2021 13:35
-
-
Save jphastings/c45b765ba80ce265b0559ed14edfa149 to your computer and use it in GitHub Desktop.
Ensures the basic RPi firmware is in the given folder
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
#!/bin/sh | |
FIRMWAREURL="https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/" | |
DIR="$1" | |
[ ! -d "${DIR}" ] && { echo "First argument should be a directory that exists"; exit 1; } | |
for firmware in LICENCE.broadcom bootcode.bin fixup.dat start.elf; do | |
firmware_dest="${DIR}/${firmware}"; | |
if [ ! -f "${firmware_dest}" ]; then | |
echo "Downloading RPi firmware: ${firmware}"; | |
curl --silent --output "${firmware_dest}" "${FIRMWAREURL}${firmware}"; | |
fi; | |
done | |
echo "RPi firmware present" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment