Re: [beagleboard] undo boot from sdcard? need to boot from emmc while an sdcard is inserted

2014-04-13 Thread John Syn

From:  dan danden...@gmail.com
Reply-To:  beagleboard@googlegroups.com
Date:  Saturday, April 12, 2014 at 7:07 PM
To:  beagleboard@googlegroups.com
Subject:  Re: [beagleboard] undo boot from sdcard? need to boot from emmc
while an sdcard is inserted

 also, I dont have this: ³setenv mmcdev 0
 
 
 On Sat, Apr 12, 2014 at 3:50 PM, dan danden...@gmail.com wrote:
 
 On Fri, Apr 11, 2014 at 11:23 AM, John Syn john3...@gmail.com wrote:
 Just remove the part that does ³setenv mmcdev 0
 
 If I do this, can I still boot from sdcard by holding the user boot button?
The boot button controls the SYS_BOOT2 pin on the processor which is
normally high (boot button not pressed) and loads u-boot from the eMMC.
Then, u-boot runs the scripts defined in it¹s environment. Use printenv to
see the env settings. If you are using minicom, for your console, press ctrl
a w to enable line wrap (or the equivalent command for putty, etc). enter
the printenv command and then scroll up to see the bootcmd which should look
something like this:

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 55; if run loaduimage; then gpio set 56;
run loadfdt;run mmcboot;fi;fi;

While this looks complicated, it really isn¹t. It starts of by turning on an
LED, runs a command findfdt which is defined as:

findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb;
fi;  if test $board_name = A335BNLT; then setenv fdtfile
am335x-boneblack.dtb; fi; if test $board_name = A33515BB; then setenv
fdtfile am335x-evm.dtb; fi; if test $board_name = A335X_SK; then setenv
fdtfile am335x-evmsk.dtb; fi

Which just sets a variable ³fdtfile² to  am335x-boneblack.dtb²

To prove this, enter these commands in u-boot:

run findfdt
echo $findfdt

Continuing with bootcmd, it test to see if the SDCard is installed (if mmc
rescan) and if it is, ³mmcdev² is set to ³0² (BTW, eMMC is mmcdev 1).

Reading further, the script then runs loadbootenv, which loads the uEnv.txt,
which it loads from SDCard if one is installed ($mmcdev = 0) or it loads
from eMMC if no SDCard is installed ($mmcdev = 1).

I¹ll leave your to read the remainder of the bootcmd script.

BTW, I believe this behavior is baked into u-boot and you have to change
u-boot source code to change this behavior. You can only modify u-boot
behavior after uEnv.txt is loaded.

Also, when you press the load button, u-boot is read from the SDCard. When
the load button isn¹t pressed, u-boot is read from the eMMC. So, to answer
your question, if you press the boot button, it will always boot from the
SDCard.

Regards,
John

 
 
 -- 
 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 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] undo boot from sdcard? need to boot from emmc while an sdcard is inserted

2014-04-12 Thread dan
On Fri, Apr 11, 2014 at 11:23 AM, John Syn john3...@gmail.com wrote:

 Just remove the part that does setenv mmcdev 0


If I do this, can I still boot from sdcard by holding the user boot button?

-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] undo boot from sdcard? need to boot from emmc while an sdcard is inserted

2014-04-12 Thread dan
also, I dont have this: setenv mmcdev 0


On Sat, Apr 12, 2014 at 3:50 PM, dan danden...@gmail.com wrote:


 On Fri, Apr 11, 2014 at 11:23 AM, John Syn john3...@gmail.com wrote:

 Just remove the part that does setenv mmcdev 0


 If I do this, can I still boot from sdcard by holding the user boot button?


-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] undo boot from sdcard? need to boot from emmc while an sdcard is inserted

2014-04-11 Thread John Syn

From:  dan danden...@gmail.com
Reply-To:  beagleboard@googlegroups.com
Date:  Thursday, April 10, 2014 at 6:27 PM
To:  beagleboard@googlegroups.com
Subject:  Re: [beagleboard] undo boot from sdcard? need to boot from emmc
while an sdcard is inserted

 no go, I mirrored your example exactly.
Why don¹t you enter the commands manually in u-boot? Do the following:

U-Boot# printenv

Scroll up and look at the ³bootcmd² line. Each command is separated by a
³;².  Use ³echo $var² to see the contents of any variable. This will help
you understand what is going wrong.

BTW, if you want to boot from eMMC, you can simply modify the uEnv.txt on
your eMMC so that it does not query the SDCard. Just remove the part that
does ³setenv mmcdev 0

