after applying the patch run rpi-update with the following command (all other options work as well)
- Code: Select all
sudo UPDATE2=0 SHOUTY=1 rpi-update
UPDATE2=0 is an already available option in rpi-update, it stops the rpi-update script from updating itself and overwriting the patch. SHOUTY=1 makes the script really verbose, SHOUTY=0 or not set reverts to the normal quiet function
the patch is below
- Code: Select all
--- rpi-update 2012-12-31 13:19:01.057446020 -0500
+++ rpi-update.new 2012-12-31 14:34:47.773745263 -0500
@@ -14,6 +14,22 @@
exit 1
fi
+if [ ${SHOUTY:-"unset"} == "unset" ] || [ $SHOUTY == 0 ]; then
+ # Default
+ SSSHH="--quiet"
+ # git reset & git clean don't have a "be verbose" option so we have to be ugly
+ SPECIAL_GIT_SSSHH="--quiet"
+ # tar & cp don't have a "be quiet" option so we have to be ugly
+ TARCP_SSSHH=""
+else
+ # Default
+ SSSHH="--verbose"
+ # git reset & clean don't have a be "verbose" option so we have to be ugly
+ SPECIAL_GIT_SSSHH=""
+ # tar & cp don't have a "be quiet" option so we have to be ugly
+ TARCP_SSSHH="--verbose"
+fi
+
ROOT_PATH=${ROOT_PATH:-"/"}
BOOT_PATH=${BOOT_PATH:-"/boot"}
SKIP_KERNEL=${SKIP_KERNEL:-0}
@@ -30,7 +46,7 @@
echo "Performing self-update"
_tempFileName="$0.tmp"
- if ! wget --quiet --output-document="${_tempFileName}" "${UPDATE_URI}"; then
+ if ! wget ${SSSHH} --output-document="${_tempFileName}" "${UPDATE_URI}"; then
echo "Failed to download update for rpi-update!"
echo "Make sure you have ca-certificates installed and that the time is set correctly"
exit 1
@@ -57,7 +73,7 @@
function update_modules {
if [[ ${SKIP_KERNEL} -eq 0 ]]; then
- cp -R "${FW_REPOLOCAL}/modules/"* "${FW_MODPATH}/"
+ cp ${TARCP_SSSHH} -R "${FW_REPOLOCAL}/modules/"* "${FW_MODPATH}/"
find "${FW_REPOLOCAL}/modules" -mindepth 1 -maxdepth 1 -type d | while read DIR; do
depmod -b "${ROOT_PATH}" -a $(basename "${DIR}")
done
@@ -72,12 +88,12 @@
ELFOUTPUT=$(readelf -a "${ROOT_PATH}/bin/bash")
if [ "${ELFOUTPUT}" != "${ELFOUTPUT/VFP_args/}" ]; then
echo "Using HardFP libraries"
- cp -R "${FW_REPOLOCAL}/vc/hardfp/"* "${ROOT_PATH}/"
+ cp ${TARCP_SSSHH} -R "${FW_REPOLOCAL}/vc/hardfp/"* "${ROOT_PATH}/"
else
echo "Using SoftFP libraries"
- cp -R "${FW_REPOLOCAL}/vc/softfp/"* "${ROOT_PATH}/"
+ cp ${TARCP_SSSHH} -R "${FW_REPOLOCAL}/vc/softfp/"* "${ROOT_PATH}/"
fi
- cp -R "${FW_REPOLOCAL}/vc/sdk/"* "${ROOT_PATH}/"
+ cp ${TARCP_SSSHH} -R "${FW_REPOLOCAL}/vc/sdk/"* "${ROOT_PATH}/"
if [[ -f /etc/init.d/vcfiled ]]; then
/etc/init.d/vcfiled start
@@ -87,11 +103,11 @@
function update_firmware {
rm -rf ${FW_PATH}/*.elf
rm -rf ${FW_PATH}/*.bin
- cp ${FW_REPOLOCAL}/*.elf "${FW_PATH}/"
- cp ${FW_REPOLOCAL}/*.bin "${FW_PATH}/"
- cp ${FW_REPOLOCAL}/*.dat "${FW_PATH}/"
+ cp ${TARCP_SSSHH} ${FW_REPOLOCAL}/*.elf "${FW_PATH}/"
+ cp ${TARCP_SSSHH} ${FW_REPOLOCAL}/*.bin "${FW_PATH}/"
+ cp ${TARCP_SSSHH} ${FW_REPOLOCAL}/*.dat "${FW_PATH}/"
if [[ ${SKIP_KERNEL} -eq 0 ]]; then
- cp "${FW_REPOLOCAL}/"*.img "${FW_PATH}/"
+ cp ${TARCP_SSSHH} "${FW_REPOLOCAL}/"*.img "${FW_PATH}/"
else
echo "Skipping kernel/modules updated as requested"
fi
@@ -111,7 +127,7 @@
function download_repo {
echo "Setting up firmware (this will take a few minutes)"
mkdir -p "${FW_REPOLOCAL}"
- git clone "${FW_REPO}" "${FW_REPOLOCAL}" --depth=1 --quiet
+ git clone "${FW_REPO}" "${FW_REPOLOCAL}" --depth=1 ${SSSHH}
RETVAL=$?
if [[ ${RETVAL} -ne 0 ]]; then
echo "Failed to download new firmware files"
@@ -121,15 +137,15 @@
function update_repo {
echo "Updating firmware (this will take a few minutes)"
- eval ${GITCMD} fetch --quiet
+ eval ${GITCMD} fetch ${SSSHH}
RETVAL=$?
if [[ ${RETVAL} -ne 0 ]]; then
echo "Failed to download updated firmware files"
exit 1
fi
- eval ${GITCMD} reset --hard --quiet
- eval ${GITCMD} clean -f -d --quiet
- eval ${GITCMD} merge origin/master -m "automerge" --quiet
+ eval ${GITCMD} reset --hard ${SPECIAL_GIT_SSSHH}
+ eval ${GITCMD} clean -f -d ${SPECIAL_GIT_SSSHH}
+ eval ${GITCMD} merge origin/master -m "automerge" ${SSSHH}
RETVAL=$?
if [[ ${RETVAL} -ne 0 ]]; then
echo "Failed to download updated firmware files"
@@ -138,8 +154,8 @@
}