ubuntu setup_sdcard.sh

hi

i tried the setup_sdcard.sh that you recommend with the ubuntu lucid
demo images. i get a few errors, but the script continues. you have
#!/bin/bash -e
at the top, which should stop at errors. but because you advise to run
as
". setup_sdcard.sh --mmc /dev/sdX"
i think the shebang line is ignored. i think the shebang is only read
when you invoke the script like
"./setup_sdcard.sh --mmc /dev/sdX"

once this is enabled the script needs lines 25 and 26 changed to
sudo umount ${MMC}1 || true
sudo umount ${MMC}2 || true

the script can also fail if there are more that 2 partitions on the
disk, eg boot, root swap. it might be best to create a new disklabel
instead of trying to delete the partitions.

sudo fdisk ${MMC} << CLEAN
o
p
w
CLEAN

also i am having trouble booting. with the new method of using a
boot.src file, boot always stops at
"""
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)
Reading boot sector
Loading u-boot.bin from mmc

U-Boot 2010.03-rc1 (Apr 01 2010 - 06:56:39)

OMAP3530-GP ES3.0, CPU-OPP2, L3-165MHz, Max clock-600Mhz
OMAP3 Beagle board + LPDDR/NAND
I2C: ready
"""

if i hold down user at boot then it boots ok.

do i need to update the u-boot on the board? i have a C3

Sam

Thanks Sam for the feedback,

Yeah it was mostly a quick first pass to get something released along
side with the beta2 image.. I'm working on adding a couple more
tweaks already, such as specifying board (igpev2/etc) and getting the
right MLO & u-boot.. Along with specifying filesystem, size of swap
file etc...

hi

i tried the setup_sdcard.sh that you recommend with the ubuntu lucid
demo images. i get a few errors, but the script continues. you have
#!/bin/bash -e

at the top, which should stop at errors. but because you advise to run
as
". setup_sdcard.sh --mmc /dev/sdX"
i think the shebang line is ignored. i think the shebang is only read
when you invoke the script like
"./setup_sdcard.sh --mmc /dev/sdX"

Yeah the file wasn't setup as executable.. I'll change that setting
to be more uniform, and then the second works..

once this is enabled the script needs lines 25 and 26 changed to
sudo umount ${MMC}1 || true
sudo umount ${MMC}2 || true

Done

the script can also fail if there are more that 2 partitions on the
disk, eg boot, root swap. it might be best to create a new disklabel
instead of trying to delete the partitions.

That makes much more sense, I'll give that a quick test..

sudo fdisk ${MMC} << CLEAN
o
p
w
CLEAN

also i am having trouble booting. with the new method of using a
boot.src file, boot always stops at
"""
Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)
Reading boot sector
Loading u-boot.bin from mmc

U-Boot 2010.03-rc1 (Apr 01 2010 - 06:56:39)

OMAP3530-GP ES3.0, CPU-OPP2, L3-165MHz, Max clock-600Mhz
OMAP3 Beagle board + LPDDR/NAND
I2C: ready
"""

if i hold down user at boot then it boots ok.

do i need to update the u-boot on the board? i have a C3

Yeah, the new u-boot needs the new X-Loader.. I've successfully
flashed both these new images on my Bx/C2/C4 and XM..

The X-loader flash instructions are here:

http://elinux.org/BeagleBoardUbuntu#Upgrade_X-loader (the file is
already on your sd card)

and u-boot:

http://elinux.org/BeagleBoardUbuntu#Upgrade_U-Boot (this file is also
already on your sd card..)

Regards,

Thanks. new X-loader worked.

it would also be nice if the script would ask you to confirm that you
had chosen the correct -mmc device before continuing. maybe it could
out put the existing partition table and disk size first.

thanks

sam

Thanks. new X-loader worked.

it would also be nice if the script would ask you to confirm that you
had chosen the correct -mmc device before continuing. maybe it could
out put the existing partition table and disk size first.

Yeah, that makes sense.. Dump a list and ask for permission..
Currently it only checks if that device exists then prints out a fdisk
-l if not found before exiting..

"sudo parted -s ${MMC} mklabel msdos" works sweet for creating a new table..

Regards,

and one more thing.

could the mkfs commands set labels for the partitions. i like to call
mine 'boot' and 'root' so that they automount with nice names in
ubuntu.

thanks

sam

could the mkfs commands set labels for the partitions. i like to call
mine 'boot' and 'root' so that they automount with nice names in
ubuntu.

That shouldn't be too hard, i'll wrap that change in with the fs_type change..

Here's what i did for the disk check..

http://bazaar.launchpad.net/~beagleboard-kernel/+junk/image-builder/revision/20

It seems to work, just rebuilding a quick image to verify things..

Regards,