Beaglebone Black SD boot problem

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

Beaglebone Black SD boot problem

Postby olig1905 » Thu Jul 04, 2013 5:17 pm

Right, I have just followed the guide to getting an SD card to boot Archlinux Arm on the Beaglebone black.
I cannot tell if it is booting from the SD card or from emmc as u-boot is the same whether i hold the button or not.
They both load uEnv.txt and try to boot from the SD card, at which point i get the message "ERROR: can't get kernel image!"
Everything seems to be fine up until the bootm command which is what produces this message.

Here are some of my u-boot environment variables.

$this->bbcode_second_pass_code('', '
uenvcmd=run findfdt; if test $board_name = A335BNLT; then i2c mw 0x24 1 0x3e; setenv mmcdev 1; mmc dev ${mmcdev}; if mmc rescan; then setenv mmc1 1;else setenv mmc1 0;fi;fi;setenv mmcdev 0; mmc dev ${mmcdev}; if mmc rescan; then setenv mmc0 1;else setenv mmc0 0;fi;if run loaduimage; then run loadfdt;run mmcboot;fi;

loaduimage=if ext4load mmc 0:2 ${loadaddr} /boot/zImage; then setenv mmcdev 0; else setenv mmcdev 1; if test $mmc0 =1; then setenv mmcroot /dev/mmcblk1p2 rw; fi; ext4load mmc 1:2 ${loadaddr} /boot/zImage; fi

loadfdt=ext4load mmc ${mmcdev}:2 ${fdtaddr} /boot/dtbs/${fdtfile}

mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${kloadaddr} - ${fdtaddr}

')

This is what i see when i 'run uenvcmd'

$this->bbcode_second_pass_code('', 'U-Boot# run uenvcmd
mmc_send_cmd : timeout: No status update
mmc1(part 0) is current device
mmc_send_cmd : timeout: No status update
mmc0 is current device
3251480 bytes read in 552 ms (5.6 MiB/s)
23801 bytes read in 41 ms (566.4 KiB/s)
Booting from mmc ...
Wrong Image Format for bootm command
ERROR: can't get kernel image!
')

I do not see the timeouts when it autoboots so i must be skipping something when im doing it manually, but either way same error.

If you need me to provide any more information I can, as you may have guessed i have an FTDI cable.

My goal is to wipe the emmc so i do not have to press the boot button to boot from SD. I have a BeadaFrame LCD cape and from what i understand you cannot boot from emmc and use and LCD cape, but the cape covers the boot switch.
olig1905
 
Posts: 2
Joined: Thu Jul 04, 2013 4:56 pm

Re: Beaglebone Black SD boot problem

Postby olig1905 » Sat Jul 06, 2013 11:19 am

More info as i havent had a reply yet thought of some more things that may help

$this->bbcode_second_pass_code('', '
kloadaddr=0x80007fc0
loadaddr=0x80200000
fdtaddr=0x80F80000
fdtfile=am335x-boneblack.dtb
')

Another thing worth mentioning is that im trying to do this whilst powering it by USB. I have read that people have had problems with SD cards whilst not using a proper powersupply. I would have thought the USB can provide enough power to boot from SD card though. However i will get a powersupply on monday and try it out. Till then I would appreciate any advice, if you can compare your environment to mine maybe, im not sure if u-boot is coming from eMMC or SD and i have no way of telling.

Thanks in advance for any responses :)
olig1905
 
Posts: 2
Joined: Thu Jul 04, 2013 4:56 pm

Re: Beaglebone Black SD boot problem

Postby vaizki » Tue Jul 09, 2013 11:41 am

I'm having this same problem with one of my BBB's, the first one I "arched" worked perfectly.

From what I see, you are booting from the SD card. I think that the command "i2c mw 0x24 1 0x3e" in uEnv.txt is instructing the board to allow more power to be drawn through the USB so you should be fine with the USB power.

I will start from scratch again with this BBB and see if it works this time 'round..
vaizki
 
Posts: 7
Joined: Tue Jul 02, 2013 9:38 pm

Re: Beaglebone Black SD boot problem

Postby vaizki » Tue Jul 09, 2013 1:00 pm

Ok so I did it from scratch VERY VERY carefully and still got the same result.

Then I tried about a gazillion different things while learning U-Boot, and finally a RESULT.

tl;dr - by adding this to uEnv.txt I got it working:

$this->bbcode_second_pass_code('', 'mmcboot=echo Booting from mmc ...; run mmcargs; bootz ${loadaddr} - ${fdtaddr}')

The U-Boot environment had the same mmcboot definition from somewhere (compile time?) except instead of bootz it was using bootm and the address was kloadaddr instead of loadaddr.

I don't know why this is needed on one BBB and not on another. it's a mystery to me. I will investigate the U-boot environment of the other BBB when I get physical access to it again. Of course it's not running the same kernel as is in the root tarball but maybe I'll figure it out.
vaizki
 
Posts: 7
Joined: Tue Jul 02, 2013 9:38 pm

Re: Beaglebone Black SD boot problem

Postby sdrider » Sat Aug 10, 2013 4:08 am

I created an account just to login and say THANK YOU.

I've been having this problem with my BBB for the last few days and all my internet searching was not turning up any answers. I finally bought an FTDI cable on the advice of another thread.. This helped immensely as it showed me exactly what was happening. Some poking around with the variables and I wondered if maybe if $kloadaddr was accurate. So I searched on the $kloadaddr of 0x80007fc0 that finally lead me to this thread (this thread, unfortunately, didn't come up in any of my prior attempts at searching for answers). Your answer of setting the mmcboot as you described finally let me boot ArchLinux ARM on my BBB sdcard again.

You mention how it was strange it worked on one and not another.. even stranger for me, I only own one BBB device. Originally I installed ArchLinux on an 8g SD card about 2 months back. Following the procedure on the archlinuxarm.org wiki at the time, it worked perfect then and I had no issues. Unfortunately that SD card died on me and so I repeated the procedure on a new SD card just a few days ago.

Unfortunately this time, I ran into this issue, where following the archlinuxarm.org wiki resulted in an SD card that would NOT boot on my BBB. I was getting this:

$this->bbcode_second_pass_code('', 'Booting from mmc ...
Wrong Image Format for bootm command
ERROR: can't get kernel image!')

message when booting. Finally found and followed your advice and added your mmcboot line to my uEnv.txt - booted right up!

Thanks again for following up this thread with the answer after you figured it out.
sdrider
 
Posts: 29
Joined: Sat Aug 10, 2013 3:56 am

Re: Beaglebone Black SD boot problem

Postby vaizki » Wed Aug 14, 2013 7:31 pm

I haven't had time to really chase this one and it might have been fixed in the newest August 10 bootloader tarballs since I just went and fetched the newest tarball and ran strings on it:

$this->bbcode_second_pass_code('', '# strings u-boot.img | grep mmcboot=
mmcboot=echo Booting from mmc ...; run mmcargs; bootz ${loadaddr} - ${fdtaddr}
')

Can you check the output of that command on your system with an older bootloader tarball? Does it have bootm there?
vaizki
 
Posts: 7
Joined: Tue Jul 02, 2013 9:38 pm

Re: Beaglebone Black SD boot problem

Postby leoneu » Thu Aug 15, 2013 3:24 am

Hi. I ran into the same issue using the latest bootloader tarball (Aug 14) The files in the bootloader tarball are dated Aug 9.

see here: http://os.archlinuxarm.org/os/omap/

I had to add the mmcboot line to uEnv.txt to get it to boot.

thank you so much for sharing the fix!
leoneu
 
Posts: 4
Joined: Thu Aug 15, 2013 3:05 am


Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 47 guests