To avoid doing this, I added support for a login shell on /dev/ttyUSB0 in my custom firmware:
- Enable the kernel modules kmod-usb-serial and kmod-usb-serial-pl2303 (you can add other kmod-usb-serial-xxx's as well)
- Enable 'getty' in the busybox 'Login/Password Management Utilities' and 'uudecode' in the 'Core Utilities'
- Added the line 'ttyUSB0::respawn:/sbin/getty -L ttyUSB0 115200 vt100' to the '/etc/inittab' file, by adding a copy of it as 'files/etc/inittab' in the openwrt build directory:
- Code: Select all
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
::askconsole:/usr/libexec/login.sh
ttyUSB0::respawn:/sbin/getty -L ttyUSB0 115200 vt100
So now when I'm in trouble I can insert a usb to serial converter in the USB port of the VoCore2, connect the TX and RX pins to the RX and TX pins of another usb to serial converter in my PC, connect with a terminal program (115200,n,8,1) and I'm greeted with a login prompt.
While this does not give you uboot access, it does allow you to inspect the system and manually correct it even do a firmware upgrade. You can execute 'uudecode' on the VoCore2 and then upload a uuencoded firmware.bin to the serial connection. It will take a while but then you can flash it manually.
Maybe this is something to enable in the default firmware for the Vocore and Vocore2?