USB support for U-Boot on Raspberry-Pi

Oleksandr Tymoshenko gonzo at bluezbox.com
Fri Jun 22 14:23:50 EDT 2012


On 6/17/2012 7:52 PM, Oleksandr Tymoshenko wrote:
> On 6/15/2012 10:53 PM, Stephen Warren wrote:
>> On 06/15/2012 09:09 PM, Oleksandr Tymoshenko wrote:
>>> Hello,
>>>
>>> Last several weeks I've been working on porting U-Boot to Raspberry Pi
>>> (as it turned out in parallel with Stephen Warren)  and today I'm happy
>>> to announce that network support works stable enough.
>> Excellent!
>>
>> I have tested this, and even booted a kernel with DT (the patch I posted
>> a little while back based on linux-next). A couple gotchas though:
>>
>> CONFIG_OF_LIBFDT (for DT) or CONFIG_CMDLINE_TAG (for ATAGs) is needed to
>> make bootm work.
>>
>> Much bigger: Oleksandr's U-Boot branch uses the other UART from what the
>> kernel usually uses (and that the binary bootloader sets up), so I
>> wasn't able to see any output from the kernel until I realized I needed
>> to hack U-Boot to put the UART pinmux back to its more usual setting; I
>> added the reverse of arch_cpu_init()'s pinmux changes to
>> cleanup_before_linux() for testing purposes.
> Thanks for testing, Stephen. I cleaned-up sources and replaced non-USB 
> parts with
> code from your patches. With these changes I managed netboot linux 
> kernel and
> get a console output from it (failed at mounting root).
>
> For those who would like to give it a try here is archived content of 
> "boot" partition:
> http://people.freebsd.org/~gonzo/arm/rpi/rpi-uboot.tar.gz

Follow up on this:

I added SD card support and tweaked configuration
to make u-boot more flexible. Current version:
http://people.freebsd.org/~gonzo/arm/rpi/raspberry-pi-uboot-20120621.tar.gz

Changes comparing to previous one:
- Use PL011 UART as a default console
- USB driver do not hang if encounters error, just reports it
- SDHC driver added
- Enabled FAT filesystem support
- Enabled boot scripts support
- MAC address for SMSC95XX is obtained from command-line  provided by 
firmware
- Default boot script reads environment variables from uEnv.txt (if 
present)
     and passes control  to boot.scr (if present)

Known problems:

- Two usb start in row without power cycle does not work
- USB transaction errors when USB device is plugged into R-Pi
- bootm command was not tested

Code in branch still requires major clean-up but build should be usable 
enough.



More information about the linux-rpi-kernel mailing list