diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-core/initrdscripts/initramfs-framework/mdev | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
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 | } | ||