summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDiego Sueiro <diego.sueiro@arm.com>2020-12-03 11:18:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-06 23:17:28 +0000
commitf01675db346b5758f583231e3ceb0675fbccfb13 (patch)
tree70baa89adf175ec7b1fb66ff8113347e0bbed542 /meta
parent9e8247100e5bb6125417e3c103a72ff9d1da9386 (diff)
downloadpoky-f01675db346b5758f583231e3ceb0675fbccfb13.tar.gz
modutils-initscripts: Fix modules.dep creation when USE_DEPMOD="0"
When having USE_DEPMOD="0" it is expected that in the first boot that the modules.dep is generated. To achieve this we need to check if modules.dep exists and has a size greater than zero. This verification also needs to be done regardless of whether the /etc/modules or /etc/modules-load.d directories exist. (From OE-Core rev: 572f3045faa0a937947fbd56bcfef7bad55e9da6) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rwxr-xr-xmeta/recipes-kernel/modutils-initscripts/files/modutils.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
index a78adf5729..3274c25a69 100755
--- a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
+++ b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
@@ -13,14 +13,16 @@
13 13
14LOAD_MODULE=modprobe 14LOAD_MODULE=modprobe
15[ -f /proc/modules ] || exit 0 15[ -f /proc/modules ] || exit 0
16[ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0
17[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
18 16
19if [ ! -f /lib/modules/`uname -r`/modules.dep ]; then 17# Test if modules.dep exists and has a size greater than zero
18if [ ! -s /lib/modules/`uname -r`/modules.dep ]; then
20 [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..." 19 [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..."
21 depmod -Ae 20 depmod -Ae
22fi 21fi
23 22
23[ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0
24[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
25
24loaded_modules=" " 26loaded_modules=" "
25 27
26process_file() { 28process_file() {