[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] FAT FS troubles



On Thu, 2005-06-02 at 08:17 +1000, John Williams wrote:
> Hi Rudi,

Hi John,

> Rudolf Usselmann wrote:
> 
> > I am trying to bring up a block device driver that talks to
> > our SD/MMC Host IP Core. First I boot Linux from this card,
> > than I am trying to mount the Card under linux.
> > 
> > Everything seems to work just fine except the mounting part.
> > 
> >>From my analysis, it looks like the card is properly read,
> > it's the FAT FS part of ucLinux that is barking at my card(s).
> 
> If you enable the dd and hexdump (hd) user applications in your uclinux 
> build, can you do something like this:
> 
> dd if=/dev/mmc0 bs=512 count=2 | hd
> 
> and compare the output with a hexdump of the same card on a linux PC? 
> Just to confirm that the driver is in fact reading the sectors correctly?

Yes I have done that already. As I said it looks like the
driver is working correctly, we are really reading the first
sector, and subsequent sectors correctly.

> If you're lucky it might just be an endian issue or something similarly 
> easily fixed.
> 
> Another thing to test is try making an MSDOS filesys on a ramdisk under 
> uClinux, and make sure you can mount it etc.  You could do this by 
> running mkfs.fat on your host, to just make an empty filesystem image, 
> transfer that image to the uclinux board, put it somewhere writeable 
> (/tmp?), then mount it with the -o loop option.  Make sure you compile 
> in support for loop devices in the kernel and mount application.

Yes I will try to do this next.

> > It seems that NONE of the cards (we have about two dozen of
> > cards for testing here) have a proper "boot sector". So as I
> > try to mount the card, I get all kind of complains from the
> > FAT FS.
> 
> Can you post some representative samples of these error messages?

I have attached a log. I got past most FAT errors by manually
patching the boot sector. Now I need to figure out what the
FSINFO sector contains and where it is usually located. I
also do not understand where the 1024 limit is coming from ...

> Thanks,
> 
> John

PS: The "diskman" web site appears to be broken, I alway get
    some error page ... regardless where I click ...

Thanks,
rudi
=============================================================
Rudolf Usselmann,  ASICS World Services,  http://www.asics.ws
Your Partner for IP Cores, Design, Verification and Synthesis



# mount -t msdos /dev/mmc0 /mnt

FAT: Did not find valid FSINFO signature.
Found signature1 0x55555555 signature2 0x55555555 sector=1.
Directory 1: bad FAT
attempt to access beyond end of device
79:00: rw=0, want=2064, limit=1024
attempt to access beyond end of device
79:00: rw=0, want=44741306, limit=1024
Filesystem panic (dev 79:00).
  FAT error
  File system has been set read-only
#

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/