busybox: install mdev config and initscript
authorMarcin Juszkiewicz <hrw@koansoftware.com>
Tue, 30 Dec 2008 14:54:58 +0000 (15:54 +0100)
committerMarcin Juszkiewicz <hrw@koansoftware.com>
Fri, 16 Jan 2009 14:37:20 +0000 (15:37 +0100)
packages/busybox/busybox_1.11.3.bb
packages/busybox/files/mdev [new file with mode: 0755]
packages/busybox/files/mdev.conf [new file with mode: 0644]

index 3956c48..4466548 100644 (file)
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r3"
+PR = "r5"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
@@ -17,6 +17,8 @@ SRC_URI = "\
   file://syslog.conf \
   file://umount.busybox \
   file://defconfig \
+  file://mdev \
+  file://mdev.conf \
 "
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
@@ -25,3 +27,14 @@ do_configure () {
        install -m 0644 ${WORKDIR}/defconfig ${S}/.config
        cml1_do_configure
 }
+
+do_install_append() {
+    install -m 0644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/
+    install -d ${D}${sysconfdir}/init.d/
+    install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/
+}
+
+pkg_postinst_${PN}_append() {
+
+    update-rc.d $OPT mdev start 06 S .
+}
diff --git a/packages/busybox/files/mdev b/packages/busybox/files/mdev
new file mode 100755 (executable)
index 0000000..6512730
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+mount -t sysfs sysfs /sys
+mount -t tmpfs tmpfs /dev  -o size=64k,mode=0755
+
+mkdir /dev/pts /dev/shm
+
+mount -t devpts devpts /dev/pts
+
+echo "/bin/mdev" >/proc/sys/kernel/hotplug
+
+mdev -s
diff --git a/packages/busybox/files/mdev.conf b/packages/busybox/files/mdev.conf
new file mode 100644 (file)
index 0000000..b5a4e70
--- /dev/null
@@ -0,0 +1,25 @@
+console 0:0 0600 
+cpu_dma_latency 0:0 0660 
+fb0:0 44 0660 
+full 0:0 0666 
+initctl 0:0 0600 
+ircomm[0-9]* 0:20 0660 
+kmem 0:15 0640 
+kmsg 0:0 0660 
+log 0:0 0666 
+loop[0-9]* 0:6 0640 
+mem 0:15 0640 
+network_latency 0:0 0660 
+network_throughput 0:0 0660 
+null 0:0 0666 
+port 0:15 0640 
+ptmx 0:5 0666 
+ram[0-9]* 0:6 0640 
+random 0:0 0666 
+sda 0:6 0640 
+tty 0:5 0666 
+tty* 0:0 0620 
+urandom 0:0 0666 
+usbdev* 0:0 0660 
+vcs* 0:5 0660 
+zero 0:0 0666