Preparing a ramdisk
From iPhone Linux
The following instructions modify a buildroot filesystem to use mdev/gadget serial.
As a reminder, you probably want to select the lrzsz package from the network packages in buildroot menuconfig when you build it. This will allow file transfer via kermit later on.
Modifying /dev
Remove all files from /dev/ except /dev/console and /dev/null, e.g. by performing an rm -rf, and then adding back /dev/console and /dev/null:
mknod /mnt/dev/console c 5 1 mknod /mnt/dev/null c 1 3 chmod a+w /mnt/dev/console chmod a+w /mnt/dev/null
Modifying /etc/inittab
Add the following lines to /etc/inittab, after null::sysinit:/bin/mount -a. These steps sets up /dev and starts mdev (BusyBox's version of udev).
null::sysinit:/bin/mount -t tmpfs -o size=64k,mode=0755 tmpfs /dev ::sysinit:/bin/mknod /dev/null c 1 3 null::sysinit:/bin/mkdir /dev/pts null::sysinit:/bin/mount -t devpts devpts /dev/pts null::sysinit:/sbin/sysctl -w kernel.hotplug=/sbin/mdev null::sysinit:/sbin/mdev -s
Add the following line after # Put a getty on the serial port
ttyGS0::respawn:/sbin/getty -L ttyGS0 9600 vt100
Modifying /etc/securetty
Add ttyGS0 to the list.
