From 86a52fa755c3af47633b4e52950ee863218a80d5 Mon Sep 17 00:00:00 2001 From: Jybz Date: Sun, 5 Jan 2020 12:26:18 +0100 Subject: rpi3b+64b --- platforms/rpi3+64/specialFunctions.sh | 50 ++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 22 deletions(-) (limited to 'platforms/rpi3+64/specialFunctions.sh') diff --git a/platforms/rpi3+64/specialFunctions.sh b/platforms/rpi3+64/specialFunctions.sh index c239b89..a62c794 100755 --- a/platforms/rpi3+64/specialFunctions.sh +++ b/platforms/rpi3+64/specialFunctions.sh @@ -40,29 +40,35 @@ FDISK_SCRIPT="${NEW_PART}\n${PRIMARY}\n${PART_BOOT}\n${PART_BOOT_FIRST_SECTOR}\n function preImgCreation() { + + title "Download binary blob for Rpi" + for i in ${FIRMWARE_DOWNLOAD_URL}; do + info "Download ${i}" + curl -L -O -J ${i} -s + done + +# if ! [ -d "${FIRMWARE_PATH}/${FIRMWARE_DIR}" ]; then # the firmware directory does not exists +# echo "$(ls *.zip| wc -l)" +# if [ "$(ls *.zip| wc -l)" -eq 0 ]; then # the firmware archive does not exists +# warning "The raspberry pi firmware need to be downloaded" +# info "Downloading FIRMWARE_FILENAME" +# wget ${FIRMWARE_DOWNLOAD_URL} +# # curl -L -O -J ${FIRMWARE_DOWNLOAD_URL} +# # curl -L ${FIRMWARE_DOWNLOAD_URL} -o firmware-stable.zip +# if [ ${?} -ne 0 ]; then +# error "line ${LINENO} error downloading raspberry firmware at ${FIRMWARE_DOWNLOAD_URL}: exiting" +# exit 1 +# fi +# fi +# info "extracting firmware" +# unzip -d "${FIRMWARE_PATH}" *.zip +# if [ ${?} -ne 0 ]; then +# error "line ${LINENO} error unzipping ${FIRMWARE_PATH} : exiting" +# exit 1 +# fi +# fi + title "Creating Pi image" - - if ! [ -d "${FIRMWARE_PATH}/${FIRMWARE_DIR}" ]; then # the firmware directory does not exists - echo "$(ls *.zip| wc -l)" - if [ "$(ls *.zip| wc -l)" -eq 0 ]; then # the firmware archive does not exists - warning "The raspberry pi firmware need to be downloaded" - info "Downloading FIRMWARE_FILENAME" - wget ${FIRMWARE_DOWNLOAD_URL} -# curl -L -O -J ${FIRMWARE_DOWNLOAD_URL} -# curl -L ${FIRMWARE_DOWNLOAD_URL} -o firmware-stable.zip - if [ ${?} -ne 0 ]; then - error "line ${LINENO} error downloading raspberry firmware at ${FIRMWARE_DOWNLOAD_URL}: exiting" - exit 1 - fi - fi - info "extracting firmware" - unzip -d "${FIRMWARE_PATH}" *.zip - if [ ${?} -ne 0 ]; then - error "line ${LINENO} error unzipping ${FIRMWARE_PATH} : exiting" - exit 1 - fi - fi - title "Making raspberry pi image" return 0 } -- cgit v1.2.1