summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2011-05-02 19:09:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-10 09:57:08 +0100
commitbcd7f1037305f2ce37c09769f2de3ddff4ca2f30 (patch)
treeb576bf014833e751954af3f675eee69632f2dec0
parentc533f60dfacb4cebce9fa9ec184b683167c2ef62 (diff)
downloadpoky-bcd7f1037305f2ce37c09769f2de3ddff4ca2f30.tar.gz
busybox: add support to mdev
This changes the packaging only if the configuration used has mdev support enabled. (From OE-Core rev: 82b163043aa53488a03bb3de3a78e5b6eeb76019) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/busybox/busybox.inc14
-rw-r--r--meta/recipes-core/busybox/busybox_1.18.4.bb2
-rwxr-xr-xmeta/recipes-core/busybox/files/mdev7
-rw-r--r--meta/recipes-core/busybox/files/mdev.conf35
4 files changed, 56 insertions, 2 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index be13c8aee4..341c5c4146 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -12,20 +12,24 @@ SECTION = "base"
12PRIORITY = "required" 12PRIORITY = "required"
13 13
14export EXTRA_CFLAGS = "${CFLAGS}" 14export EXTRA_CFLAGS = "${CFLAGS}"
15PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog" 15PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev"
16 16
17FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" 17FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
18FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog.conf*" 18FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog.conf*"
19FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
19FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" 20FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
20FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc ${sysconfdir}/init.d/busybox-udhcpc" 21FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc ${sysconfdir}/init.d/busybox-udhcpc"
21 22
22INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-udhcpc" 23INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-udhcpc ${PN}-mdev"
23 24
24INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" 25INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
25INITSCRIPT_NAME_${PN}-syslog = "syslog" 26INITSCRIPT_NAME_${PN}-syslog = "syslog"
27INITSCRIPT_NAME_${PN}-mdev = "mdev"
28INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ."
26INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 29INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
27INITSCRIPT_NAME_${PN}-udhcpc = "busybox-udhcpc" 30INITSCRIPT_NAME_${PN}-udhcpc = "busybox-udhcpc"
28CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf.${PN}" 31CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf.${PN}"
32CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
29 33
30RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" 34RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
31 35
@@ -100,6 +104,12 @@ do_install () {
100 install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script 104 install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
101 install -m 0755 ${WORKDIR}/busybox-udhcpc ${D}${sysconfdir}/init.d/ 105 install -m 0755 ${WORKDIR}/busybox-udhcpc ${D}${sysconfdir}/init.d/
102 fi 106 fi
107 if grep "CONFIG_MDEV=y" ${WORKDIR}/defconfig; then
108 install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev
109 if grep "CONFIG_FEATURE_MDEV_CONF=y" ${WORKDIR}/defconfig; then
110 install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf
111 fi
112 fi
103 113
104 install -m 0644 ${S}/busybox.links ${D}${sysconfdir} 114 install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
105 115
diff --git a/meta/recipes-core/busybox/busybox_1.18.4.bb b/meta/recipes-core/busybox/busybox_1.18.4.bb
index 5f5c2ae1ca..cf3765075c 100644
--- a/meta/recipes-core/busybox/busybox_1.18.4.bb
+++ b/meta/recipes-core/busybox/busybox_1.18.4.bb
@@ -20,6 +20,8 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
20 file://mount.busybox \ 20 file://mount.busybox \
21 file://syslog \ 21 file://syslog \
22 file://syslog.conf \ 22 file://syslog.conf \
23 file://mdev \
24 file://mdev.conf \
23 file://umount.busybox \ 25 file://umount.busybox \
24 file://defconfig" 26 file://defconfig"
25 27
diff --git a/meta/recipes-core/busybox/files/mdev b/meta/recipes-core/busybox/files/mdev
new file mode 100755
index 0000000000..4eba6190c7
--- /dev/null
+++ b/meta/recipes-core/busybox/files/mdev
@@ -0,0 +1,7 @@
1#!/bin/sh
2
3mount -t tmpfs tmpfs /dev -o size=64k,mode=0755
4mkdir /dev/pts /dev/shm
5mount -t devpts devpts /dev/pts
6echo "/sbin/mdev" > /proc/sys/kernel/hotplug
7mdev -s
diff --git a/meta/recipes-core/busybox/files/mdev.conf b/meta/recipes-core/busybox/files/mdev.conf
new file mode 100644
index 0000000000..0e1d6bc5e0
--- /dev/null
+++ b/meta/recipes-core/busybox/files/mdev.conf
@@ -0,0 +1,35 @@
1console 0:0 0600
2cpu_dma_latency 0:0 0660
3fb0:0 44 0660
4full 0:0 0666
5initctl 0:0 0600
6ircomm[0-9].* 0:20 0660
7kmem 0:15 0640
8kmsg 0:0 0660
9log 0:0 0666
10loop[0-9].* 0:6 0640
11mem 0:15 0640
12network_latency 0:0 0660
13network_throughput 0:0 0660
14null 0:0 0666
15port 0:15 0640
16ptmx 0:5 0666
17ram[0-9].* 0:6 0640
18random 0:0 0666
19sda 0:6 0640
20tty 0:5 0666
21tty.* 0:0 0620
22urandom 0:0 0666
23usbdev.* 0:0 0660 */etc/mdev/usb.sh
24vcs.* 0:5 0660
25zero 0:0 0666
26
27pcm.* 0:0 0660 =snd/
28control.* 0:0 0660 =snd/
29timer 0:0 0660 =snd/
30
31event.* 0:0 0660 =input/ @/etc/mdev/find-touchscreen.sh
32mice 0:0 0660 =input/
33mouse.* 0:0 0660 =input/
34
35tun[0-9]* 0:0 0660 =net/