-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speedup improvement for sunxi-fel by switching to high-speed USB device (?) #146
Comments
Nice! For the F1C100s / F1C200s it also works, but different address:
Transfer speed went from 360 to 580KB/s |
@deividAlfa R40 has the same address of R1C100s and the scripts can work in R40 platform. But there's only a small improvement. I had checked the usb is enumed in usb high speed mode. ➜ fel-mass-storage git:(master) ✗ sudo ./start_r40_live.sh
[sudo] password for qianfan:
Sorry, try again.
[sudo] password for qianfan:
100% [================================================] 4232 kB, 349.9 kB/s
100% [================================================] 24 kB, 256.7 kB/s
100% [================================================] 5044 kB, 347.7 kB/s
Input this command in u-boot shell to boot linux kernel:
bootz 42000000 43300000 43000000
➜ fel-mass-storage git:(master) ✗ sudo sunxi-fel writel 0x01c13040 0x29860
➜ fel-mass-storage git:(master) ✗ sudo ./start_r40_live.sh
100% [================================================] 4232 kB, 546.0 kB/s
100% [================================================] 24 kB, 538.5 kB/s
100% [================================================] 5044 kB, 553.8 kB/s
Input this command in u-boot shell to boot linux kernel:
bootz 42000000 43300000 43000000 |
Well, that's 150% from original speed. |
@deividAlfa Don't know how to speedup to 2.8M and which cpu are used? I had tested write emmc by using ums command and the speed can be up to 7M. So the high speed usb device isn't the limiting. Maybe IBR or libusb is the speed bottleneck? |
No idea. I guess because sunxi inits the most basic? So probably no dma? |
I would say a lot of the slowness is quite likely from the ping-pong protocol FEL is using, "write small block", "read response". To get full USB speed you need to stream the data, not use a request/response ping-pong protocol. For large transfer I would recommend only transferring an U-Boot SPL with USB support using FEL, and then use USB device support in U-Boot to transfer the full u-boot and then the bulk data. This should give much better performance. But I have not attempted doing this so not sure how much work it is to prepare a such SPL, or if it even would fit in the available SRAM. Note that the Allwinner tools also only transmits a small bootloader using the ROM FEL routines, the bulk transfers of the image are done using other USB transfer protocols, not the ROM FEL routines. Quite similar to the method of using FEL for loading u-boot and then fastboot or ums in u-boot for transferring data to the eMMC, but targeting the DRAM instead of eMMC. I am not entirely sure what you want to get done in sunxi-tools with this issue. Modifying the USB controller settings for specific devices is not entirely in the scope of sunxi-tools fel support, belongs more in device specific boot scripts or device documentation on the wiki. |
Suitable wiki page for this: https://linux-sunxi.org/FEL/USBBoot |
Any ideas why this wouldn't work on my A64? The device re-enumerates in high-speed mode after writing 0x29860 to 0x1c19040 but the uboot command just hangs afterwards:
I'm using the latest sunxi-tools (commit 76089c82d0e1616aeb3b289790204dce98296477). |
The text was updated successfully, but these errors were encountered: