The udev is available in http://www.ch.kernel.org/pub/linux/utils/kernel/hotplug/udev-130.tar.gz. First of all, we need to enter the scratchbox environment.
Download the udev package
Configure and compile udev
Add the following lines into udevd.c at line 50
Compile it
Copy necessary files into the default directory in the SDK. We can exit from the scratchbox now. First of all, we need to copy udevd and udevadm to the /sbin directory. Download rules and scripts from
Copy rules and scrips to the target from http://homescenario.dyndns.org/udev-rules.tgz.
Modify the init script to start the udev. We need to insert the following lines into the /opt/CNS2100-LSDK/rootfs/default/etc/init.d/rc.sysinit
The udevd --daemon is used to start the udev daemon which can read data from the sysfs and create files under /dev. The udevadm is used to create device files for the drivers which is compiled within the kernel staticly. Build a new rootfsPlease following the instruction is the previos section to build a new kernel image and download it by using the bootloader. The udev daemon should be runned as a daemon. You can insert a USB pen driver to test it. Now, we will modify the rules to mount the USB pen driver automatically under the /mnt. |