mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-05-07 04:58:57 +00:00
arm-autonomy/modutils-initscripts: Fix modules.dep update
When building an image with USE_DEPMOD="0" we expect that on the first boot the modutils.sh initscript will create the modules.dep file if it is empty or not present. Change-Id: I0048dc47f807587e723c068b0a4ba24718d66f49 Issue-Id: SCM-1654 Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI_append = " file://fix-modules-dep-creation.patch"
|
||||
|
||||
# We want to have modutils.sh running after checkroot.sh (05)
|
||||
INITSCRIPT_PARAMS = "start 06 S ."
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
When building an image with USE_DEPMOD="0" we expect that on the first boot the
|
||||
modutils.sh initscript to create the modules.dep file if it is empty or not
|
||||
present.
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
|
||||
|
||||
diff --git a/modutils.sh b/modutils.sh
|
||||
index a78adf5729..4afd12a9fe 100755
|
||||
--- a/modutils.sh
|
||||
+++ b/modutils.sh
|
||||
@@ -13,14 +13,17 @@
|
||||
|
||||
LOAD_MODULE=modprobe
|
||||
[ -f /proc/modules ] || exit 0
|
||||
-[ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0
|
||||
-[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
|
||||
|
||||
-if [ ! -f /lib/modules/`uname -r`/modules.dep ]; then
|
||||
+# Test if modules.dep exists and has a size greater than zero
|
||||
+if [ ! -s /lib/modules/`uname -r`/modules.dep ]; then
|
||||
[ "$VERBOSE" != no ] && echo "Calculating module dependencies ..."
|
||||
- depmod -Ae
|
||||
+ depmod -ae
|
||||
fi
|
||||
|
||||
+[ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0
|
||||
+[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
|
||||
+
|
||||
+
|
||||
loaded_modules=" "
|
||||
|
||||
process_file() {
|
||||
Reference in New Issue
Block a user