[U-Boot-Users] USB SUPPORT

Ken.Fuchs at bench.com Ken.Fuchs at bench.com
Tue Apr 22 00:53:39 CEST 2008


micheal wrote:

> Ken Fuchs wrote:

> > #define CONFIG_SUPPORT_VFAT
> >
> > --- FAT16 vs. FAT32 - Atmel U-Boot v1.1.5 issue? ---
> >
> > I have found that the USB support is better
> > when the USB Storage device is FAT16 formatted
> > rather than FAT32 formatted.  For some reason
> > not all files were accessible on FAT32
> > formatted media, but I never had any problem
> > with FAT16 formatted media.

> Can you try this patch?
> In the git log there is another patch for vfat to be applied.

> Check if the entry is a valid dir_slot entry, otherwise it is 
> a dentry 
> and the
> name has to be taken by the get_name function
> 
> Signed-off-by: michael trimarchi <trimarchi at gandalf.sssup.it>

I tried it, but it did not work.

I also tried the earlier patch where Michael Trimarchi
added the CHECK_CLUST() macro, but it still doesn't work.

Next, I compared my fs/fat/fat.c with what was in git a few hours ago.
The only significant differences were in the fat_register_device(),
but after making my fs/fat/fat.c match what's in git (except for
trivial whitespace differences and recent CONFIG_* & CFG_* handling
differences, it still fails to work properly.

Test pen drive content:

$ ls -lU
total 6354
-rw-r--r-- 1 fuchsk mkpasswd    1298 Apr 18 12:57 xy010.ubs
-rw-r--r-- 1 fuchsk mkpasswd    1298 Apr 18 12:57 xy011.ubs
-rw-r--r-- 1 fuchsk mkpasswd    1298 Apr 18 12:57 xy100.ubs
-rw-r--r-- 1 fuchsk mkpasswd    1298 Apr 18 12:57 xy101.ubs
drwxr-xr-x 2 fuchsk mkpasswd       0 Apr 21 17:31 admin
-rw-r--r-- 1 fuchsk mkpasswd    1298 Apr 18 12:57 xy110.ubs
-rw-r--r-- 1 fuchsk mkpasswd    1298 Apr 18 12:58 xy111.ubs
drwxr-xr-x 3 fuchsk mkpasswd       0 Apr 21 17:31 Linux_demo
drwxr-xr-x 2 fuchsk mkpasswd       0 Apr 21 17:31 photos
drwxr-xr-x 2 fuchsk mkpasswd       0 Apr 21 17:31 videos
-rw-r--r-- 1 fuchsk mkpasswd      32 Apr 18 12:56 ab000.txt
-rw-r--r-- 1 fuchsk mkpasswd      32 Apr 18 12:56 ab001.txt
-rw-r--r-- 1 fuchsk mkpasswd      32 Apr 18 12:57 ab010.txt
-rw-r--r-- 1 fuchsk mkpasswd      32 Apr 18 12:57 ab011.txt
-rw-r--r-- 1 fuchsk mkpasswd      32 Apr 18 12:57 ab100.txt
-rw-r--r-- 1 fuchsk mkpasswd      32 Apr 18 12:57 ab101.txt
-rw-r--r-- 1 fuchsk mkpasswd      32 Apr 18 12:57 ab110.txt
-rw-r--r-- 1 fuchsk mkpasswd      32 Apr 18 12:57 ab111.txt
-rw-r--r-- 1 fuchsk mkpasswd  308326 Dec 18  2006 coffee.bmp
-rw-r--r-- 1 fuchsk mkpasswd   24116 Dec 18  2006 debian.bmp
-rw-r--r-- 1 fuchsk mkpasswd  153720 Dec 18  2006 debianlilo.bmp
-rw-r--r-- 1 fuchsk mkpasswd      65 Mar 31 13:01 index.txt
-rw-r--r-- 1 fuchsk mkpasswd     179 Apr 15 11:52 locvar.ubs
-rw-r--r-- 1 fuchsk mkpasswd      95 Apr 15 12:17 locvar1.ubs
-rw-r--r-- 1 fuchsk mkpasswd     101 Apr 15 12:28 locvar2.ubs
-rw-r--r-- 1 fuchsk mkpasswd   23662 Dec 18  2006 sarge.bmp
-rw-r--r-- 1 fuchsk mkpasswd   24116 Dec 18  2006 sid.bmp
-rw-r--r-- 1 fuchsk mkpasswd    6719 Apr 18 12:57 test000.ugz
-rw-r--r-- 1 fuchsk mkpasswd    6719 Apr 18 12:57 test001.ugz
-rw-r--r-- 1 fuchsk mkpasswd    6722 Apr 18 12:57 test010.ugz
-rw-r--r-- 1 fuchsk mkpasswd    6721 Apr 18 12:57 test011.ugz
-rw-r--r-- 1 fuchsk mkpasswd    6720 Apr 18 12:57 test100.ugz
-rw-r--r-- 1 fuchsk mkpasswd    6720 Apr 18 12:57 test101.ugz
-rw-r--r-- 1 fuchsk mkpasswd    6715 Apr 18 12:57 test110.ugz
-rw-r--r-- 1 fuchsk mkpasswd    6717 Apr 18 12:58 test111.ugz
-rw-r--r-- 1 fuchsk mkpasswd   92160 Oct 11  2007 U-Boot-xload.bin
-rw-r--r-- 1 fuchsk mkpasswd 5706338 Apr 18 12:46 xxx1.ugz.dis
-rw-r--r-- 1 fuchsk mkpasswd   41007 Apr 18 12:52 xxx2.ugz.dis
-rw-r--r-- 1 fuchsk mkpasswd   41007 Apr 18 12:56 xxx3.ugz.dis
-rw-r--r-- 1 fuchsk mkpasswd    1298 Apr 18 12:57 xy000.ubs
-rw-r--r-- 1 fuchsk mkpasswd    1298 Apr 18 12:57 xy001.ubs
$ ls -lU | wc
     42     371    2504
