From patchwork Fri Feb 8 18:30:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Doan X-Patchwork-Id: 14706 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8EC2B23E92 for ; Fri, 8 Feb 2013 18:30:25 +0000 (UTC) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by fiordland.canonical.com (Postfix) with ESMTP id 169D6A18889 for ; Fri, 8 Feb 2013 18:30:25 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id d16so2523820vcd.40 for ; Fri, 08 Feb 2013 10:30:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:content-type:mime-version:x-launchpad-project :x-launchpad-branch:x-launchpad-message-rationale :x-launchpad-branch-revision-number:x-launchpad-notification-type:to :from:subject:message-id:date:reply-to:sender:errors-to:precedence :x-generated-by:x-launchpad-hash:x-gm-message-state; bh=JOz1+z3DOdWlYmCq1BXG9fcfBAkahPzAn13+PnT/MzA=; b=k/IyRtbLT7kz564o77VZPpFiE9P9sdnYpA+nU2VvxGFHwLGTb5FITowkt4bil9FT58 qbI7e7yl/tXSFdvTmPyyJ14Yon+MVYrh09GsJeBxbdvzAHO80J9Nmf+ffjZbFzusyK15 I48YEhYTxH0tg+eEnmfwAWyy11rvslBgfSzlrWRXjc6/AP/7zkw3IViGOJmUXprxVyhT qsTgvBfpPsnUWTqL4fbm27M9cVgHiLU0205JfruDRBCtdZ3ZI57HxxwkQQP9tR8T+X9m GuW8CTG1TKZ0765x8L072KUXRbOEnwRL0tt71DCxEIotODpTmrVzV02flvAq0jP6czoT BJjw== X-Received: by 10.58.232.226 with SMTP id tr2mr7985926vec.48.1360348224602; Fri, 08 Feb 2013 10:30:24 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp162007vec; Fri, 8 Feb 2013 10:30:24 -0800 (PST) X-Received: by 10.194.5.74 with SMTP id q10mr11738983wjq.13.1360348223288; Fri, 08 Feb 2013 10:30:23 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id fc8si3601896wib.16.2013.02.08.10.30.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 08 Feb 2013 10:30:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1U3siM-0007QF-M6 for ; Fri, 08 Feb 2013 18:30:22 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 9735BE053C for ; Fri, 8 Feb 2013 18:30:22 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 556 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 556: add some sdmux debug information Message-Id: <20130208183022.16797.55188.launchpad@ackee.canonical.com> Date: Fri, 08 Feb 2013 18:30:22 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16482"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 2fd870cf00f02f1b879abc29336c8740b18fe292 X-Gm-Message-State: ALoCoQnUDczQnyE54AmcL3u7RjITsR6Ctb5Kmt8P3+XMaROhm/BENzjssRl1nbMCC3DvkKFkXK7i ------------------------------------------------------------ revno: 556 committer: Andy Doan 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 === 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= + alias muxon='/lava_dispatcher/device/sdmux.sh -d $DEVICE on' + alias muxoff='/lava_dispatcher/device/sdmux.sh -d $DEVICE off' + alias targeton='' + alias targetoff='' + + # 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.