戰地連結︰ Home My Flickr NBA.com About

2009年5月19日星期二

Using mdev of busybox

Overview

mdev is a device manager like udev, actually it is a "mini udev". mdev is very useful in embedded system as it is included in newer version of busybox. mdev can also shorten boot up time significantly compared to udev. This can be vital to some embedded system.

Below shows a sample startup script for mdev.

Reference

mdev – mini udev in busybox

mdev的使用方法和原理。

Code Snippet

Here is the startup script I used:

#!/bin/sh

echo "Mounting sysfs"
mount -t sysfs sysfs /sys

echo "Mounting /dev"
mount -t tmpfs mdev /dev

echo "Creating /dev/pts"
mkdir /dev/pts

echo "Mounting pts"
mount -t devpts devpts /dev/pts

echo "Echoing hotplug"
echo /sbin/mdev > /proc/sys/kernel/hotplug

echo "mdev -s"
mdev -s

沒有留言: