summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Hao <kexin.hao@windriver.com>2021-04-07 20:18:10 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-16 18:15:13 +0100
commite436ba8ad5f63f3e934c741aa97a5e04c8f06a04 (patch)
treea738c489cfa5f3af8131710f7f7b5bc3870c6e82
parent04f7f586633a9da47e1de0e141f6ba0b16e11793 (diff)
downloadopenembedded-core-e436ba8ad5f63f3e934c741aa97a5e04c8f06a04.tar.gz
openembedded-core-e436ba8ad5f63f3e934c741aa97a5e04c8f06a04.tar.bz2
openembedded-core-e436ba8ad5f63f3e934c741aa97a5e04c8f06a04.zip
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 Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xmeta/recipes-kernel/modutils-initscripts/files/modutils.sh1
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 @@
LOAD_MODULE=modprobe
[ -f /proc/modules ] || exit 0
+[ -d /lib/modules/`uname -r` ] || exit 0
# Test if modules.dep exists and has a size greater than zero
if [ ! -s /lib/modules/`uname -r`/modules.dep ]; then