Regards,
John
 
 
 On Thu, Apr 10, 2014 at 7:21 PM, Chad Baker cmbak...@gmail.com wrote:
 
  
 What does your second partition look like?
  I formatted my microSD with
  
 mkfs -t vfat -F 32 -n BoneBoot /dev/sda1
 mkfs -V -t ext4 -j -L BoneData /dev/sda2
  
  On 4/10/2014 8:05 PM, dan wrote:
  
  
  
 so I found a usb adapter.  I made a bootable primary partition, 64MB,
 formatted vfat, and made a file uEnv.txt, no go.  Still hangs at boot.
 
  
  
  
 mmcdev=1
 bootpart=1:2
 mmcroot=/dev/mmcblk1p2 ro
  
  
  
 
  
  
 On Thu, Apr 10, 2014 at 6:56 PM, dan danden...@gmail.com wrote:
  
  
 Chad, it's not working for me *but* I don't have a micro adapter so I've
 been working on mmcblk1
  
  
  
  
  
  
 
  
  
 On Thu, Apr 10, 2014 at 5:55 PM, Chad Baker cmbak...@gmail.com wrote:
  
  
  
 Assuming that you have a microSD card with the /dev/sd1 partition
 formatted as vfat,
  Copy a file with the following contents to /dev/sd1/uEnv.txt
  
 mmcdev=1
 bootpart=1:2
 mmcroot=/dev/mmcblk1p2 ro
  - and when you reboot, the microSD should not cause a hang, but appear in
 the file system.
  
  At least this works for me.
  
 
  
  
  On 4/10/2014 5:28 PM, Dan Denson wrote:
  
  
  
  
  
  
  
 I booted an image on sdcard by pressing the user/boot button.  I then
 flashed the image to the emmc, which works fine.  The system boots
 properly from emmc when there is no sdcard inserted, but if I insert an
 sdcard I can no longer boot from emmc.
 
  
  
 I have insterted an sdcard without boot flag and it wont boot, I have
 inserted one that was bootable and it boots the sdcard.
  
 
  
  
 Is there a way to disable the boot from sdcard?
  
  -- 
  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 beagleboard+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.
  
  
  
  
  
   
 -- 
  Chad Baker 669 Landis St Memphis, TN 38104-5531
  
  
  
  -- 
  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 beagleboard+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.
  
  
  
  
  
  
  
  
  
  
  
  
  -- 
  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 beagleboard+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.
  
  
  
  
 -- 
  Chad Baker 669 Landis St Memphis, TN 38104-5531
  
 -- 
 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 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
 
 
 -- 
 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 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] undo boot from sdcard? need to boot from emmc while an sdcard is inserted

2014-04-10 Thread Chad Baker
Assuming that you have a microSD card with the /dev/sd1 partition 
formatted as vfat,

Copy a file with the following contents to /dev/sd1/uEnv.txt

mmcdev=1
bootpart=1:2
mmcroot=/dev/mmcblk1p2 ro

- and when you reboot, the microSD should not cause a hang, but appear 
in the file system.


At least this works for me.


On 4/10/2014 5:28 PM, Dan Denson wrote:
I booted an image on sdcard by pressing the user/boot button.  I then 
flashed the image to the emmc, which works fine.  The system boots 
properly from emmc when there is no sdcard inserted, but if I insert 
an sdcard I can no longer boot from emmc.


I have insterted an sdcard without boot flag and it wont boot, I have 
inserted one that was bootable and it boots the sdcard.


Is there a way to disable the boot from sdcard?
--
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 beagleboard+unsubscr...@googlegroups.com 
mailto:beagleboard+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Chad Baker 669 Landis St Memphis, TN 38104-5531

--
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] undo boot from sdcard? need to boot from emmc while an sdcard is inserted

2014-04-10 Thread dan
Chad, it's not working for me *but* I don't have a micro adapter so I've
been working on mmcblk1



On Thu, Apr 10, 2014 at 5:55 PM, Chad Baker cmbak...@gmail.com wrote:

  Assuming that you have a microSD card with the /dev/sd1 partition
 formatted as vfat,
 Copy a file with the following contents to /dev/sd1/uEnv.txt

 mmcdev=1
 bootpart=1:2
 mmcroot=/dev/mmcblk1p2 ro

 - and when you reboot, the microSD should not cause a hang, but appear in
 the file system.

 At least this works for me.



 On 4/10/2014 5:28 PM, Dan Denson wrote:

 I booted an image on sdcard by pressing the user/boot button.  I then
 flashed the image to the emmc, which works fine.  The system boots properly
 from emmc when there is no sdcard inserted, but if I insert an sdcard I can
 no longer boot from emmc.

  I have insterted an sdcard without boot flag and it wont boot, I have
 inserted one that was bootable and it boots the sdcard.

  Is there a way to disable the boot from sdcard?
  --
 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 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



 --
 Chad Baker 669 Landis St Memphis, TN 38104-5531

 --
 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 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] undo boot from sdcard? need to boot from emmc while an sdcard is inserted

