On Tue, Sep 29, 2015 at 9:42 AM, Ivan T. Ivanov firstname.lastname@example.org wrote:
On Tue, 2015-09-29 at 12:32 +0100, Daniel Thompson wrote:
On 29/09/15 12:03, Grant Likely wrote:
> PS > Does anyone have a canned command to deliberately corrupt the
boot-and-rootfs so I can get the board to jump into fastboot (so I can try a snapshot) without having to take the sensors board of the top so I can press Vol- ;-) ?
You should be able to use the Sonic Screwdriver 96boardsctl utility to reset the board. It twiddles the reset line on the LS connector, which is the same signal as Vol- (at least, so I'm told)
Ah... Reset == Vol-Down. I didn't think if that (Esla: that would
explain why the reset button on the Sonic Screwdriver didn't do what we were expecting).
Anyhow the trick works.
That said, rather frustratingly the trick only works when I can
physically un/plug the power to the main board (if I use the 'screwdriver to simulate a long press off SW2 the board doesn't revisit fastboot properly).
I think we need some help from our Qualcomm friends here on a reset sequence.
Wouldn't do any harm ;-)
The 'screwdriver has access to the power and reset button signals, and I can make them be twiddle in whatever order is required.
Does perhaps Vol- need to be held down before pressing power?
I've tried a fair few combinations.
Pressing and holding SW2 (aka screwdriver power pin) for 15 seconds causes the board to reset itself although, unlike a typical android phone, the board starts again automatically without any need for further presses of SW2. However I haven't (yet?) found any way to make SW4 influence the resulting reboot.
It looks like there is no user-space daemon, which handle SW2 KEY_POWER event and power-off gracefully the system.
IIRC, handling KEY_POWER will work with a GUI running, but for headless you would need acpid running.