From: Joey Oravec <joravec@drewtech.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] FAT mbr on MMC or SD cards
Date: Wed, 13 Jun 2007 11:54:46 -0400 [thread overview]
Message-ID: <f4p407$8qj$1@sea.gmane.org> (raw)
Hi all,
I've been testing a wide variety of MMC/SD cards straight out of the
package. Some cards have a MBR at sector 0 (like a hard drive) while others
are unpartitioned with a volume boot sector at sector 0 (like a floppy). And
it might change if you reformat the card.
I'm still on 1.1.5, but I didn't see any major changes in 1.1.6. Within
fs/fat/fat.c one of the first functions file_fat_detectfs() calls
read_bootsectandvi(). I think I need to make, and then submit patches for, a
few changes:
1. This code assumes that sector 0 contains a VBR. Instead I think it should
decide if 0 is an MBR or VBR, or even better utilize the dev:part command
line. Can I make this determination that from the first three bytes, or is
there a better way?
2. The decision of fat12, fat16, and fat32 is made upon fat_length and an
ascii field. The Microsoft document claims that the determination shall be
made only by the count of clusters. Any disputes on that fix?
3. Structure boot_sector may need a packed attribute. As far as I can tell
there are no makefile flags so gcc is free to add padding to align members
inside structures. This would be a problem for the memcpy from block to
boot_sector within read_bootsectandvi(). What is the coding standard for
specifying 1-byte packing where necessary? Just add the gcc attribute?
Thanks!
-joey
next reply other threads:[~2007-06-13 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-13 15:54 Joey Oravec [this message]
2007-06-13 18:41 ` [U-Boot-Users] FAT mbr on MMC or SD cards Wolfgang Denk
2007-06-13 20:59 ` Joey Oravec
[not found] <20070613212533.EA32A353B6D@atlas.denx.de>
2007-06-18 11:04 ` Heiko Schocher
2007-06-18 13:51 ` Joey Oravec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='f4p407$8qj$1@sea.gmane.org' \
--to=joravec@drewtech.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.