diff options
author | Kevin Hao <kexin.hao@windriver.com> | 2021-04-07 20:18:10 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-04-18 11:37:26 +0100 |
commit | 7d9a47e6234159a8cfa17a965ceba65856eeb801 (patch) | |
tree | d193390e1764f4e32d229bbf9f00aabf995833e0 /meta/recipes-kernel/modutils-initscripts | |
parent | 25e1aabea63aaf6db8a5e9505cd0d20e48049d33 (diff) | |
download | poky-7d9a47e6234159a8cfa17a965ceba65856eeb801.tar.gz |
modutils-initscripts: Bail out when no module is installed
Fix the following warning when boot with a core-image-minimal rootfs:
depmod: can't change directory to 'lib/modules/5.10.25-yocto-standard': No such file or directory
(From OE-Core rev: c34650400182a1104a5fbe03e54f5cea69eb1900)
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/modutils-initscripts')
-rwxr-xr-x | meta/recipes-kernel/modutils-initscripts/files/modutils.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh index 28fe6f92d7..67e1dcd990 100755 --- a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh +++ b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | LOAD_MODULE=modprobe | 14 | LOAD_MODULE=modprobe |
15 | [ -f /proc/modules ] || exit 0 | 15 | [ -f /proc/modules ] || exit 0 |
16 | [ -d /lib/modules/`uname -r` ] || exit 0 | ||
16 | 17 | ||
17 | # Test if modules.dep exists and has a size greater than zero | 18 | # Test if modules.dep exists and has a size greater than zero |
18 | if [ ! -s /lib/modules/`uname -r`/modules.dep ]; then | 19 | if [ ! -s /lib/modules/`uname -r`/modules.dep ]; then |