[meta-arm,7/8] arm-autonomy/init: Change execution order between modutils.sh and checkroot.sh

Submitted by Diego Sueiro on Nov. 17, 2020, 10:04 a.m. | Patch ID: 178074

Details

Message ID 20201117100449.20111-8-diego.sueiro@arm.com
State New
Headers show

Commit Message

Diego Sueiro Nov. 17, 2020, 10:04 a.m.
When '/' is first mounted as read-only, we want to have the checkroot.sh
initscript (which then remounts '/' as rw if allowed) running before the
modutils.sh.
This is because modutils.sh initscript might need to run depmod depending on
the status of the modules.dep file to update it and the '/' needs to be
writable.

Change-Id: Idac9aa19fba6b6bf46532097a667ce0518af515c
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>

---
 .../recipes-core/initscripts/initscripts_1.0.bbappend        | 5 +++++
 .../modutils-initscripts/modutils-initscripts.bbappend       | 2 ++
 2 files changed, 7 insertions(+)
 create mode 100644 meta-arm-autonomy/recipes-core/initscripts/initscripts_1.0.bbappend
 create mode 100644 meta-arm-autonomy/recipes-kernel/modutils-initscripts/modutils-initscripts.bbappend

-- 
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#1384): https://lists.yoctoproject.org/g/meta-arm/message/1384
Mute This Topic: https://lists.yoctoproject.org/mt/78313199/1003190
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/meta-arm-autonomy/recipes-core/initscripts/initscripts_1.0.bbappend b/meta-arm-autonomy/recipes-core/initscripts/initscripts_1.0.bbappend
new file mode 100644
index 0000000..5fb2197
--- /dev/null
+++ b/meta-arm-autonomy/recipes-core/initscripts/initscripts_1.0.bbappend
@@ -0,0 +1,5 @@ 
+do_install_append() {
+    # We want to have checkroot.sh running before modutils.sh (06)
+    update-rc.d -r ${D} -f checkroot.sh remove
+    update-rc.d -r ${D} checkroot.sh start 05 S .
+}
diff --git a/meta-arm-autonomy/recipes-kernel/modutils-initscripts/modutils-initscripts.bbappend b/meta-arm-autonomy/recipes-kernel/modutils-initscripts/modutils-initscripts.bbappend
new file mode 100644
index 0000000..2a2fd20
--- /dev/null
+++ b/meta-arm-autonomy/recipes-kernel/modutils-initscripts/modutils-initscripts.bbappend
@@ -0,0 +1,2 @@ 
+# We want to have modutils.sh running after checkroot.sh (05)
+INITSCRIPT_PARAMS = "start 06 S ."