@@ -185,19 +185,6 @@ else
185185 announce_stop " Finding the cache directory: Using specified name"
186186fi
187187
188- # If the file is already a sparse image, don't re-sparse it
189- # Find the name of the sparse-image by extractin the filename sans path from GOLD_MASTER_OS_FILE
190- prepare_sparse_image () {
191- SPARSE_IMAGE_NAME=$( basename " ${GOLD_MASTER_OS_FILE} " )
192- if [ ! -f " ${RPI_SB_WORKDIR} /${SPARSE_IMAGE_NAME} " ]; then
193- # If the file doesn't exist, we need to convert it to a sparse image
194- img2simg " ${GOLD_MASTER_OS_FILE} " " ${RPI_SB_WORKDIR} /${SPARSE_IMAGE_NAME} "
195- announce_stop " Converting OS image to sparse image"
196- else
197- announce_stop " Using existing sparse image"
198- fi
199- }
200- with_lock " ${LOCK_BASE} /rootfs-image.lock" 600 prepare_sparse_image
201188
202189systemd-notify --ready --status=" Provisioning started"
203190
@@ -208,12 +195,12 @@ fastboot -s "${FASTBOOT_DEVICE_SPECIFIER}" erase "${RPI_DEVICE_STORAGE_TYPE}"
208195sleep 3
209196announce_stop " Erase Device Storage"
210197
211- fastboot -s " ${FASTBOOT_DEVICE_SPECIFIER} " flash " ${RPI_DEVICE_STORAGE_TYPE} " " ${RPI_SB_WORKDIR} /${SPARSE_IMAGE_NAME} "
212- announce_stop " Writing OS images"
213-
214198# Re-check the fastboot devices specifier, as it may take a while for a device to gain IP connectivity
215199setup_fastboot_and_id_vars " ${FASTBOOT_DEVICE_SPECIFIER} "
216200
201+ fastboot -s " ${FASTBOOT_DEVICE_SPECIFIER} " flash " ${RPI_DEVICE_STORAGE_TYPE} " " ${GOLD_MASTER_OS_FILE} "
202+ announce_stop " Writing OS images"
203+
217204announce_start " Set LED status"
218205fastboot -s " ${FASTBOOT_DEVICE_SPECIFIER} " oem led PWR 0
219206announce_stop " Set LED status"
0 commit comments