2014-04-10 Thread Chad Baker

What does your second partition look like?
I formatted my microSD with

mkfs -t vfat -F 32 -n BoneBoot /dev/sda1
mkfs -V -t ext4 -j -L BoneData /dev/sda2


On 4/10/2014 8:05 PM, dan wrote:
so I found a usb adapter.  I made a bootable primary partition, 64MB, 
formatted vfat, and made a file uEnv.txt, no go.  Still hangs at boot.


mmcdev=1
bootpart=1:2
mmcroot=/dev/mmcblk1p2 ro


On Thu, Apr 10, 2014 at 6:56 PM, dan danden...@gmail.com 
mailto:danden...@gmail.com wrote:


Chad, it's not working for me *but* I don't have a micro adapter
so I've been working on mmcblk1



On Thu, Apr 10, 2014 at 5:55 PM, Chad Baker cmbak...@gmail.com
mailto:cmbak...@gmail.com wrote:

Assuming that you have a microSD card with the /dev/sd1
partition formatted as vfat,
Copy a file with the following contents to /dev/sd1/uEnv.txt

 mmcdev=1
 bootpart=1:2
 mmcroot=/dev/mmcblk1p2 ro

- and when you reboot, the microSD should not cause a hang,
but appear in the file system.

At least this works for me.



On 4/10/2014 5:28 PM, Dan Denson wrote:

I booted an image on sdcard by pressing the user/boot button.
 I then flashed the image to the emmc, which works fine.  The
system boots properly from emmc when there is no sdcard
inserted, but if I insert an sdcard I can no longer boot from
emmc.

I have insterted an sdcard without boot flag and it wont
boot, I have inserted one that was bootable and it boots the
sdcard.

Is there a way to disable the boot from sdcard?
-- 
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 beagleboard+unsubscr...@googlegroups.com
mailto:beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



-- 
Chad Baker 669 Landis St Memphis, TN 38104-5531
-- 
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 beagleboard+unsubscr...@googlegroups.com
mailto:beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
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 beagleboard+unsubscr...@googlegroups.com 
mailto:beagleboard+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Chad Baker 669 Landis St Memphis, TN 38104-5531

--
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] undo boot from sdcard? need to boot from emmc while an sdcard is inserted

2014-04-10 Thread dan
no go, I mirrored your example exactly.


On Thu, Apr 10, 2014 at 7:21 PM, Chad Baker cmbak...@gmail.com wrote:

  What does your second partition look like?
 I formatted my microSD with

 mkfs -t vfat -F 32 -n BoneBoot /dev/sda1
 mkfs -V -t ext4 -j -L BoneData /dev/sda2


 On 4/10/2014 8:05 PM, dan wrote:

 so I found a usb adapter.  I made a bootable primary partition, 64MB,
 formatted vfat, and made a file uEnv.txt, no go.  Still hangs at boot.

  mmcdev=1
 bootpart=1:2
 mmcroot=/dev/mmcblk1p2 ro



 On Thu, Apr 10, 2014 at 6:56 PM, dan danden...@gmail.com wrote:

 Chad, it's not working for me *but* I don't have a micro adapter so I've
 been working on mmcblk1



 On Thu, Apr 10, 2014 at 5:55 PM, Chad Baker cmbak...@gmail.com wrote:

  Assuming that you have a microSD card with the /dev/sd1 partition
 formatted as vfat,
 Copy a file with the following contents to /dev/sd1/uEnv.txt

 mmcdev=1
 bootpart=1:2
 mmcroot=/dev/mmcblk1p2 ro

 - and when you reboot, the microSD should not cause a hang, but appear
 in the file system.

 At least this works for me.



 On 4/10/2014 5:28 PM, Dan Denson wrote:

 I booted an image on sdcard by pressing the user/boot button.  I then
 flashed the image to the emmc, which works fine.  The system boots properly
 from emmc when there is no sdcard inserted, but if I insert an sdcard I can
 no longer boot from emmc.

  I have insterted an sdcard without boot flag and it wont boot, I have
 inserted one that was bootable and it boots the sdcard.

  Is there a way to disable the boot from sdcard?
  --
 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 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



   --
 Chad Baker 669 Landis St Memphis, TN 38104-5531
   --
 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 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



  --
 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 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



 --
 Chad Baker 669 Landis St Memphis, TN 38104-5531

 --
 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 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.