Story about my u-boot difficulties

Hello all, I thought I’d share my u-boot struggles I had tonight with you. Maybe you can shed some light on what went wrong, and what went right.

So before we start, you need to know that I love Arch linux, btrfs, and snapper. the snapper utility itself would be great for the experimentation I do on the BBB because it allows easy snapshots and rollbacks of the file system.

So anyway. I decided I wanted to get my device going with arch and btrfs. So I dig around and realize that uboot doesn’t support btrfs yet; however there seems to be a rogue uboot git repo which claims to have btrfs up and going (https://github.com/falstaff84/u-boot). So I download this repo, compile and put it on my SD card.

Yet, every time I bootup my device, even when holding the boot button, I notice that the timestamp for uboot is not the same as what I compiled. So I get smart, and cp the MLO and u-boot.img from my SD card to the eMMC. After this, I notice the timestamp for the uboot is todays date. Great… Except this uboot doesn’t boot my kernels.

I reformat my SD card to the BBBArch default, but still, the eMMC uboot is being used, and I cant load my kernels. Even when holding down the boot buttons.

So in a desparate attempt to save myself, I grab RCNs eMMC flasher image (

[https://rcn-ee.net/deb/flasher/wheezy/BBB-eMMC-flasher-debian-7.4-2014-02-16-2gb.img.xz](https://rcn-ee.net/deb/flasher/wheezy/BBB-eMMC-flasher-debian-7.4-2014-02-16-2gb.img.xz)).  Throw it on the SD card and pray.

Prayers are answered, as the device immediately boots from the SD card's uboot rather than the MMC.

Anyways.  Here is the error I was getting.  Any ideas why RCNs image used the SD for uboot, but the BBBArch image didn't?

U-Boot SPL 2013.07-rc1-g13e4350 (Feb 24 2014 - 20:35:37)
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 args
spl: error reading image args, err - -1
reading u-boot.img
reading u-boot.img

U-Boot 2013.07-rc1-g13e4350 (Feb 24 2014 - 20:35:37)

I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 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: 0
gpio: pin 53 (gpio 53) value is 1
syntax error
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
681 bytes read in 4 ms (166 KiB/s)
Importing environment from mmc …
gpio: pin 55 (gpio 55) value is 1
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd …
mmc0 is current device
3309688 bytes read in 562 ms (5.6 MiB/s)
24884 bytes read in 43 ms (564.5 KiB/s)
Booting from mmc …
ERROR: booting os ‘Invalid OS’ (0) is not supported

Hello all, I thought I’d share my u-boot struggles I had tonight with you. Maybe you can shed some light on what went wrong, and what went right.

So before we start, you need to know that I love Arch linux, btrfs, and snapper. the snapper utility itself would be great for the experimentation I do on the BBB because it allows easy snapshots and rollbacks of the file system.

So anyway. I decided I wanted to get my device going with arch and btrfs. So I dig around and realize that uboot doesn’t support btrfs yet; however there seems to be a rogue uboot git repo which claims to have btrfs up and going (https://github.com/falstaff84/u-boot). So I download this repo, compile and put it on my SD card.

Yet, every time I bootup my device, even when holding the boot button, I notice that the timestamp for uboot is not the same as what I compiled. So I get smart, and cp the MLO and u-boot.img from my SD card to the eMMC. After this, I notice the timestamp for the uboot is todays date. Great… Except this uboot doesn’t boot my kernels.

I reformat my SD card to the BBBArch default, but still, the eMMC uboot is being used, and I cant load my kernels. Even when holding down the boot buttons.

So in a desparate attempt to save myself, I grab RCNs eMMC flasher image (

https://rcn-ee.net/deb/flasher/wheezy/BBB-eMMC-flasher-debian-7.4-2014-02-16-2gb.img.xz). Throw it on the SD card and pray.

Prayers are answered, as the device immediately boots from the SD card’s uboot rather than the MMC.

Anyways. Here is the error I was getting. Any ideas why RCNs image used the SD for uboot, but the BBBArch image didn’t?

Not entirely true. I’ve patched uboot to actively scan the mmc and load a specifically crafted uenv.txt file. So its loading the uboot bins from emmc, its just sanely booting from mmc when told to.

I still dont quite understand. Are you saying that the specifically crafted uenv.txt on the sd card was able to work around the problems from the emmc uboot bins, thus allowing the proper kernel to be run? Or is there something special in the sd card's uboot bins that allow them to be run, even though the emmc uboot isnt fully functional?

Yes, that's what i said..

Of course, it's easier if you also patch u-boot to make that
functionality error proof..

https://github.com/RobertCNelson/Bootloader-Builder/blob/master/patches/v2013.10/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch#L146

Regards,

btw, more details about your original problem.. "2013.07-rc1 -> rc3"
was broken for "zImage" boot. Hence your error.

Regards,