mirror of
https://github.com/raspberrypi/rpi-update.git
synced 2026-01-20 21:13:38 +08:00
Merge pull request #89 from rm-hull/master
BRANCH env variable allows alternate branch to be specified
This commit is contained in:
@@ -63,6 +63,15 @@ are not currently booted from. Useful for installing firmware/kernel to a
|
|||||||
non-RPI customised image. Be careful, you must specify both options or neither.
|
non-RPI customised image. Be careful, you must specify both options or neither.
|
||||||
Specifying only one will not work.
|
Specifying only one will not work.
|
||||||
|
|
||||||
|
#### `BRANCH`
|
||||||
|
|
||||||
|
By default, clones the firmware files from the master branch, else uses the files
|
||||||
|
from the specified branch, eg:
|
||||||
|
|
||||||
|
sudo BRANCH=next rpi-update
|
||||||
|
|
||||||
|
will use the 'next' branch.
|
||||||
|
|
||||||
#### Troubleshooting
|
#### Troubleshooting
|
||||||
|
|
||||||
There are two possible problems related to SSL certificates that may prevent
|
There are two possible problems related to SSL certificates that may prevent
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ if [[ ${BOOT_PATH:-"unset"} == "unset" && ${ROOT_PATH:-"unset"} != "unset" ]] ||
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BRANCH=${BRANCH:-"master"}
|
||||||
ROOT_PATH=${ROOT_PATH:-"/"}
|
ROOT_PATH=${ROOT_PATH:-"/"}
|
||||||
BOOT_PATH=${BOOT_PATH:-"/boot"}
|
BOOT_PATH=${BOOT_PATH:-"/boot"}
|
||||||
SKIP_KERNEL=${SKIP_KERNEL:-0}
|
SKIP_KERNEL=${SKIP_KERNEL:-0}
|
||||||
@@ -106,7 +107,7 @@ function finalise {
|
|||||||
ldconfig -r "${ROOT_PATH}"
|
ldconfig -r "${ROOT_PATH}"
|
||||||
if [[ ${FW_REV} == "" ]]; then
|
if [[ ${FW_REV} == "" ]]; then
|
||||||
echo " *** Storing current firmware revision"
|
echo " *** Storing current firmware revision"
|
||||||
eval ${GITCMD} rev-parse master > "${FW_PATH}/.firmware_revision"
|
eval ${GITCMD} rev-parse ${BRANCH} > "${FW_PATH}/.firmware_revision"
|
||||||
else
|
else
|
||||||
echo ${FW_REV} > "${FW_PATH}/.firmware_revision"
|
echo ${FW_REV} > "${FW_PATH}/.firmware_revision"
|
||||||
fi
|
fi
|
||||||
@@ -118,7 +119,7 @@ function download_repo {
|
|||||||
echo " *** Setting up firmware (this may take a few minutes)"
|
echo " *** Setting up firmware (this may take a few minutes)"
|
||||||
mkdir -p "${FW_REPOLOCAL}"
|
mkdir -p "${FW_REPOLOCAL}"
|
||||||
set +e
|
set +e
|
||||||
git clone "${FW_REPO}" "${FW_REPOLOCAL}" --depth=1
|
git clone "${FW_REPO}" "${FW_REPOLOCAL}" --depth=1 --branch ${BRANCH}
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
set -e
|
set -e
|
||||||
if [[ ${RETVAL} -ne 0 ]]; then
|
if [[ ${RETVAL} -ne 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user