diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 556: add some sdmux debug information

Message ID 20130208183022.16797.55188.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Andy Doan Feb. 8, 2013, 6:30 p.m. UTC
------------------------------------------------------------
revno: 556
committer: Andy Doan <andy.doan@linaro.org>
branch nick: lava-dispatcher
timestamp: Fri 2013-02-08 12:29:05 -0600
message:
  add some sdmux debug information
modified:
  doc/sdmux.rst


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'doc/sdmux.rst'
--- doc/sdmux.rst	2013-02-07 19:06:58 +0000
+++ doc/sdmux.rst	2013-02-08 18:29:05 +0000
@@ -80,3 +80,50 @@ 
 way the ADB daemon runs on the host prevents the sdmux.sh script from
 properly managing the device. Details and the proposed fix can be found
 here: https://android-review.googlesource.com/#/c/50011/
+
+Debugging Problems
+------------------
+
+Figuring out why things aren't working can be tricky. The key thing to keep
+in mind for the current revision of sd-mux hardware is:
+
+ * The host can only access the sd-card if the target is powered off
+ * The target can only access the sd-card if the host's sd-card reader isn't
+   supplying any current to the mux (ie the USB port should be off)
+
+Additionally, a tricky situation can arise if the host is providing some small
+amount of current. It seems u-boot can access the sd-card to pull the kernel.
+However, the kernel which tries to operate the sd-card at a higher speed will
+fail to mount the root file system.
+
+To really debug things you should open 2 terminals. Terminal 1 should be serial
+console session to your target. Terminal 2 can be used to toggle on/off target
+and toggle on/off the sdmux. Here's an example of how to play with things::
+
+  # from terminal 2, as root
+  export DEVICE=<your device id as described above>
+  alias muxon='<path to lava-dispatcher>/lava_dispatcher/device/sdmux.sh -d $DEVICE on'
+  alias muxoff='<path to lava-dispatcher>/lava_dispatcher/device/sdmux.sh -d $DEVICE off'
+  alias targeton='<your power on command>'
+  alias targetoff='<your power off command>'
+
+  # see if things work from the host
+  targetoff
+  muxon
+  # the muxon will print out where the device is, like /dev/sdb
+
+  # if you know your sd-card has partitions/files check with:
+  fdisk -l /dev/sdc
+
+  # now try mounting
+  mount /dev/sdc1 /mnt ; ls /mnt
+  umount /mnt
+
+  # see if this image will run on the target
+  muxoff
+  targeton
+
+  # at this point switch to terminal 1 to see if the device boots
+
+The steps above can basically get repeated over and over to help narrow down
+where things are breaking at.