generic-poky/meta/recipes-core/initrdscripts/initramfs-framework/mdev
Otavio Salvador ed2ac23c5b initramfs-framework: provides a modular initramfs
Provides the API and modules for a modular initramfs. The currently
included modules are:

 * initramfs-module-debug adds support to dynamic debugging of
   initramfs using bootparams

 * initramfs-module-udev: enables udev usage

 * initramfs-module-mdev: enables mdev usage

 * initramfs-module-e2fs: adds support for ext4, ext3 and ext2
   filesystems

(From OE-Core rev: 7b69ad2167a1f0e57db82817b98a0cbcb70a0dd3)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08 15:24:28 +00:00

31 lines
504 B
Bash

#!/bin/sh
# Copyright (C) 2011 O.S. Systems Software LTDA.
# Licensed on MIT
mdev_enabled() {
if [ ! -e /sbin/mdev ]; then
debug "/sbin/mdev doesn't exist"
return 1
fi
return 0
}
mdev_run() {
# setup the environment
mount -t tmpfs tmpfs /dev
mkdir -m 1777 /dev/shm
mkdir -m 0755 /dev/pts
mount -t devpts devpts /dev/pts
echo /sbin/mdev > /proc/sys/kernel/hotplug
mdev -s
# load modules for devices
find /sys -name modalias | while read m; do
load_kernel_module $(cat $m)
done
}