mirror of
https://github.com/raspberrypi/rpi-update.git
synced 2026-01-21 06:13:34 +08:00
Allow rpi-update to an empty directory
Not directly useful, but allows the files retrieved by rpi-update to be examined without performing a real update.
This commit is contained in:
27
rpi-update
27
rpi-update
@@ -90,8 +90,12 @@ function update_modules {
|
|||||||
function update_vc_libs {
|
function update_vc_libs {
|
||||||
echo " *** Updating VideoCore libraries"
|
echo " *** Updating VideoCore libraries"
|
||||||
|
|
||||||
ELFOUTPUT=$(readelf -a "${ROOT_PATH}/bin/sh")
|
if [[ -e ${ROOT_PATH}/bin/sh ]]; then
|
||||||
if [ "${ELFOUTPUT}" != "${ELFOUTPUT/VFP_args/}" ]; then
|
ELFOUTPUT=$(readelf -a "${ROOT_PATH}/bin/sh")
|
||||||
|
else
|
||||||
|
ELFOUTPUT="VFP_args"
|
||||||
|
fi
|
||||||
|
if [[ "${ELFOUTPUT}" != "${ELFOUTPUT/VFP_args/}" ]]; then
|
||||||
echo " *** Using HardFP libraries"
|
echo " *** Using HardFP libraries"
|
||||||
cp -R "${FW_REPOLOCAL}/vc/hardfp/"* "${ROOT_PATH}/"
|
cp -R "${FW_REPOLOCAL}/vc/hardfp/"* "${ROOT_PATH}/"
|
||||||
else
|
else
|
||||||
@@ -162,8 +166,10 @@ function finalise {
|
|||||||
echo " *** Setting 192M ARM split"
|
echo " *** Setting 192M ARM split"
|
||||||
cp "${FW_PATH}/arm192_start.elf" "${FW_PATH}/start.elf"
|
cp "${FW_PATH}/arm192_start.elf" "${FW_PATH}/start.elf"
|
||||||
fi
|
fi
|
||||||
echo " *** Running ldconfig"
|
if [[ -e ${ROOT_PATH}/etc ]]; then
|
||||||
ldconfig -r "${ROOT_PATH}"
|
echo " *** Running ldconfig"
|
||||||
|
ldconfig -r "${ROOT_PATH}"
|
||||||
|
fi
|
||||||
echo " *** Storing current firmware revision"
|
echo " *** Storing current firmware revision"
|
||||||
echo "${FW_REV}" > "${FW_REVFILE}"
|
echo "${FW_REV}" > "${FW_REVFILE}"
|
||||||
}
|
}
|
||||||
@@ -278,18 +284,23 @@ fi
|
|||||||
|
|
||||||
echo " *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom"
|
echo " *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom"
|
||||||
|
|
||||||
|
if [[ ! -d ${WORK_PATH} ]]; then
|
||||||
|
echo " !!! ${WORK_PATH} doesn't exist - creating"
|
||||||
|
mkdir -p ${WORK_PATH}
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${UPDATE_SELF} -ne 0 ]]; then
|
if [[ ${UPDATE_SELF} -ne 0 ]]; then
|
||||||
update_self
|
update_self
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d "${FW_PATH}" ]]; then
|
if [[ ! -d "${FW_PATH}" ]]; then
|
||||||
echo " !!! ${FW_PATH} doesn't exist"
|
echo " !!! ${FW_PATH} doesn't exist - creating"
|
||||||
exit 1
|
mkdir -p ${FW_PATH}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${SKIP_KERNEL} -eq 0 ]] && [[ ! -d "${FW_MODPATH}" ]]; then
|
if [[ ${SKIP_KERNEL} -eq 0 ]] && [[ ! -d "${FW_MODPATH}" ]]; then
|
||||||
echo " !!! ${FW_MODPATH} doesn't exist"
|
echo " !!! ${FW_MODPATH} doesn't exist - creating"
|
||||||
exit 1
|
mkdir -p ${FW_MODPATH}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${NOOBS_CHECK} -eq 1 ]] && [[ -f ${BOOT_PATH}/recovery.elf ]]; then
|
if [[ ${NOOBS_CHECK} -eq 1 ]] && [[ -f ${BOOT_PATH}/recovery.elf ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user