diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
commit | c527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch) | |
tree | bb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-core/initrdscripts/initramfs-framework/mdev | |
download | poky-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/initrdscripts/initramfs-framework/mdev')
-rw-r--r-- | meta/recipes-core/initrdscripts/initramfs-framework/mdev | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/mdev b/meta/recipes-core/initrdscripts/initramfs-framework/mdev new file mode 100644 index 0000000000..a5df1d717a --- /dev/null +++ b/meta/recipes-core/initrdscripts/initramfs-framework/mdev | |||
@@ -0,0 +1,30 @@ | |||
1 | #!/bin/sh | ||
2 | # Copyright (C) 2011 O.S. Systems Software LTDA. | ||
3 | # Licensed on MIT | ||
4 | |||
5 | mdev_enabled() { | ||
6 | if [ ! -e /sbin/mdev ]; then | ||
7 | debug "/sbin/mdev doesn't exist" | ||
8 | return 1 | ||
9 | fi | ||
10 | |||
11 | return 0 | ||
12 | } | ||
13 | |||
14 | mdev_run() { | ||
15 | # setup the environment | ||
16 | mount -t tmpfs tmpfs /dev | ||
17 | |||
18 | mkdir -m 1777 /dev/shm | ||
19 | |||
20 | mkdir -m 0755 /dev/pts | ||
21 | mount -t devpts devpts /dev/pts | ||
22 | |||
23 | echo /sbin/mdev > /proc/sys/kernel/hotplug | ||
24 | mdev -s | ||
25 | |||
26 | # load modules for devices | ||
27 | find /sys -name modalias | while read m; do | ||
28 | load_kernel_module $(cat $m) | ||
29 | done | ||
30 | } | ||