am335x_boneblack: Enable fastboot flash support
Get series with b4
b4 am 20180228005446.3d7480a7@jawaVersions newest first
- v1 Latest0 of 2 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 2 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/2] am335x_boneblack: Enable fastboot flash support
Hi Sam,
Quoted 30 lines · Lukasz Majewski
Quoted 29 lines
Hi Sam,
Quoted 8 lines
Standard and recommended way to upgrade the firmware is DFU. But DFU has extremely low transmission speed (around 150 KiB/sec), thus it's a bad fit for flashing big images (like rootfs). Low DFU speed is mostly due to next reasons (kudos to Ruslan Bilovol for investigation): 1. DFU works only via EP0, per DFU specification [1]. But AM335x doesn't have DMA for EP0, according to AM335x TRM [2]: from section 16.2:
Quoted 6 lines
"The CPPI DMA can be used to service Endpoints 1 to 15 not
Endpoint 0. CPU access method is used to service Endpoint 0 transactions."2. Max transmission packet size via EP0 is 64 bytes, whereas for
other endpoints max transmission packet size is 512 bytesDFU was (and still is) supposed to work on all devices - even those with very tiny resources (like st microcontrollers).
According to USB spec, EP0 is mandatory, so that is the reason for using it as a common denominator.
Just for the record - fastboot is one of the options here.
For BBB you may want to look at "dfu tftp" - which uses ETH's tftp protocol with dfu backend. It is supposed to be a remedy for problem described above.
Quoted 6 lines
Quoted 3 lines
More information at:
./doc/README.dfutftpThank you for the explanation, Lukasz! Didn't know that "dfu tftp" was designed to overcome that slow speed issue. Will try that.
You may also want to try UMS (USB Mass Storage) - "ums".
It will export your BBB to be visible as USB Mass Storage device (like a pendrive).
From that point you can use dd to write MBR, rootfs, u-boot to it.
Another - good option for flashing is SWUpdate SW:
https://github.com/sbabic/swupdate
It allows very easy integration with OE/Yocto and Buildroot. What is even more important - it supports BBB out of the box:
https://github.com/sbabic/meta-swupdate-boards/tree/master/recipes-support/swupdate/swupdate
SWUpdate is a versatile tool with a loot of nice features - please read:
https://sbabic.github.io/swupdate/
Quoted 12 lines
Quoted 5 lines
Of course I also don't mind using fastboot - it depends on your use case.
Yes, I'm trying to make BBB board to be a good educational platform (we are working on some corporate courses). Main points are it's an open hardware, has a good support in upstream and has a good pricing. Anyway, my idea is to show people all the conventional methods for flashing the board, so I need both Ethernet and USB ways working.
Quoted 41 lines
Also, I noticed that Debian rootfs is recommended to be flashed to eMMC using SD card (and flashing is done from booted system, not from U-Boot). Although I understand that this may be easier for an end user (as it closely resembles PC way), still I can't say that I particularly like or approve that method (especially for development purposes). That's why I think that having functional USB link would be beneficial for BBB.
Quoted 33 lines
Quoted 11 lines
fastboot specification [3], on the other hand, says nothing about which EP should be used (and I see that EP1 is used on BBB board). So let's enable fastboot flash support on BeagleBone Black board to provide a better way to flash big images via USB.
[1] www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf
[2] www.ti.com/lit/ug/spruh73p/spruh73p.pdf
[3]
https://android.googlesource.com/platform/system/core/+/master/fastboot/README.mdQuoted 8 lines
Sam Protsenko (2):
omap: Fix AM335x build with enabled fastboot flash
configs:am335x_boneblack: Enable fastboot flash capabilityarch/arm/mach-omap2/utils.c | 2 ++ configs/am335x_boneblack_defconfig | 2 ++ 2 files changed, 4 insertions(+)Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang
Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
wd at denx.de
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180228/110aac3a/attachment.sig>