Udev is the tool used to populate your /dev directory. This tool is important for your system to be able to “interact” with underlying hardware, and is required for instance to detect hard drive, usb keys, … Obviously, it is needed to launch any linux distribution you would like to have !
This Howto is the sequel of Framebuffer console tutorial on this wiki. It is assumed you managed to get a working framebuffer console.
Step 1 : get all the udev related files For this, we will use the image provided by linux4tegra (provided by nvidia on their tegradeveloper website). You have to uncompress the targetfs first : ./target_fs.sh you should have a new directory created, namely _out/targetfs/ , with a full linux tree inside. You need to copy the file from this new directory into your ramdisk image : bin/udevd bin/udevadm lib/ld-linux.so.3 lib/libc.so.6 lib/libdl.so.2 lib/libselinux.so.1 lib/udev directory etc/udev directory Step 2 : Expand busybox For conveniance, create a link to busybox for the following command in your bin directory in your ramdisk image : ls mkdir mount umount clear echo sleep mknod ln exec switch_root Step 3 : Edit init Edit init to append the following content :
mkdir -p /var/lock
mount -t sysfs -o nodev,noexec,nosuid none /sys mount -t proc -o nodev,noexec,nosuid none /proc clear sysctl -w kernel.printk=“4 4 1 7” >/dev/null 2>&1 mount -t tmpfs -o mode=0755 none /dev mknod -m 0600 /dev/console c 5 1
mknod /dev/null c 1 3 mkdir /dev/pts mount -t devpts -o noexec,nosuid,gid=5,mode=0620 none /dev/pts
mkdir -p /dev/.udev/db/ udevd –daemon
mkdir -p /dev/.udev/queue/ /dev/.udev/rules.d/ udevadm trigger
echo -n “Waiting for devices … ” udevadm settle sleep 5 echo “done”
Now repack your boot image as you did in the framebuffer console. If everything goes well, doing ls /dev should return you a whole list of device.