BBBlack - Always tries to boot from SD Card regardless of S2

I have a 16GB microSDHC card (from an old blackberry) inserted and the BBBlack won’t boot, just hangs with 3 of the 4 LEDs on.

Serial debug messages:

U-Boot SPL 2013.04-rc1-14237-g90639fe-dirty (Apr 13 2013 - 13:57:11)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
mmc_send_cmd : timeout: No status update
reading u-boot.img
reading u-boot.img

U-Boot 2013.04-rc1-14237-g90639fe-dirty (Apr 13 2013 - 13:57:11)

I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 1 … 0
gpio: pin 53 (gpio 53) value is 1
mmc0 is current device
micro SD card found
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
** Unable to read file uEnv.txt **
gpio: pin 55 (gpio 55) value is 1
** Invalid partition 2 **
U-Boot#

This is without the S2 button being pressed.

With S2 being pressed:

U-Boot SPL 2013.04-rc1-14237-g90639fe-dirty (Apr 13 2013 - 13:57:11)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
mmc_send_cmd : timeout: No status update
reading u-boot.img
reading u-boot.img

U-Boot 2013.04-rc1-14237-g90639fe-dirty (Apr 13 2013 - 13:57:11)

I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 1 … 0
gpio: pin 53 (gpio 53) value is 1
mmc0 is current device
micro SD card found
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
** Unable to read file uEnv.txt **
gpio: pin 55 (gpio 55) value is 1
** Invalid partition 2 **
U-Boot#

Keeps trying to look for the uEnv file on the SD card I just installed.

Hi,

That's normal, the U-Boot configuration tries to load a kernel from the
uSD card if it detects a card.

In your case, its detecting a card and tries to load a kernel from the
2nd partition of the card. Obviously if your card is empty, it will fail
to boot.

The S2 button is for booting using the U-Boot in the first partition of
the uSD card. Otherwise it boots using the U-Boot of the eMMC.

In other words, if you want to expand the storage space using an uSD
card, you can do it with two ways:

a) The easy one, format the uSD card using the OMAP layout: first
partition a FAT32 one, put in there a uEnv.txt file overriding some
variables of U-Boot.

b) Modify the default configuration of the U-Boot present in the eMMC.
This requires editing the source code of U-Boot to modify the default
environment variables, recompile it using a cross-compiler and replace
the bootloader.

I've documented this on my guide to put Gentoo in the BBB:
http://dev.gentoo.org/~armin76/arm/beagleboneblack/install_emmc.xml#expand

Hope it helps.

That was the original intent.

Gerald

It’s frustrating the heck out of me right now. I want to install ArchLinux but I can’t because I have no way to produce an ext4 file system on the second partition. None of the methods I have tried allow for it and VMware and Virtual Box will not seem to allow me to access the card readers on my Mac or PC. I’m finding the SD card to be the most confusing and aggravating part of the experience thus far. Early adopter woes I guess. I’m going to try getting a USB card reader and see if VMWare or VBox can use that.

I want to see how Arch and Angstrom compare for my robotics use case.

I hear you! Nothing I have found in the windoze world can do it. You need a Linux machine. VMWARE or VBOX should get you there.

Gerald

Robert C. Nelson made some modifications to the U-Boot default environment to fix this issue: https://groups.google.com/d/msg/beagleboard/lEMH0rvm6Ys/FYEN2E5bFRMJ

IMHO that change should be added in the official SW images if it doesn’t create a regression.

I could create an U-Boot with that change applied so you can replace it, but i’d prefer if this was done officially. Gerald, Koen, any chance this can be reviewed?

Thanks

Has a patch been submitted?

Gerald

I just added the patch to here:

https://github.com/beagleboard/meta-beagleboard/issues/3
https://gist.github.com/RobertCNelson/5517500

Limitations/Changes from the current image..

This relies on finding a valid "uEnv.txt" on the device and it
actually containing a variable "uenvcmd" to boot from that medium..
(We can't just run loaduimage/loadfdt/mmcboot only if the device
exists, as it maybe blank..)

For the eMMC: since it can now be either /dev/mmcblk0 or /dev/mmcblk1
depending on the status of the microSD, i had to use it's UUID for
both the bootargs and /etc/fstab..

Regards,

Well, I’m home now and have had a bit to play with it!

So, the BBB definitely boots now (rather than hanging at 3/4 LEDs like it had before.) with the SD card inserted. However, it doesn’t get into the state like it usually does without the SD card. The first partition of the SD card shows up on my host machine where the ‘Getting Started’ USB storage device usually would, and from what I can tell, none of the normal software seems to get running. (The web server doesn’t seem to be running, nor the sshd.)

Did I miss something?

And now I must admit I’m quite sheepish: I don’t know what I’ve managed to change, but everything is definitely in working order. (I re-saved uEnv.txt first with CR+LF line endings, which caused it to not boot at all, and then again with LF only endings, but an extra LF at the end, and it seems happy now. Boots up and works just wonderfully. I have the first partition mounted as /media/boot, and the nice large one mounted as /media/rootfs, and it looks like he’s all happy for me to start dumping data on. I guess I still have some learning to do! (Though it definitely shows up with the ‘boot’ as the USB drive in my host machine, it seems that one is hardcoded to be /dev/mmcblk0p1, so that seems intended.)

Though, being inexperienced with most of this: I’m curious as to what the best-use-case scenario you guys would recommend: I’d like to do a little development on the BBB itself, but having only ~70MB free on the internal storage, maybe I shouldn’t just try to install eclipse right there and start coding away. Maybe booting with the OS and everything installed on the SD card is ideal for that? But like I was saying in a prior message: The only instructions I could find were the ones to re-flash the eMMC.

Thanks for all your help, guys!

The irony of course, is that the BBB is a linux machine and I have 4 of them on my desk right now, but I cant use them to partition or format my sdcard.

It’s an enormous pity that the kernel doesnt seem to recognize an sdcard when its inserted. I’m not sure what it would take to get that to work but it’d alleviate a lot of frustration amongst first-time users.

  • VV

Raul, I found your page very useful and the script gave me a pretty decent idea of what’s going on. Thanks.

However, the process didnt quite work (the boot dies with a kernel panic)

[ 0.737907] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
:
[ 0.800318] drm_kms_helper: panic occurred, switching back to text console

I thought the partition/device numbers may have changed and I swapped them around but that didnt seem to help.

However, I notice that you say:

Code Listing 7.4: Copying U-Boot and MLO to the microSD card

but the code listing itself just copies uEnv.txt

I tried to copy the MLO and u-boot.img as well, but that didnt seem to change anything.

Any suggestions would be much appreciated!

Thx

  • Vijay

Vijay,
It shld be possible to stick the sd card into a usb card reader
and then plug into the BBB?
Then can do anything with it?

With virtual box, you only need to know the exact device name, then use a filter to grab it, Usually, or a lot of the time the uSD reader is recognized by the
host OS as a USB device. Trial and error may be required.