SD card setup script?

Hi,

i am working on MeeGo on BeagleBoard and i'd like to simplify the installation as far as possible. So
i wonder if there's a script somewhere that can automate the somewhat tricky formatting of a given sd card.

Does such a script exist?

Regard,
  Till

There's 2/3 variations:

Angstrom's:
http://www.sakoman.com/cgi-bin/gitweb.cgi?p=openembedded.git;a=blob;f=contrib/angstrom/omap3-mkcard.sh;hb=HEAD
(angstrom's cgit seems down for me at the moment:
http://cgit.openembedded.org/cgit.cgi/openembedded/ )

Mine:
https://github.com/RobertCNelson/omap-image-builder/blob/master/tools/setup_sdcard.sh

Linaro's media create:
http://bazaar.launchpad.net/~linaro-maintainers/linaro-image-tools/linaro-image-tools/annotate/head:/linaro-media-create

Regards,

Hi,

thanks, exactly what i was looking for!

Till

Angstrom version (omap3-mkcard.sh) does not provide a way to make a SWAP partition. Sometimes it is necessary

2010/11/24 Till Harbaum <till@harbaum.org>

Hi Robert,

I am noticed that you don't calculate the cylinder according to the
size of the disk.
Does the cylinder determined implicitly according to the header and
sector you specified?
Thinks...

Hi,

Yeah, the parameters to create the first 'fat' partition are pretty
unique.. It's more off, these settings seem to work best with the
internal bootrom, then what is optimized for the end user's specific
sd card..

Regards,

I'd like to suggest you to consider systems like Slackware Linux.
When formatting the vfat partition the scripts you posted use
mkfs.vfat but my OS (Slackware 13.1) hasn't that command .
I replaced mkfs.vfat in the (Angstrom) script with mkdosfs.

It's actually been a long time since i've used slackware.. (386 days)...

currently the script does:

sudo mkfs.vfat -F 16 ${MMC}${PARTITION_PREFIX}1 -n ${BOOT_LABEL} &>
${DIR}/sd.log

so does

sudo mkdosfs -F 16 ${MMC}${PARTITION_PREFIX}1 -n ${BOOT_LABEL} &> ${DIR}/sd.log

work just fine for you?

I'm thinking of doing a 'whereis on mkfs.vfat' if not found, then try
'whereis mkdsofs'.. to detect this issue.

Or are you thinking a differnet way? i'd like to keep away from
detecting every possible distribution, as there is only a few tools
actually being used in the script..

mkimage from u-boot

mkfs.vfat

mkfs.ext2
mkfs.ext3
mkfs.ext4
mkfs.btrfs

Regards,

I edited the script from Angstrom:
http://www.angstrom-distribution.org/demo/beagleboard/mkcard.txt

replacing mkfs.vfat with mkdosfs and all works fine.

slchen wrote:

Hi Robert,

I am noticed that you don't calculate the cylinder according to the
size of the disk.
Does the cylinder determined implicitly according to the header and
sector you specified?

1) there is no disk

2) there are no cylinders

3) the boot rom does not care about the C/H/S values in the partition table.

Retested on my Bx/Cx/xM seems safe now without this old tweak/workaround...

Regards,