From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: Fastboot
Date: Fri, 5 Mar 2021 21:20:12 -0500 [thread overview]
Message-ID: <508bfa91-3f26-c560-ec2d-4c2af397922d@gmail.com> (raw)
In-Reply-To: <CAEyb4nEdTKEPpomROKeA+WLFNjeCO6OEOB1dQBeZ7CQNp3UBYg@mail.gmail.com>
On 3/5/21 7:10 PM, Jonas Vautherin wrote:
> Hello!
>
> I am learning about Fastboot, and I would like to run it from u-boot and
> detect it from my host computer (I have the tools on my host, that's
> working with other devices).
>
> I am using a pocketbeagle and I built an image using Yocto. I can get into
> the u-boot prompt at boot time, and I get the following output:
>
> ```
> Rebooting... reboot: Restarting system
>
> U-Boot SPL 2020.07 (Jul 06 2020 - 19:22:53 +0000)
> Trying to boot from MMC1
>
>
> U-Boot 2020.07 (Jul 06 2020 - 19:22:53 +0000)
>
> CPU : AM335X-GP rev 2.1
> Model: TI AM335x PocketBeagle
> DRAM: 512 MiB
> WDT: Started with servicing (60s timeout)
> NAND: 0 MiB
> MMC: OMAP SD/MMC: 0
> Loading Environment from FAT... *** Warning - bad CRC, using default
> environment
>
> <ethaddr> not set. Validating first E-fuse MAC
> Net: No ethernet found.
> Hit any key to stop autoboot: 2
> ```
>
> If I hit a key here, I get the u-boot prompt (`=>`) where I find
> "fastboot". The thing is that none of the fastboot commands I run have any
> output:
This is normal. There will be output only when you issue commands.
>
> * fastboot usb 0
> * fastboot usb
> * fastboot udp
>
> Now, fastboot udp is not enabled in my defconfig, but the udp gadget
> support is, and the usb fastboot gadget is enabled, too. From my host, I
> just don't see anything in the `dmesg` output.
>
> Here are a few questions:
>
> * Does fastboot usb go over ethernet? If yes, I guess that the "Net: No
> ethernet found." message is an issue that I need to fix such that a new usb
> network interface is created by my host, but from my tests with this
> proprietary device I own, it does not seem to be enumerated as a network
> interface.
Only udp goes over ethernet (though I suppose you could use a
usb-ethernet gadget/dongle).
> * In readthedocs [1], it mentions that "The CONFIG_USB_GADGET_VENDOR_NUM
> must be one of the numbers supported by the fastboot client." In my setup,
> it is set to 0x0451, and I did not find what is supposed to be supported in
> fastboot.cpp [2]. So from the host, I also tried `fastboot -i 0x0451
> devices`. Is that an issue?
The fastboot client detects devices with two bulk endpoints and the
correct interface (see match_fastboot and filter_usb_device). Generally,
you will only have to specify the vid/pid/serial if you have multiple
devices plugged in at once.
> * I thought that maybe I should start USB, because the output of `usb tree`
> says "USB is stopped. Please issue 'usb start' first.". But running `usb
> start` errors with "Bus usb at 47401800: Port not available.". Is that related
> to fastboot at all, i.e. should I be concerned about that? And how can I
> debug it?
That's probably why your fastboot isn't working :)
You can try debugging it by enabling debug messages. If you want less than
a firehose, you can try setting the default log level to info, and then
setting it to debug before running usb start. See [1] for details.
[1] https://u-boot.readthedocs.io/en/latest/develop/logging.html
--Sean
> Thanks in advance for the help!
> Jonas
>
> [1]: https://u-boot.readthedocs.io/en/latest/android/fastboot.html
> [2]:
> https://android.googlesource.com/platform/system/core/+/master/fastboot/fastboot.cpp
>
next prev parent reply other threads:[~2021-03-06 2:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-06 0:10 Fastboot Jonas Vautherin
2021-03-06 2:20 ` Sean Anderson [this message]
2021-03-07 1:38 ` Fastboot Jonas Vautherin
2021-03-07 2:04 ` Fastboot Sean Anderson
2021-03-07 18:31 ` Fastboot Jonas Vautherin
2021-03-10 17:43 ` Fastboot Jonas Vautherin
2021-03-10 23:44 ` Fastboot Sean Anderson
2021-03-11 0:56 ` Fastboot Jonas Vautherin
2021-03-13 0:15 ` Fastboot Jonas Vautherin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=508bfa91-3f26-c560-ec2d-4c2af397922d@gmail.com \
--to=seanga2@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox