[U-Boot-Users] booting from USB

Wolfgang Denk wd at denx.de
Wed Feb 2 18:10:56 CET 2005

Hallo Jonas,

in message <4200EE8D.3020901 at fsforth.de> you wrote:
> Just played around with my usb stick and reduced the size of the first 
> partition. When I now try the usbboot command the number of blocks is 
> exact the size of the partition.

This doesn't make sense.

> Is there a special way of creating the image or can I use the same I use 
> with the tftp command?

You use the very same image.

Does the "usbboot" command print the image header? Does the data look
correct, especially the image size?

> > How did you write the image to the USB stick?
> I tried to follow DULG -booting from IDE, Compact Flash. Maybe it was 
> not a good idea...

Actually this should work.

> Copied it from my host to the stick. This is not the proper way?

It is.

> Can you tell me which fs to use? I tried it with dos.

DOS, VFAT and ext2 have been tested by  myself;  never  tried  reiser

Try adding some debug prints to "common/cmd_usb.c"; like here:

    396         hdr = (image_header_t *)addr;
    398         if (hdr->ih_magic == IH_MAGIC) {
    399                 print_image_hdr (hdr);
    400                 cnt = (hdr->ih_size + sizeof(image_header_t));
    401                 cnt += info.blksz - 1;
    402                 cnt /= info.blksz;
    403                 cnt -= 1;
    404         } else {
    405                 printf("\n** Bad Magic Number **\n");
    406                 return 1;
    407         }

Check  if  the  value  of  "cnt"  looks  sane  to  you.  Verify  that
hdr->ih_size and info.blksz hold correct values.

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I've seen it. It's rubbish."          - Marvin the Paranoid Android

More information about the U-Boot mailing list