From: unixmania at gmail.com <unixmania@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 0/5] Add a kernel module loading mechanism
Date: Sat, 18 Apr 2020 19:14:06 -0300 [thread overview]
Message-ID: <20200418221411.1549783-1-unixmania@gmail.com> (raw)
From: Carlos Santos <unixmania@gmail.com>
Currently there are two ways to load kernel modules in Buildroot:
- via systemd (systemd-modules-load.service)
- via OpenRC (/etc/init.d/modules)
The systemd mechanism uses configuration files, each one containing a
list of kernel module names to load, separated by newlines. Empty lines
and lines whose first non-whitespace character is # or ; are ignored.
Files are loaded in the following order:
/etc/modules-load.d/*.conf
/run/modules-load.d/*.conf
/usr/lib/modules-load.d/*.conf
OpenRC uses /etc/modules-load.d/*.conf, only, and does not ignore lines
beginning with ';'.
In order to provide a compatible mechanism for sysvinit/busybox init
systems, this series does the following:
Patch #1 adds a S02modules-load init script to kmod (which provides the
"modprobe" utility). It roughly mimics the systemd service.
Patch #2 adds the S02modules-load init script to Busybox. It's installed
only if kmod is not selected and modprobe is included in buildroot.
Patchs #3..5 modify packages dmraid, owfs and ti-sgx-km to use the
modules-load mechanism.
Package ti-gfx should be modified too, but I did not find a board
configuration to test it.
ABOUT THE REASON OF THIS SERIES
Since late 2017 I have been working on porting libvirt to Buildroot,
initially as part of my work at DATACOM and since April 2019 as a pet
project, using hardware kindly donated by DATCOM[1]. libvirt is a big
and complex package that has many build and run time dependencies and
requires several kernel modules to work.
In previous versions of the package, e.g. [2], the modules were loaded
by the S92libvirtd init script. The next patch, however (to be submitted
soon) will add support for both OpenRC and systemd init systems, so I
needed a commom mechanism to load the modules. That was how the patches
for kmod and busybox were born. The ones for dmraid, owfs an ti-sgx-km
are just a consequence of my "scratch the itch" syndrome. :-)
[1] https://www.datacom.com.br/en/produtos/network-appliance
[2] https://patchwork.ozlabs.org/patch/1183162/
---
Carlos Santos (5):
package/kmod: add modules-load init script
package/busybox: add modules-load init script
package/dmraid: use modules-load to load the kernel module
package/owfs: use modules-load to load the kernel module
package/ti-sgx-km: use modules-load to load the kernel module
package/busybox/S11modules-load | 1 +
package/busybox/busybox.mk | 12 ++++
package/dmraid/S20dmraid | 3 -
package/dmraid/dmraid.mk | 12 ++++
package/kmod/S11modules-load | 115 ++++++++++++++++++++++++++++++++
package/kmod/kmod.mk | 10 +++
package/owfs/S60owfs | 2 -
package/owfs/owfs.mk | 11 +++
package/ti-sgx-km/ti-sgx-km.mk | 10 +++
package/ti-sgx-um/S80ti-sgx | 19 +-----
10 files changed, 173 insertions(+), 22 deletions(-)
create mode 120000 package/busybox/S11modules-load
create mode 100644 package/kmod/S11modules-load
--
2.18.2
next reply other threads:[~2020-04-18 22:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-18 22:14 unixmania at gmail.com [this message]
2020-04-18 22:14 ` [Buildroot] [PATCH v2 1/5] package/kmod: add modules-load init script unixmania at gmail.com
2020-04-19 10:31 ` Yann E. MORIN
2020-04-21 15:27 ` Matthew Weber
2020-04-18 22:14 ` [Buildroot] [PATCH v2 2/5] package/busybox: " unixmania at gmail.com
2020-04-19 10:37 ` Yann E. MORIN
2020-04-18 22:14 ` [Buildroot] [PATCH v2 3/5] package/dmraid: use modules-load to load the kernel module unixmania at gmail.com
2020-04-19 10:42 ` Yann E. MORIN
2020-04-19 12:49 ` Thomas Petazzoni
2020-04-19 13:24 ` Yann E. MORIN
2020-04-18 22:14 ` [Buildroot] [PATCH v2 4/5] package/owfs: " unixmania at gmail.com
2020-04-18 22:14 ` [Buildroot] [PATCH v2 5/5] package/ti-sgx-km: " unixmania at gmail.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200418221411.1549783-1-unixmania@gmail.com \
--to=unixmania@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox