On Tue, Oct 12, 2010, Dave Martin wrote:
32 sectors * 16 heads is what I usually use -- this gives a 256KB cylinder size, which should be an integral number of underlying erase blocks on pretty much any flash device, and has divided exactly into the size of every SD card of flash stick I have ever seen. If we really want to be clever, we could use factor /sys/block/<dev>/size, to choose head and sector counts, but I doubt that it's worth it.
Unfortunately, OMAP's boot ROM imposes the current head/sector counts we're using
However, Linux never uses CHS, but always LBA; so we could arrange to use proper CHS and still align the partition properly
I don't know of any tool which allows doing that properly; I trust parted, but I never managed to force chs geometry with it. Not sure whether we can convince fdisk to do it, don't really like driving this thing
Disabling the journal (for ext4, use -onoload / for ext3, mount with -text2 instead) and/or mounting with noatime (-onoatime) would also make sense when mounting the rootfs to populate it, especially when using --mmc; this might improve performance a little.
I think relatime is the default already, it's probably good enough; isn't it?
Of course, since we're not trying to boot an obsolete PC BIOS or operating system on these devices, it's pretty meaningless to think in terms of cylinders; even in PC-land, this convention is now considered obsolete IIUC (how many devices _really_ have 63 sectors and 255 heads, and how much software still can't cope with >1023 cylinders?). In that case, we could just work in multiples of 2^n sectors, for some n (something in the range 19<=n<=21 is probably a good choice). Fortunately, Linux partitioners always support partitioning by sector these days.
Oh ok; so can you arrange for CHS to look like 63 sectors and 255 heads, and use rounded up LBA addresses with some tool of your choice?
Probably the boot partition needs to really start at a CHS address, not a LBA address
I did try to force this configuration manually, but I ran into problems--- the sectors/heads assumption is hard-coded into linaro-media-create in a number of places, and I didn't end up with something bootable... but I probably missed something.
Depends of your hardware's ROM too