[U-Boot] Patch to boot over USB cable on OMAP3EVM

Brian Silverman bsilverman at iveia.com
Tue Jun 23 14:23:20 CEST 2009

I have created a patch for the OMAP3EVM u-boot to create an image for
download into OMAP internal RAM (64k).  This allows a complete boot to
Linux over USB only, without any RS-232 serial cables.  The difference
between this and Nishanth Menon's procedures (found here: 
and.html) is simply that the RS232 serial port is not required.
If anybody has any input into this, or finds this useful, please
Here's an executive summary of the boot process:
    - Setup OMAP3EVM to boot via USB
    - Start Martin Mueller's omap3_usbload to download the u-boot.bin
    - Run a kermit script to talk to the board over /dev/ttyACM0, and
download uImage/ramdisk images.
    - bootm
    - Linux boots to the command line.
Also note: this builds off of a u-boot USB dev branch, not mainline
The details:
- Images:
    - omap3_usbload:
        - Download and build omap3_usbload (Nishanth Menon's pusb should
work as well):
            - Note: requires the libusb package.
    - u-boot
        - Get Steve's Sakoman's u-boot usb dev branch:
            - See http://elinux.org/U-boot_musb_gadget_support
            - In short (from gitorious):
                git clone git://gitorious.org/u-boot-omap3/mainline.git
                cd mainline
                git checkout --track -b omap3-dev-usb
            - Current latest commit is commit
        - Apply the attached patch (Note: I'm new to git, and I've just
attached a "diff -urN" patch.  With a little help, I'd be happy to
            upload a proper "git" patch).  For example:
            - cd mainline
            - patch -p1 < ../u-boot-omap3evm-usb-boot.patch
        - Build u-boot:
            make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
            make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
        - You now have a downloadable u-boot.bin.  Copy it to
u-boot2.bin to avoid confusion.  I'll use that name in the script later.
    - Kermit
        - Download CKermit with your favorite package manager.
        - Also you'll need the attached kermrc script.  It was created
from:  http://www.denx.de/wiki/DULG/SystemSetup, section 4.3,
        with the notable exception about send/recv buffers (see notes at
end of this email).
    - uImage
        - You'll need the default OMAP3EVM Linux image, but you'll have
to rebuild it and make one change:
            - Remove defines for the ethernet driver.  If you include
it, the driver will crash on boot because this u-boot does not 
                initialize the Ethernet core.  The applicable configs
                    # CONFIG_MII is not set
                    # CONFIG_SMSC911X_OMAP3EVM is not set
    - ramdisk:
        - For my example below, I convert the ramdisk to uboot format.
To do this:
            mkimage -n 'uboot ext2 ramdisk rootfs' -A arm -O linux -T
ramdisk -C gzip -d \
                ~/OMAP35x_SDK_1.0.2/ramdisk-min.gz ramdisk.ext2.gz.uboot

- OMAP3EVM Board setup:
    - The jumpers need to be set for USB boot.  For my board, I've set
it to boot USB boot first, MMC boot second, which is:
        SW4 (1-8): ON OFF OFF ON   ON OFF OFF OFF
    - Connect the USB cable to your Linux host
    - Connect a serial cable to see the Linux console (not required, but
recommened for first time at least).
- On the host:
    - Given the attached scripts and the above built binaries, run:
    - usbload/kermrc scripts currently have the image names embedded in
them.  They should all be in the current dir.
- Output you should see on host:
    bri at bri-desktop:~/tmp/Beagle/omap3_usb/host$ ./usbload
    TI OMAP3 USB boot ROM tool, version 0.1
    (c) 2008 Martin Mueller <martinmm at pfump.org>
    found device!
    download ok
    Loading Linux image...
    Done Loading Linux image.
    Loading RamDisk image...
    Done Loading RamDisk image.
    Booting Linux...  Check serial console for more messages.

In addition, you will see the kermit download manager in the terminal in
full screen.
- Notes:
    - The memory map on the target is:
        0x40200000    Internal RAM start.  Max top of stack
        0x40201000    Top of stack, start of code/data/bss
        0x4020F000    Reserved for ROM boot code.
    - The u-boot image created is VERY tight in memory.  We have 60k to
use, and the image is within 256 bytes of the max.  
    Be aware of this if/when porting to the beagle board.  Most of the
changes in the patch were to reduce the code size.
    - kermit download over /dev/ttyACM0 will not work if the
send/receive buffers are greater than 128 or so.  They have been 
    set to 128 in kermrc.
    - omap3_usbload must be run as root, as libusb seems to require it.
The usbload script uses sudo to do this.
Hope this is useful to someone.  If I've missed anything, just ask...
Thanks for all the community support!
Brian Silverman
Principal Engineer
Brian Silverman
Principal Engineer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot-omap3evm-usb-boot.patch
Type: application/octet-stream
Size: 12484 bytes
Desc: u-boot-omap3evm-usb-boot.patch
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090623/23def342/attachment-0003.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kermrc
Type: application/octet-stream
Size: 677 bytes
Desc: kermrc
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090623/23def342/attachment-0004.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usbboot
Type: application/octet-stream
Size: 109 bytes
Desc: usbboot
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090623/23def342/attachment-0005.obj 

More information about the U-Boot mailing list