From 50d1811d10dc67f6e0f8dc9433b4c68fca3a59b1 Mon Sep 17 00:00:00 2001 From: Liam McLoughlin Date: Sat, 21 Apr 2012 14:52:35 +0100 Subject: [PATCH] depmod for each kernel version in the repo --- rpi-update | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rpi-update b/rpi-update index b7d3539..b98fee1 100755 --- a/rpi-update +++ b/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}" +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 echo "Updating firmware (this will take a few minutes)" rm -f ${FW_PATH}/start.elf @@ -30,7 +36,7 @@ if $($GITCMD rev-parse &> /dev/null); then $GITCMD merge origin/master --no-edit --quiet cp ${FW_PATH}/arm${FW_RAM}_start.elf ${FW_PATH}/start.elf cp -R ${FW_PATH}/modules/* /lib/modules/ - depmod -a + do_depmod echo "If no errors appeared, your firmware was successfully updated" else echo "We're running for the first time" @@ -44,7 +50,7 @@ else cp -R ${FW_PATH}.bak ${FW_PATH} else cp -R ${FW_PATH}/modules/* /lib/modules/ - depmod -a + do_depmod cp ${FW_PATH}.bak/*.txt ${FW_PATH}/ &> /dev/null cp ${FW_PATH}/arm${FW_RAM}_start.elf ${FW_PATH}/start.elf echo "If no errors appeared, your firmware was successfully setup"