It seems that you have discovered some endianness problems.
Obviously the FAT filesystem has never been used on big endian architectures
with the 2.0 kernel.
Look at include/linux/msdos_fs.h, it presumes little-endian order:
* Conversion from and to little-endian byte order. (no-op on i386/i486)
* Naming: Ca_b_c, where a: F = from, T = to, b: LE = little-endian,
* BE = big-endian, c: W = word (16 bits), L = longword (32 bits)
#define CF_LE_W(v) (v)
#define CF_LE_L(v) (v)
#define CT_LE_W(v) (v)
#define CT_LE_L(v) (v)
It It should be something like:
#define CF_LE_W(v) le16_to_cpu(v)
#define CF_LE_L(v) le32_to_cpu(v)
#define CT_LE_W(v) cpu_to_le16(v)
#define CT_LE_L(v) cpu_to_le32(v)
I have no idea if there are additional bugs. Hope that helps.
Frank Haverkamp[SMTP:firstname.lastname@example.org] wrote:
> I do some experiments with SmartMedia which uses a FAT (vFAT)
> filesystem. I can read the card, write it, formatting is
> not finished yet. I wanted to see if I could write a readonly
> filesystem for my SmartMedia card. Therefore I enabled the
> FAT-support in my uClinux distribution for the Coldfire uC.
> When I passed the partition boot record of my SmartMedia card
> I got the following:
> [MS-DOS FS Rel. 12,FAT 0,check=n,conv=b,uid=0,gid=0,umask=022,bmap]
> Transaction block size = 512
> VFS: Can't find a valid MSDOS filesystem on dev 78:00. (0x78 is my major
> which was strange to me, cause my notebook pcmcia stuff
> accepted the card getting the same pbr, and it detected
> the correct parameters. The field "ls" is the logical sector
> size which should be 0x0200 and not 2 indicating 512 bytes
> for one logical sector.
> Does anyone had similar experience or have anybody used
> the FAT/vFAT support with uClinux?
> Frank Haverkamp Domologic Homeautomation
> mailto: email@example.com Rebenring 33
> WWW: http://www.colibree.de 38106 Braunschweig
> This message resent by the firstname.lastname@example.org list server http://www.uClinux.com/
This message resent by the email@example.com list server http://www.uClinux.com/
This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:38 EST