| The Following 8 Users Say Thank You to juiceme For This Useful Post: | ||
|
|
2012-09-11
, 14:34
|
|
Posts: 1,067 |
Thanked: 2,384 times |
Joined on Jan 2012
@ Finland
|
#2
|
As N9 lacks both hardware keyboard and serial port it would seem to be difficult to interact with the thing before OS & GUI loading, but fortunately I managed to do it. ( quite propably somebody else has done this before, but what the heck, it works for me)
| The Following User Says Thank You to rainisto For This Useful Post: | ||
|
|
2012-09-11
, 18:46
|
|
Community Council |
Posts: 4,902 |
Thanked: 12,827 times |
Joined on May 2012
@ Southerrn Finland
|
#3
|
Well actually N9 does have serial port TX&RX pins on the motherboard that you can connect to (you can see them on service manual schematics). But yes, for most people they are a bit hard to reach and requires quite much work and knowledge to get it working.

As N9 lacks both hardware keyboard and serial port it would seem to be difficult to interact with the thing before OS & GUI loading, but fortunately I managed to do it. ( quite propably somebody else has done this before, but what the heck, it works for me
So I decided to use the USB/IP device which requires just loading of one module to be usable, and I tweaked the sshd default parameters a bit, mounted devpts and launched sshd from preinit and it fires up nicely
Why I call this "almost-single-user-mode", is because with this sshd goes daemon and it is possible to connect to the device repeatedly. Hence it is actually more useful than the traditional serial port single-user mode
Here is the diff for sshd_config;
sshd_start() { modprobe g_ether sleep 1 /sbin/ifconfig usb0 192.168.2.15 up if [ ! -d /dev/pts ] ; then mkdir /dev/pts fi mount -t devpts devpts -o gid=5,mode=620 /dev/pts /usr/sbin/sshd -f /root/root_sshd_config text2screen -c -B 0x000000 text2screen -t "Running SSHD on USB" -s 3 -H center -V center while [ "1" -le "2" ] do sleep 1 done }sshd_query() { modprobe twl4030_keypad mknod /tmp/keypadi c 13 68 text2screen -c -B 0x000000 text2screen -t "Press UP for ssh shell" -s 3 -H center -V center iii=49 iLIMIT=1 iyy=470 while [ "$iLIMIT" -le $iii ] do let "iii-=1" let "iyy=iyy-10" text2screen -t " " -s 1 -x 840 -y $iyy -T 0xffffff -B 0xffffff iss=$(/bin/evkey -t 200 -d /tmp/keypadi) if [ "x$iss" == "x115" ]; then text2screen -c -B 0x000000 text2screen -t "Going to start SSHD" -s 3 -H center -V center sleep 2 sshd_start break fi if [ "x$iss" == "x114" ]; then text2screen -c -B 0x000000 text2screen -t "Booting next stage" -s 3 -H center -V center sleep 2 boot break fi done if [ "x$iii" == "x0" ]; then text2screen -c -B 0x000000 text2screen -t "Defaulting to booting next stage" -s 3 -H center -V center sleep 2 boot fi }I did not write detailed step-by-step granny guide here on purpose, to make people who would like to try this THINK a bit instead just following orders blindly.
This is to protect newbies from bicking their device (and furthermore, to protect me from their anger if somebody manages to do that) but all the required steps are here for anyone who understands the logic of boot chain.