rpi-update: Add SKIP_FIRMWARE option

This commit is contained in:
Dom Cobley
2023-01-20 17:16:14 +00:00
parent 94a757bff9
commit 24e0eeb75a

View File

@@ -43,6 +43,7 @@ fi
BOOT_PATH=${BOOT_PATH:-"/boot"} BOOT_PATH=${BOOT_PATH:-"/boot"}
WORK_PATH=${WORK_PATH:-"${ROOT_PATH}/root"} WORK_PATH=${WORK_PATH:-"${ROOT_PATH}/root"}
SKIP_KERNEL=${SKIP_KERNEL:-0} SKIP_KERNEL=${SKIP_KERNEL:-0}
SKIP_FIRMWARE=${SKIP_FIRMWARE:-0}
SKIP_SDK=${SKIP_SDK:-0} SKIP_SDK=${SKIP_SDK:-0}
SKIP_VCLIBS=${SKIP_VCLIBS:-0} SKIP_VCLIBS=${SKIP_VCLIBS:-0}
SKIP_REPODELETE=${SKIP_REPODELETE:-0} SKIP_REPODELETE=${SKIP_REPODELETE:-0}
@@ -340,6 +341,7 @@ function check_partition {
} }
function update_firmware { function update_firmware {
if [[ ${SKIP_FIRMWARE} -eq 0 ]]; then
echo " *** Updating firmware" echo " *** Updating firmware"
rm -rf "${FW_PATH}/"start*.elf rm -rf "${FW_PATH}/"start*.elf
rm -rf "${FW_PATH}/"fixup*.dat rm -rf "${FW_PATH}/"fixup*.dat
@@ -352,6 +354,7 @@ function update_firmware {
cp "${FW_REPOLOCAL}/"fixup{,[^4]*}.dat "${FW_PATH}/" cp "${FW_REPOLOCAL}/"fixup{,[^4]*}.dat "${FW_PATH}/"
fi fi
cp "${FW_REPOLOCAL}/"*.bin "${FW_PATH}/" cp "${FW_REPOLOCAL}/"*.bin "${FW_PATH}/"
fi
if [[ ${SKIP_KERNEL} -eq 0 ]]; then if [[ ${SKIP_KERNEL} -eq 0 ]]; then
if [[ ${WANT_32BIT} -eq 1 ]]; then if [[ ${WANT_32BIT} -eq 1 ]]; then
cp "${FW_REPOLOCAL}/"kernel.img "${FW_REPOLOCAL}/"kernel7.img "${FW_PATH}/" cp "${FW_REPOLOCAL}/"kernel.img "${FW_REPOLOCAL}/"kernel7.img "${FW_PATH}/"