[meta-arm,8/8] arm-autonomy/modutils-initscripts: Fix modules.dep update
Submitted by Diego Sueiro on Nov. 17, 2020, 10:04 a.m.
|
Patch ID: 178147
Details
Commit Message
@@ -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 ."
new file mode 100644
@@ -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() {
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> --- .../modutils-initscripts.bbappend | 4 +++ .../fix-modules-dep-creation.patch | 33 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 meta-arm-autonomy/recipes-kernel/modutils-initscripts/modutils-initscripts/fix-modules-dep-creation.patch -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#1385): https://lists.yoctoproject.org/g/meta-arm/message/1385 Mute This Topic: https://lists.yoctoproject.org/mt/78313210/1003190 Group Owner: meta-arm+owner@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [mhalstead@linuxfoundation.org] -=-=-=-=-=-=-=-=-=-=-=-