Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2007 17:06:23 -0700
From:      Sean Bruno <sbruno@miralink.com>
To:        freebsd-embedded@FreeBSD.org
Subject:   [nanobsd] Calculation of new flash image size
Message-ID:  <465233FF.8060100@miralink.com>

next in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?465233FF.8060100>