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

顯示包含「Linux / Unix」標籤的文章。顯示所有文章
顯示包含「Linux / Unix」標籤的文章。顯示所有文章

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

2009年4月7日星期二

Writing, Starting and Stopping Linux daemon (w/ start-stop-daemon)

Overview

The first page written by Devin Watson shows a tutorial on how-to write a daemon (with an example). The second one at Tony's Cafe shows how to write scripts for Debian Linux to run the daemon. The last one is the Manpage of "start-stop-daemon" program.

Reference

Linux Daemon Writing HOWTO

Creating a Daemon in Debian Linux

Manpage of START-STOP-DAEMON

U-Boot related documentation

Overview

I have been fighting with embedded Linux system for the past two months, here is what I found when the card crash and I have to flash the Kernel.

Reference

U-Boot bootloader Wiki (Gumstix)

U-Boot Environment Variables