seeking basic BB support, will pay $

I am seeking very basic Beagleboard support --
at a newbie level, having to do with basic SD
card image creation.

I've been unable to resolve these issues through
the various BB support pages or through this
group, so I'm willing to pay $ as required to get
me over this hump. Please respond privately,

rafeb AT speakeasy.net. Thanks.

/Rafe B.

since simply creating an SD card should be a no-brainer, what online
docs have you followed? if what's available truly isn't describing
the process properly, it needs to be fixed.

rday

Rafe,

Please do describe your issues for us in public. I (and I assume
others on here) are happy to help for free if we're able to understand
your issue. If there's a deficiency in the documentation, that's easy
to fix so that others can learn, too.

Creating an SD card image should not be an insurmountable issue
provided you have properly working hardware (BB, SD card, and SD card
reader) and a Linux box.

-Andrew

the first test should be whether one can simply boot a downloaded
validation image.

rday

OK, since you asked :slight_smile:

My system: A fairly generic desktop PC running Ubuntu 11.10.

SD cards are generic SanDisk, in sizes ranging from 1GB to 4GB.

The USB card reader for these is also generic.

The Beagleboard is quite new, purchased in December and
labeled C5.

I started by trying the 'Validation' procedure from the BBSRM,
but was told (probably by J. Kridner or G. Coley) that this
procedure wasn't valid.

I generally start things off by formatting the card with the
HP USB Disk Storage Format Tool in Windows, and that
part seems to go OK.

I've been told by R.C Nelson that the version of fdsik on my
Ubuntu workstation needs a specific command line argument, to wit

fdisk -c=dos -u=cylinders [...]

though that hasn't helped, and ISTM I can set those switches
within fdisk itself. Indeed when I switch to "cylinders" within
fdisk, fdisk obliges but tells me that this feature is DEPRECATED.

fdisk identifies itself as (util-linux 2.19.1)

I've also tried formatting the card with gparted (the GUI
app) with no better results, but perhaps it uses fdisk
anyway, so that's no surprise.

I've also tried the mkcard.sh script, which didn't work either.

What I need (I think) is a foolproof recipe for formatting
my SD card. ISTM, it needs to be a dual-partition affair
but I might be wrong about that. Most procedures have
a set of files placed in the FAT/boot partition (eg. MLO,
u-boot.bin, uImage, maybe some .scr files) and a
root filesytem that gets un-tarred into the 2nd, Linux
partition.

The other thing I need is a coherent and explicit set of files
to load on to the board; valid URLs to obtain them, and their
names as they should appear on the SD card, and the SD
partitions in which to place them. [As I understand it, the
root filesystem gets un-tarred directly to the SD card, rather
than copied.]

There are *numerous* versions of the Beagleboard SD
card formatting/setup procedure located on the web, and I
have tried many of them. If you can point to one that's
up-to-date and bullet-proof, I'd be happy to try it --
or if I've already tried it, I'll try it again and let you know
how it goes.

The only procedure that worked was a complete SD card
'image' that gets written onto the card by
"Win32DiskImager.exe" in one swell foop. (per the
Circuitco website.)

That's nice -- it seems to prove the hardware is OK,
but it doesn't teach me much and it's not an image I
can easily customize.

/Rafe

> Rafe,
>
> Please do describe your issues for us in public. I (and I assume
> others on here) are happy to help for free if we're able to understand
> your issue. If there's a deficiency in the documentation, that's easy
> to fix so that others can learn, too.
>
> Creating an SD card image should not be an insurmountable issue
> provided you have properly working hardware (BB, SD card, and SD card
> reader) and a Linux box.

the first test should be whether one can simply boot a downloaded
validation image.

rday

OK, since you asked :slight_smile:

My system: A fairly generic desktop PC running Ubuntu 11.10.

SD cards are generic SanDisk, in sizes ranging from 1GB to 4GB.

The USB card reader for these is also generic.

The Beagleboard is quite new, purchased in December and
labeled C5.

I started by trying the 'Validation' procedure from the BBSRM,
but was told (probably by J. Kridner or G. Coley) that this
procedure wasn't valid.

I generally start things off by formatting the card with the
HP USB Disk Storage Format Tool in Windows, and that
part seems to go OK.

I've been told by R.C Nelson that the version of fdsik on my
Ubuntu workstation needs a specific command line argument, to wit

Hi Rafe,

fdisk -c=dos -u=cylinders [...]

though that hasn't helped, and ISTM I can set those switches
within fdisk itself. Indeed when I switch to "cylinders" within
fdisk, fdisk obliges but tells me that this feature is DEPRECATED.

