On 1/2/14, 2:16 PM, "Robert Nelson" <[email protected]> wrote:

>On Thu, Jan 2, 2014 at 3:56 PM, John Syne <[email protected]> wrote:
>>
>> Hey Robert,
>>
>> Now you have confused me and I thought I understood how the boot process
>> worked.
>>
>> If the boot button isn¹t pressed, bootrom loads MLO from eMMC and this
>> loads u-boot from eMMC. I¹m unaware of bootrom loading MLO from SDCard
>>if
> > MLO is missing from eMMC. Do you have a reference for this? Also, I¹m
>> unaware of MLO loading u-boot from SDCard if u-boot is missing from
>>eMMC.
>> Do you have a reference for this?
>
>
>This why when you dd if=/dev/zero of=/(eMMC) it will always boot from
>microSD..
>
>Page 6:
>https://github.com/CircuitCo/BeagleBone-Black/blob/master/BBB_SCH.pdf
>
>uSD Boot grounds SYS_BOOT3:
>
>SYSBOOT:
>11100b : MMC1, MMC0, UART0, USB0
>11000b : SPI0, MMC0, USB0, UART0
>
>where: MMC1 = eMMC & MMC0 = microSD
>
>If the bootloader doesn't find the magic header in MLO, it moves on to
>the next boot device..
>
>it's old, but they talk about it here too:
>http://omappedia.org/wiki/Bootloader_Project#First_Stage_Boot
>
>> The only option to load from SDCard if
>> it exists is in the u-boot environment bootcmd which is here:
>>
>> bootcmd=gpio set 53; i2c mw 0x24 1 0x3e; run findfdt; mmc dev 0; if mmc
>> rescan ;then echo micro SD card found;setenv mmcdev 0;else echo No micro
>> SD card found,
>>  setting mmcdev to 1;setenv mmcdev 1;fi;setenv bootpart ${mmcdev}:2;mmc
>> dev ${mmcdev}; if mmc rescan; then gpio set 54; echo SD/MMC found on
>> device ${mmcdev};if
>>  run loadbootenv; then echo Loaded environment from ${bootenv};run
>> importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run
>> uenvcmd;fi;gpio set 5
>> 5; if run loaduimage; then gpio set 56; run loadfdt;run mmcboot;fi;fi;
>>
>> So mmcdev=0 if the SDCard is installed and mmcdev=1 if the SDCard in
>> missing, so bootpart=0:2 if the SDCard is installed and bootpart=1:2 if
>> the SDCard is missing. If the SDCard is installed, uEnv.txt is loaded
>>from
>> the SDCard, which is where all the customization takes place.
>
>Look closely, there's actually an annoying bug in that... it's only
>checking for the existence of mmcdev 0, so if you have a blank card it
>gets stuck...
>
>I have mine setup as the following..
>
>+        "mmc dev 0; if mmc rescan ; then " \
>+                "gpio set 54; " \
>+                "setenv mmcdev 0; " \
>+                "echo SD/MMC found on device ${mmcdev}; " \
>+                "if run loadbootenv; then " \
>+                        "run importbootenv; " \
>+                "fi; " \
>+                "gpio set 55; " \
>+                "echo Checking if uenvcmd is set ...;" \
>+                "if test -n $uenvcmd; then " \
>+                        "gpio set 56; " \
>+                        "echo Running uenvcmd ...; " \
>+                        "run uenvcmd;" \
>+                "fi; " \
>+                "echo; echo uenvcmd was not defined in uEnv.txt ...;
>echo trying eMMC (BeagleBone Black) ...; echo;" \
>+        "fi;" \
>+        "mmc dev 1; if mmc rescan ; then " \
>+                "gpio set 54; " \
>+                "setenv mmcdev 1; " \
>+                "echo SD/MMC found on device ${mmcdev}; " \
>+                "if run loadbootenv; then " \
>+                        "run importbootenv; " \
>+                "fi; " \
>+                "gpio set 55; " \
>+                "echo Checking if uenvcmd is set ...;" \
>+                "if test -n $uenvcmd; then " \
>+                        "gpio set 56; " \
>+                        "echo Running uenvcmd ...; " \
>+                        "run uenvcmd;" \
>+                "fi; " \
>+                "echo; echo uenvcmd was not defined in uEnv.txt ...;
>echo halting ...; echo;" \
>+        "fi;" \
>
>This way you can have a card in the microSD (blank/formated/etc..) and
>the only way to boot it is with "uenvcmd" set somewhere.. Of course it
>can still lockup if the eMMC's uenvcmd is also not set..
Again, Robert saves the day. Thanks for the help.

>
>Regards,
>
>-- 
>Robert Nelson
>http://www.rcn-ee.com/
>
>-- 
>For more options, visit http://beagleboard.org/discuss
>--- 
>You received this message because you are subscribed to the Google Groups
>"BeagleBoard" group.
>To unsubscribe from this group and stop receiving emails from it, send an
>email to [email protected].
>For more options, visit https://groups.google.com/groups/opt_out.


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to