From 26b7ef0d11c053ca2a9aa2ba06d10c1ddddcb8ad Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Mon, 22 Oct 2007 14:56:31 +0000 Subject: busybox: added 1.7.2 from OE as non-default (Angstrom defconfig used) run_parts.c is alternative implementation from BusyBox mailing list: http://www.busybox.net/lists/busybox/2007-September/028838.html (original one does not sorted entries before run == broken X11 session) Poky-image-sato with this version works on my c7x0. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2949 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- .../packages/busybox/busybox-1.7.2/busybox-mdev.sh | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 meta/packages/busybox/busybox-1.7.2/busybox-mdev.sh (limited to 'meta/packages/busybox/busybox-1.7.2/busybox-mdev.sh') diff --git a/meta/packages/busybox/busybox-1.7.2/busybox-mdev.sh b/meta/packages/busybox/busybox-1.7.2/busybox-mdev.sh new file mode 100755 index 000000000..9744322fa --- /dev/null +++ b/meta/packages/busybox/busybox-1.7.2/busybox-mdev.sh @@ -0,0 +1,69 @@ +#!/bin/sh +MDEV=/sbin/mdev +DESC="Busybox mdev setup" + +# Complain if thing's aren't right +if [ ! -e /proc/filesystems ]; then + echo "mdev requires a mounted procfs, not started." + exit 1 +fi + +if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then + echo "mdev requires tmpfs support, not started." + exit 1 +fi + +if [ ! -d /sys/class/ ]; then + echo "mdev requires a mounted sysfs, not started." + exit 1 +fi + +if [ ! -e /proc/sys/kernel/hotplug ]; then + echo "mdev requires hotplug support, not started." + exit 1 +fi + +# We need to unmount /dev/pts/ and remount it later over the tmpfs +if mountpoint -q /dev/pts/; then + umount -l /dev/pts/ +fi + +if mountpoint -q /dev/shm/; then + umount -l /dev/shm/ +fi + +# Create tmpfs for /dev +echo "Creating tmpfs at /dev" +mount -t tmpfs tmpfs /dev -o size=800k + +# Register mdev as hotplug event helper +echo "$MDEV" > /proc/sys/kernel/hotplug + +# Populate /dev from /sys info +echo "Populating /dev using mdev" +$MDEV -s + +# Touch .udev to inform scripts that /dev needs no further setup +touch /dev/.udev + +# Mount devpts +TTYGRP=5 +TTYMODE=620 +mkdir -m 755 -p /dev/pts +if [ ! -e /dev/ptmx ]; then + mknod -m 666 /dev/ptmx c 5 2 +fi +mount -t devpts devpts /dev/pts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE + +# Make shm directory +mkdir -m 755 -p /dev/shm + +# Make extraneous links +ln -sf /proc/self/fd /dev/fd +ln -sf /proc/self/fd/0 /dev/stdin +ln -sf /proc/self/fd/1 /dev/stdout +ln -sf /proc/self/fd/2 /dev/stderr +ln -sf /proc/kcore /dev/core +ln -sf /proc/asound/oss/sndstat /dev/sndstat + +exit 0 -- cgit v1.2.3