$ 

Here's fatls output on an XP FAT32 formatted pen drive:

U-Boot> fatls usb 0:1 /
fatls usb 0:1 /
     1298   xy010.ubs
     1298   xy011.ubs
     1298   xy100.ubs
     1298   xy101.ubs
            admin/
     1298   xy110.ubs
     1298   xy111.ubs
            linux_demo/
            photos/
            videos/
       32   ab000.txt
       32   ab001.txt
       32   ab010.txt
       32   ab011.txt
       32   ab100.txt
       32   ab101.txt
       32   ab110.txt
       32   ab111.txt
   308326   coffee.bmp
    24116   debian.bmp
   153720   debianlilo.bmp
       65   index.txt
      179   locvar.ubs
       95   locvar1.ubs
      101   locvar2.ubs
    23662   sarge.bmp
    24116   sid.bmp
     6719   test000.ugz
     6719   test001.ugz
\365+3.\341
            write.sk4/
 1718159906   .000
            otm.800/
            /
 2016419888   .mmc
 808464432   20000000."

            0.0x2/
            if.ad/
            :1.000/
 808464432   ."
 1948269360   ;
 1920409699   hen

            ite.0/
            .wri/
            .280/
 540028976   "
if.loa
 1763713056   /part3.u.gz;
            f.0x2/
            .280/
 808465457   ho
            0.000/
 544172131   28000.000
 1667566090   ".

            0.10./
 2016419949   ;
 808464432   .ite
 538976266   0x200000.00


40 file(s), 17 dir(s)

U-Boot> 

Here's fatls output on an Linux mkdosfs -F 32 formatted pen drive:

U-Boot> usb reset
usb reset
(Re)start USB...
USB:   scanning bus for devices...
      USB device not responding, giving up (status=20)
3 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
U-Boot> fatls usb 0:1 /
fatls usb 0:1 /
       32   ab001.txt
       32   ab101.txt
     1298   xy001.ubs
     1298   xy101.ubs
     6719   test001.ugz
     6720   test101.ugz
            admin/
            linux_demo/
            photos/
            videos/
   308326   coffee.bmp
    24116   debian.bmp
 168636477   version=.3


9 file(s), 4 dir(s)

U-Boot> 

---

Sincerely,

Ken Fuchs




More information about the U-Boot mailing list