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-30 14:37:25 +0100 |
commit | f2c9dd561b2a2ca8871d810a359a1be58c33b241 (patch) | |
tree | c7d9b0c85de8fbcc33002b4c04865593dee7c827 | |
parent | 3b0bc8961e2036e9425d54ee8f2fea4ae043eb64 (diff) | |
download | poky-f2c9dd561b2a2ca8871d810a359a1be58c33b241.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: 1aa5d8231a7e4ee2f19afbe12aa49fc19c854062)
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c34650400182a1104a5fbe03e54f5cea69eb1900)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 |