mirror of
https://github.com/raspberrypi/rpi-update.git
synced 2026-01-20 21:13:38 +08:00
depmod for each kernel version in the repo
This commit is contained in:
10
rpi-update
10
rpi-update
@@ -23,6 +23,12 @@ echo "Using memory split of ${FW_RAM}MB/${FW_GPU}MB"
|
|||||||
|
|
||||||
GITCMD="git --git-dir=${FW_PATH}/.git --work-tree=${FW_PATH}"
|
GITCMD="git --git-dir=${FW_PATH}/.git --work-tree=${FW_PATH}"
|
||||||
|
|
||||||
|
function do_depmod {
|
||||||
|
for D in `find ${FW_PATH}/modules -mindepth 1 -maxdepth 1 -type d`; do
|
||||||
|
depmod -a `basename $D`
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
if $($GITCMD rev-parse &> /dev/null); then
|
if $($GITCMD rev-parse &> /dev/null); then
|
||||||
echo "Updating firmware (this will take a few minutes)"
|
echo "Updating firmware (this will take a few minutes)"
|
||||||
rm -f ${FW_PATH}/start.elf
|
rm -f ${FW_PATH}/start.elf
|
||||||
@@ -30,7 +36,7 @@ if $($GITCMD rev-parse &> /dev/null); then
|
|||||||
$GITCMD merge origin/master --no-edit --quiet
|
$GITCMD merge origin/master --no-edit --quiet
|
||||||
cp ${FW_PATH}/arm${FW_RAM}_start.elf ${FW_PATH}/start.elf
|
cp ${FW_PATH}/arm${FW_RAM}_start.elf ${FW_PATH}/start.elf
|
||||||
cp -R ${FW_PATH}/modules/* /lib/modules/
|
cp -R ${FW_PATH}/modules/* /lib/modules/
|
||||||
depmod -a
|
do_depmod
|
||||||
echo "If no errors appeared, your firmware was successfully updated"
|
echo "If no errors appeared, your firmware was successfully updated"
|
||||||
else
|
else
|
||||||
echo "We're running for the first time"
|
echo "We're running for the first time"
|
||||||
@@ -44,7 +50,7 @@ else
|
|||||||
cp -R ${FW_PATH}.bak ${FW_PATH}
|
cp -R ${FW_PATH}.bak ${FW_PATH}
|
||||||
else
|
else
|
||||||
cp -R ${FW_PATH}/modules/* /lib/modules/
|
cp -R ${FW_PATH}/modules/* /lib/modules/
|
||||||
depmod -a
|
do_depmod
|
||||||
cp ${FW_PATH}.bak/*.txt ${FW_PATH}/ &> /dev/null
|
cp ${FW_PATH}.bak/*.txt ${FW_PATH}/ &> /dev/null
|
||||||
cp ${FW_PATH}/arm${FW_RAM}_start.elf ${FW_PATH}/start.elf
|
cp ${FW_PATH}/arm${FW_RAM}_start.elf ${FW_PATH}/start.elf
|
||||||
echo "If no errors appeared, your firmware was successfully setup"
|
echo "If no errors appeared, your firmware was successfully setup"
|
||||||
|
|||||||
Reference in New Issue
Block a user