fdisk identifies itself as (util-linux 2.19.1)

it may be DEPRECATED, but those developers don't live in the real world. .:wink:

I just pushed out a quick script based on the ones i use for my demo
images, care to give it a try?

wget https://raw.github.com/RobertCNelson/omap-image-builder/master/tools/setup_boot.sh
chmod +x ./setup_boot.sh

#run as:
sudo ./setup_boot.sh --mmc /dev/sdX --uboot beagle_cx

It'll only install the bootloader for the beagle, no kernel image..
But you should see the board now bootup over the serial terminal..

Regards,

Hi. Robert. I will try your script and report. But I have no problem getting to u-boot prompt at the moment. (There was a short while when that was a problem but not right now.)

Robert Nelson wrote:

I've been told by R.C Nelson that the version of fdsik on my
Ubuntu workstation needs a specific command line argument, to wit

Hi Rafe,

fdisk -c=dos -u=cylinders [...]

though that hasn't helped, and ISTM I can set those switches
within fdisk itself. Indeed when I switch to "cylinders" within
fdisk, fdisk obliges but tells me that this feature is DEPRECATED.

fdisk identifies itself as (util-linux 2.19.1)

it may be DEPRECATED, but those developers don't live in the real world. .:wink:

I just pushed out a quick script based on the ones i use for my demo
images, care to give it a try?

wget https://raw.github.com/RobertCNelson/omap-image-builder/master/tools/setup_boot.sh
chmod +x ./setup_boot.sh

...
#With util-linux, 2.18.x/2.19.x, fdisk no longer has dos/cylinders mode on by default
  unset FDISK_DOS

  if test $(fdisk -v | grep -o -E '2\.[0-9]+' | cut -d'.' -f2) -ge 18 ; then
   FDISK_DOS="-c=dos -u=cylinders"
  fi
...

since the OMAP boot ROM does not care at all for the CHS values
in the partition table, why do you go great lengths to use cylinders
and some "DOS" mode when formatting an SD card?

I don't remember exactly anymore, starting with fdisk 2.18, i just
forced 2.16 compatibly mode with "-c=dos -u=cylinders" since it would
still boot reliable.. And really didn't look more into it when i
should have, so testing this morning:

fdisk (util-linux 2.20.1)
with: -c=dos -u=cylinders

Disk /dev/sdf: 2038 MB, 2038431744 bytes
63 heads, 62 sectors/track, 1019 cylinders, total 3981312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c2bb0

   Device Boot Start End Blocks Id System
/dev/sdf1 * 62 136709 68324 e W95 FAT16 (LBA)
/dev/sdf2 136710 3980213 1921752 83 Linux

(boots fine on my Beagle C2)

fdisk (util-linux 2.20.1)
without: -c=dos -u=cylinders

Disk /dev/sdf: 2038 MB, 2038431744 bytes
63 heads, 62 sectors/track, 1019 cylinders, total 3981312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b6fc0

   Device Boot Start End Blocks Id System
/dev/sdf1 * 2048 133119 65536 e W95 FAT16 (LBA)
/dev/sdf2 133120 3980213 1923547 83 Linux

(also boots fine on my Beagle C2)

The real change, with fdisk 2.18+ the first sector can't be "1", needs
to be 2048 or greater..

Command (m for help): Partition type:
   p primary (0 primary, 0 extended, 4 free)
   e extended
Select (default p): Partition number (1-4, default 1): First sector
(2048-3981311, default 2048):

so the real fix i should have done, starting with 2.18 was:

+ FDISK_FIRST_SECTOR="1"
  if test $(fdisk -v | grep -o -E '2\.[0-9]+' | cut -d'.' -f2) -ge 18 ; then
- FDISK_DOS="-c=dos -u=cylinders"
+ FDISK_FIRST_SECTOR="2048"
  fi

-fdisk ${FDISK_DOS} ${MMC} << END
+fdisk ${MMC} << END
n
p
1
-1
+${FDISK_FIRST_SECTOR}
+64M
t
e

Regards,

Hi Rafe,

I'm nut sure whether this is the case on your side, but I'm using
Ubuntu 11.10 on my main machine and it localized. It means that the
output of some of the basic commands are also translated. Like fdisk
for example. In this case the script which prepares the SD card will
fail since it tries to grep in the output but the localized version
does not contain the required word.

So check the script, look for calls to grep and check that your get
the required text from your commands.

Best regards,
Blaise

If localization is having an issue, would exporting LANG=C before
running fdisk commands help?
-Andrew