[nanobsd] Calculation of new flash image size
Sean Bruno
sbruno at miralink.com
Tue May 22 00:06:24 UTC 2007
If the manufacturer doesn't provide me with the specific values for
NANO_SECTS, NANO_HEADS and NANO_MEDIASIZE, I assume that I would be able
to use the output of fdisk to calculate it for me:
fmybox# fdisk /dev/ad0
******* Working on device /dev/ad0 *******
parameters extracted from in-core disklabel are:
cylinders=993 heads=16 sectors/track=63 (1008 blks/cyl)
parameters to be used for BIOS calculations are:
cylinders=993 heads=16 sectors/track=63 (1008 blks/cyl)
So in this case, NANO_SECTS=63, NANO_HEADS=16 and NANO_MEDIASIZE=(993 *
16 * 63)=1000944?
I added the following to Flashdevices.sub:
dom512m)
# Source: sbruno at miralink.com
NANO_MEDIASIZE=`expr 512483328 / 512`
NANO_HEADS=16
NANO_SECTS=63
;;
If I do this for my new Transcend module, the system won't boot properly
and freezes on the BTX boot loader startup.
What am I doing wrong here?
Sean
More information about the freebsd-embedded
mailing list