- Enable the mdev daemon mode in Busybox default config
- Update the S10mdev init script to use the daemon mode
Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Commit b4fc5a180c (package/busybox: support spaces in module aliases in
mdev) changed the mdev coldplugging to handle sysfs path elements and
modalias values containing spaces. This unfortunately doesn't work as was
recently reported:
http://lists.busybox.net/pipermail/buildroot/2018-May/220903.html
The problem is that sort -z also expects the fields of the input files to be
zero terminated, which is not the case for modalias sysfs entries.
So drop the -z option to sort. Spaces in modalias entries could be handled
with the xargs -d '\n' option, but that is unfortunately not supported by
the busybox applet. Instead, use tr to convert newlines to zeros so we can
use xargs -0.
Reported-by: Daniel Palmer <daniel@0x0f.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
The new change which enabled automatic module loading on boot does not handle
the cases when module alias includes spaces. It prevents modules to be loaded
since script fails:
% find /sys/ -name modalias | xargs sort -u
sort: /sys/devices/platform/Fixed: No such file or directory
First alias in question is "platform:Fixed MDIO bus".
Amend the script to support above like cases.
Fixes: 07f46c2b6d ("package/busybox: support automatic module loading with mdev")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
A recently discussed on the mailing list:
http://lists.busybox.net/pipermail/buildroot/2016-February/154189.html
Our mdev configuration currently doesn't handle module loading. Fix that by:
- Telling mdev to run modprobe on hotplug events providing MODALIAS
- Adjust the init script to handle coldplug modalias events (E.G. modules
for which the devices were already present before mdev was added as the
hotplug handler). mdev -s should arguable handle this, but it doesn't.
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
It's also done in the kernel configuration, however users may be using
some other pre-built kernel and miss functionality like firmware
loading.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Four methods for the creation of device files in /dev are now
proposed:
- static method uses device table as before
- devtmpfs method enables this feature in kernel
- mdev method adds mdev starting script to the file system
and selects mdev itself for installation
- udev method selects udev for installation
All dynamic methods are based on devtmpfs, so one doesn't need to care
about /dev folder.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>