[PATCH 2/3] arm-bsp/corstone1000: sysvinit: Make module autoload work at boot

Hugues KAMBA MPIANA <[email protected]>
Newsgroups org.yoctoproject.lists.meta-arm
Message-ID <[email protected]>
The image wasn’t autoloading kernel modules even though
`KERNEL_MODULE_AUTOLOAD` populated `/etc/modules-load.d/`. In this
configuration `/etc/init.d/rcS` only executes runlevel scripts from
`/etc/rcS.d` (and `/etc/rc5.d`), and `modutils.sh` was also missing.

This change:

* Includes the loader by adding `modutils-initscripts` to
  `CORE_IMAGE_EXTRA_INSTALL`.
* Enables SysV init by appending `sysvinit` to `DISTRO_FEATURES`,
  ensuring the `S*` start links in `/etc/rcS.d` (and `/etc/rc5.d`)
  call `/etc/init.d/modutils.sh start` during boot.

**Result:** entries in `/etc/modules-load.d/*.conf` now load
automatically at boot.

**Verification**

* Before: `lsmod` empty after boot; manual `modprobe` needed.
* After: `lsmod` shows target modules; `dmesg` contains module init logs.

Signed-off-by: Hugues KAMBA MPIANA <[email protected]>
---
 kas/corstone1000-image-configuration.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kas/corstone1000-image-configuration.yml b/kas/corstone1000-image-configuration.yml
index b5e17200..5e0ad3e3 100644
--- a/kas/corstone1000-image-configuration.yml
+++ b/kas/corstone1000-image-configuration.yml
@@ -23,6 +23,11 @@ local_conf_header:
     INIT_MANAGER:firmware = "mdev-busybox"
     VIRTUAL-RUNTIME_init_manager:firmware = "busybox"
 
+    # This guarantees module auto-loading support at boot
+    # by adding /etc/init.d/modutils.sh and /etc/rcS.d/ files
+    CORE_IMAGE_EXTRA_INSTALL:append = " modutils-initscripts"
+    DISTRO_FEATURES:append = " sysvinit"
+
     # prevent the kernel image from being included in the intramfs rootfs
     PACKAGE_EXCLUDE:firmware += "kernel-image-*"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.