Using the SD card as extra storage on the Black

21,626 views
Skip to first unread message

binary....@gmail.com

unread,
May 11, 2013, 7:33:43 PM5/11/13
to beagl...@googlegroups.com
All,

Can someone point me in the right direction.

I've updated the Beagle Black via the SD card, now I want to be able to use an blank SD card for extra storage. If I just format a card and put it in the slot, the four LEDs light up and that's it.

What do I need to do to use a blank card and mount it.

Many thanks,

Trefor

William Hermans

unread,
May 11, 2013, 7:41:40 PM5/11/13
to beagl...@googlegroups.com
look into the uEnv.txt parameters. presumably even if you want to boot from eMMC the uEnv.txt file has to be present on the SD card, and with the correct parameters in it. If you google beaglebone black + uEnv.txt, you should land on the same wiki page i found a week or so ago. It seemed pretty informative.



--
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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

binary....@gmail.com

unread,
May 11, 2013, 8:06:49 PM5/11/13
to beagl...@googlegroups.com
Thanks, William.

I think to be honest, I'd rather boot off of the memory card and not mess about with using the eMMC but I just haven't gotten around to looking at how to do that, yet.

Trefor

Vijay Vaidyanathan

unread,
May 12, 2013, 2:04:34 AM5/12/13
to beagl...@googlegroups.com
Trefor, what I've been able to figure out, there are few things preventing you from doing what you want right now. I could be wrong since I've just sort of muddled around as and when I've found the time. As you'll see below, I eventually got something to work, but ymmv and there may be far more elegant ways to get there. Anyway, here is why this is a bit more painful that you might expect it to be:

(1) The kernel (including the most recent one) does not currently support the insertion and ejection of sdcard. As a result, the running kernel has no way to even see that you've inserted an sdcard, so nothing really works after that. The immediate implication is that once your BBB has booted and the kernel is up and running, the sdcard is essentially useless. If you insert an sdcard and do an "fdisk -l" it wont even list your card or the "/dev/mmcblk1" device.

(2) If I am right about (1) above, then your only option is to boot from sdcard after which both the on-board eMMC and the sdcard are visible to the kernel. However, there is a second complicating subtlety. The docs may lead you to conclude (as I initially did) that if the "USER/BOOT" button is NOT pressed at power on, then it boots from the eMMC and if it IS pressed, then it boots from the sdcard. From what I can see, this is sort of true. Here's the catch: this is in fact the sequence that is used to determine where the u-boot boot loader is loaded from. However, once control is transferred to the bootloader, the boot loader *always* looks for a kernel on the sdcard if there is an sdcard inserted. This is why even if you dont press the USER/BOOT button and try and boot with a normal FAT32 formatted sdcard, it wont boot. That's because the u-boot loader that loaded from eMMC is now up and running and trying to bootstrap from the inserted sdcard. The only way to get past this hurdle (without fixing u-boot) is to put an actual image there on that sdcard.

So now you see the dilemma: if the kernel *is* up and running, it cant see the sdcard. If the kernel is *not* running, then it's up to u-boot, which *can* see the sdcard and so insists on trying to load the kernel image from the sdcard. The only way out of this situation therefore is to get a kernel image on the sdcard. In fact, ideally, we want to just put the kernel image (using dd) that's already on the eMMC onto the sdcard and all would be great. Sadly, since you can't even see the sdcard you can't use the BBB to do this.

So, what you need to do is to partition the sdcard to be something that u-boot can boot from and then either copy a regular kernel image from the net or from your beaglebone eMMC into the sdcard. It's not hard to do, and I did exactly that to get this all to work so I could use a 32G card, but it's a bit of a pain since I had to do all of this on a mac. Let me know if you need to know how to do this, but this message is already long enough :-)

- Vijay
======

Many thanks,

Trefor

Shae Erisson

unread,
May 12, 2013, 2:52:24 AM5/12/13
to beagl...@googlegroups.com

On Sunday, May 12, 2013 1:04:34 AM UTC-5, Vijay Vaidyanathan wrote:

So, what you need to do is to partition the sdcard to be something that u-boot can boot from and then either copy a regular kernel image from the net or from your beaglebone eMMC into the sdcard. It's not hard to do, and I did exactly that to get this all to work so I could use a 32G card, but it's a bit of a pain since I had to do all of this on a mac. Let me know if you need to know how to do this, but this message is already long enough :-)

I have a 32GB card and would like to use it for my root filesystem, would you happen to have a writeup of this process?

-- Shae

Vijay Vaidyanathan

unread,
May 12, 2013, 5:34:16 AM5/12/13
to beagl...@googlegroups.com


On Saturday, May 11, 2013 11:52:24 PM UTC-7, Shae Erisson wrote:
I have a 32GB card and would like to use it for my root filesystem, would you happen to have a writeup of this process?

It's not too bad if you are on a Mac or on Linux. Here is it in a nutshell (on a Mac)

1. On a mac you'll need to have wget and 7za (or something to uncompress the .xz files).
2. Grab a copy of the latest image (not the eMMC Flasher, just the latest image). I dont know why the 05.38 version isnt available yet but the 04.23 image is available here: http://downloads.angstrom-distribution.org/demo/beaglebone/

So just do something like this:

wget http://downloads.angstrom-distribution.org/demo/beaglebone/Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.04.13.img.xz

3. Uncompress it to get the image:

7za x Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.04.13.img.xz

4. Now insert your sdcard into your computer. It doesnt matter how big is, because this image is about 4G. The rest of the card will be unused. To get the image on to the sdcard, I used "dd" but you'll have to make sure the device is not automatically mounted like the mac does. To see which is the sdcard I did:

diskutil list

and it'll list all your disks. Identify the one corresponding to the sdcard. YOU DONT WANT TO GET THIS STEP WRONG since you are now going to write all over this disk and it is almost guaranteed to scramble your drive irrretrievably if you mess this up :-)

I'll use diskX to denote the disk that is your sdcard. In my case it was /dev/disk1 ... make absolutely you identify the right disk and then unmount (do NOT eject it) like this:

diskutil unmountDisk /dev/diskX

5. Now you can overwrite the sdcard with the image you just grabbed using the "raw" disk. If you used /dev/diskX in the previous step, you now use "/dev/rdiskX" ... note the "r" in "rdiskX" and once you are sure that this is the right device, do this:

dd if=Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.04.13.img of=/dev/rdiskX bs=10M

This step will likely take a while.

6. That should be about it. When it finishes, eject the disk:


diskutil eject /dev/diskX

This sdcard should be bootable. It'll have about 4G used up, but you can use fdisk+mkfs to format the unused space into extra space.

I think that was pretty much it. I did a few days ago and I'm repeating this from memory so I dont know if I missed anything. I'll try and write it up and put it on a webpage if I get a chance to do that.

In case I didnt yell loud enough, don't underestimate the importance of making sure you identify the right device in step 5 :-)

- Vijay
======


-- Shae

Vijay Vaidyanathan

unread,
May 12, 2013, 7:06:00 AM5/12/13
to beagl...@googlegroups.com
Shae ... I'm suddenly feeling very foolish. I just realized that although the BBB doesn't recognize when a card is inserted into the on-board sdcard reader, it *does* have a USB port. So here is a *very* much simpler way to do what you want. I just tried it and it worked fine.

1. Boot your BBB as normal
2. Attach a USB microsdcard reader to the USB (using the normal USB Host connector, not the micro-usb you use to hook up to the computer). These are cheap and easily available .. I see them at my local Frys for less than ten bucks from time to time.
3. Insert your microsd card into the USB reader. It should be recognized on the BBB, usually as /dev/sda
4. Make sure it is /dev/sda by doing: "fdisk -l" ... I'll assume its /dev/sda here, but you should use whatever you see on your system to make sure you arent overwriting the wrong thing :-)
5. Copy the eMMC contents over to the sdcard like so:
 dd if=/dev/mmcblk0 of=/dev/sda bs=10M
6. You're done. This will be a bootable card, and the rest of the space is unused. You can use fdisk+mkfs to get it to look like you want.
7. Unplug the sdcard from the reeader and plug it into the other end (sd reader built in to the BBB) and it should boot just fine.

I'm feeling a lot better about this now ... I wish I had thought about the sdcard reader+usb sometime ago instead of messing with all those Mac commands!

- VV
====


On Saturday, May 11, 2013 11:52:24 PM UTC-7, Shae Erisson wrote:

Gerald Coley

unread,
May 15, 2013, 8:25:22 AM5/15/13
to beagl...@googlegroups.com
For now, that is the way to go.

Gerald



On Tue, May 14, 2013 at 11:33 PM, <rich.c...@gmail.com> wrote:
I just plugged in a USB Thumb drive and it appeared and ready to format.   Looks easier than trying to deal with the microsdcard

Rich
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Britton Kerin

unread,
May 15, 2013, 2:01:25 PM5/15/13
to beagl...@googlegroups.com, shae.e...@gmail.com
Don't do it. Unless its an industrial SD card (and I don't think
there are many 32G industrial SD) it has an excellent chance of
failing and causing you a lot of pain.
Most SD cards (including a number of ones that shipped with the BBW
are amazingly
unreliable POS without wear leveling/power cycle tolerance or any of
the other sane measure you're probably expecting.

Britton

Gerald Coley

unread,
May 15, 2013, 2:04:04 PM5/15/13
to beagl...@googlegroups.com, shae.e...@gmail.com
Great description of an SD card. 

Gerald



--
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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


William Hermans

unread,
May 15, 2013, 3:31:27 PM5/15/13
to beagl...@googlegroups.com
While on this subject, what about USB flash drives ? No real reason to ask other than perhaps we may eventually want to use some sort of external storage method for data logging.

Eric Fort

unread,
May 17, 2013, 2:47:46 PM5/17/13
to beagl...@googlegroups.com

We have a work around described above and that is good.  Would not a proper solution, however, be to patch the kernel such that card insert/eject events were recognized?  what would need done to accomplish such detection?   Also might some work be done with the rom code that loads u-boot such that it simply makes it's first choice of boot media based upon the boot button and upon not finding it goes on to alternate choices, then with u-boot such that u-boot makes note of other devices but uses the device it loaded from as /boot & /  .

Eric

William Hermans

unread,
May 21, 2013, 5:42:37 PM5/21/13
to beagl...@googlegroups.com
I am not sure if this is what you're after but Im running debian from an SD card, Angstrom when booting fro mthe eMMC.

root@arm:~# ls -l /dev/mmc*
brw-rw---T 1 root floppy 179,  0 Dec 31 17:00 /dev/mmcblk0
brw-rw---T 1 root floppy 179,  1 Dec 31 17:00 /dev/mmcblk0p1
brw-rw---T 1 root floppy 179,  2 Dec 31 17:00 /dev/mmcblk0p2
brw-rw---T 1 root floppy 179,  8 Dec 31 17:00 /dev/mmcblk1
brw-rw---T 1 root floppy 179, 16 Dec 31 17:00 /dev/mmcblk1boot0
brw-rw---T 1 root floppy 179, 24 Dec 31 17:00 /dev/mmcblk1boot1
brw-rw---T 1 root floppy 179,  9 Dec 31 17:00 /dev/mmcblk1p1
brw-rw---T 1 root floppy 179, 10 Dec 31 17:00 /dev/mmcblk1p2



On Tue, May 21, 2013 at 7:44 AM, <apul...@gmail.com> wrote:
> Would not a proper solution, however, be to patch the kernel such that card insert/eject events were recognized?  what would need done to accomplish such detection?

It should be possible to use mknod to create the device files needed to mount the sdcard.

Would someone who has an accessible sdcard kindly do a "ls -l /dev/mmc*" and let us know what the major and minor device #'s are for the sdcard?

Allen Pulsifer

unread,
May 22, 2013, 9:59:34 PM5/22/13
to beagl...@googlegroups.com
Thanks. It didn't work to just mknod the device files.  Maybe the way to go is to replace the eMMC bootloader with something that will boot even when blank or non-bootable sdcard is inserted in the BBB...


You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/MKApMsH3Q7M/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

William C Bonner

unread,
Jun 26, 2013, 3:07:43 PM6/26/13
to beagl...@googlegroups.com
I spent a huge amount of time working with the original BeagleBoard a few years ago, but have not been working with it recently, and not had a BBB until this past week.

I'm trying to use a microsd card as extra storage while running on my beaglebone black. I thought I'd followed the correct directions to get the memory card formatted and configured correctly, but when I power on the BBB with the sd card inserted, all I get is solid LEDS. 

Now I've got the SDCard in a usb adapter and mounted. I can see that the built in flash is /dev/mmcblk0. I've added lines to my uEnv.txt file according to http://dev.gentoo.org/~armin76/arm/beagleboneblack/install_emmc.xml#expand in hopes of getting the device to boot but am not having any luck.  I think I'm confused as to the specific parameters, and the processor doing somethign slightly different depending on if it sees the removable card. 

What I really want is for the board to boot from its internal storage, and mount the second partition from the microsd card over /home/ so that I can use all of that space for user storage.

I copied the entire contents of /dev/mmcblk0p1 to the FAT boot partition on the memory card, and then modified the uEnv.txt file on the memory card. Should that work?

Since it didn't work, can someone tell me if I was close, and should have been able to fix it simply by using the correct options in the uEnv.txt file?

root@beaglebone:/media/BEAGLEBONE_# fdisk -l 

Disk /dev/mmcblk0: 1920 MB, 1920991232 bytes
255 heads, 63 sectors/track, 233 cylinders, total 3751936 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1   *          63      144584       72261    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          144585     3743144     1799280   83  Linux

Disk /dev/mmcblk0boot1: 1 MB, 1048576 bytes
4 heads, 16 sectors/track, 32 cylinders, total 2048 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mmcblk0boot0: 1 MB, 1048576 bytes
4 heads, 16 sectors/track, 32 cylinders, total 2048 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 31.9 GB, 31914983424 bytes
64 heads, 32 sectors/track, 30436 cylinders, total 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      144584       72261    c  W95 FAT32 (LBA)
/dev/sda2          144585    62333951    31094683+  83  Linux
root@beaglebone:/media/BEAGLEBONE_# cat /media/BEAGLEBONE_/uEnv.txt
bootpart=1:2
mmcroot=/dev/mmcblk1p2
optargs=quiet




On Sat, May 25, 2013 at 9:59 PM, <ma...@erroraccessdenied.com> wrote:
This page by Armin76 explains it quite well, and even provides a shell script to set up an sd card to be used as external storage (basically, when the SD card is inserted, it shows up as mmc0, which is what uBoot tries to boot from, so you have to give it some instructions in a uEnv.txt to tell it to boot from the internal memory instead)

http://dev.gentoo.org/~armin76/arm/beagleboneblack/install_emmc.xml#expand

William Hermans

unread,
Jun 26, 2013, 10:31:15 PM6/26/13
to beagl...@googlegroups.com
What is the contents of your current uEnv.txt file ?

William Hermans

unread,
Jun 26, 2013, 10:33:33 PM6/26/13
to beagl...@googlegroups.com
Anyhow to boot from the emmc you need a uEnv
.txt file that looks something like this.

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



William Hermans

unread,
Jun 26, 2013, 10:35:07 PM6/26/13
to beagl...@googlegroups.com
Grr, sorry for the multiposts kind of mufti tasking here. Sorry guys / Gals.


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

That needs to be in a uEnv.txt file on the SD card.

William C Bonner

unread,
Jun 27, 2013, 2:52:21 AM6/27/13
to beagl...@googlegroups.com
I didn't have the mmcdev=1 line. I'll try that in the morning when I get around to rebooting the unit. The existing contents of my uEnv.txt file were:

bootpart=1:2
mmcroot=/dev/mmcblk1p2
optargs=quiet

Daniel Escasa

unread,
Jun 27, 2013, 11:34:26 AM6/27/13
to beagl...@googlegroups.com
Sabi ni William noong Thursday, June 27, 2013 10:35:07 AM UTC+8:
Grr, sorry for the multiposts kind of mufti tasking here. Sorry guys / Gals.

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

That needs to be in a uEnv.txt file on the SD card.

Thanks. That worked, so I know my SD card and the SD slot are both working. I've been having trouble booting off any SD, and was afraid my 'bone's slot wasn't reading cards properly. Looking at other possibilities

Tommy Snyder

unread,
Jun 27, 2013, 12:37:41 PM6/27/13
to beagl...@googlegroups.com
Is that ALL we need to have on the microSD? or do we need other files on there as well?

William Hermans

unread,
Jun 27, 2013, 1:11:20 PM6/27/13
to beagl...@googlegroups.com
Depends on what you want to do. If all you want to do is boot from the emmc, and have access to the SD card( with SD card inserted at boot ), then yes, that is all you need.

William Hermans

unread,
Jun 27, 2013, 1:19:25 PM6/27/13
to beagl...@googlegroups.com
Daniel, if you want to boot off an SD card then you need different parameters. Looking at Robert C. Nelsons instructions here -> http://eewiki.net/display/linuxonarm/BeagleBone+Black You can scroll down to the uEnv.txt file instructions and see what you *may need* to boot from an SD card.

Although, you need to take care that file names, and paths are correct. uboot parameters can be fairly complex depending on what you want to do . . . and I am not exactly sure these Debian instructions directly translate from Debian to Angstrom( because of file locations, names and types )however with that said, uboot specific parameters, and environment variables I do believe should be the same. As I believe that both use the same uboot( someone correct me here if I am wrong ).
Message has been deleted

Tommy Snyder

unread,
Jun 27, 2013, 2:37:57 PM6/27/13
to beagl...@googlegroups.com
My intention is to launch Angstrom from the eMMC and have a microSD card in the slot and have the BBB read it as extra storage, not try to boot from it.

To make sure I'm understanding correctly, you need to run the mkcard.sh script on this page right? In order to format the microSD to have the correct format? Or is that wrong?

There seems to be a gap of information here. It sounds like (based on what you had said) I can take any old microSD and just put that text file in it and plug it into the BBB and the BBB will boot from eMMC with microSD card recognized as storage. I've tried several methods of trying to do this and I keep getting stuck at 3 solid LED's upon boot.

William Hermans

unread,
Jun 27, 2013, 2:48:35 PM6/27/13
to beagl...@googlegroups.com
I am having a hard time understanding what gentoo has to do with Booting Angstrom from emmc with an SDcard in the sd card slot.

William C Bonner

unread,
Jun 27, 2013, 2:49:18 PM6/27/13
to beagl...@googlegroups.com
The important thing the script does is to create and format the first partition as FAT32. I am not positive as to the size requirements of the first partition, or the head/sector/cylinders that's setup in the translation. I know that the entire drive is accessed in LBA mode.

I'm happy that I've now got my SD card in the reader and not taking up space on the USB hub. My uEnv.txt file is:
mmcdev=1
bootpart=1:2
mmcroot=/dev/mmcblk1p2
optargs=quiet

I've formatted the remainder of the drive with the command "mkfs -V -t ext4 -j -L /home /dev/sda2" but it's automounting the partition at /media/_home instead of the /home location I was hoping it would be mounted. Without manually editing /etc/fstab, is there a way to have it mounted at /home?

(Obviously the /dev/sda2 location was when the card was in the USB adapter, now it would be /dev/mmcblk0p2)

I've got a spare 2GB microSD sitting around. I'll test and see how simple it is to make the correct formatted card in a few minutes... 


On Thu, Jun 27, 2013 at 11:35 AM, Tommy Snyder <numbersi...@gmail.com> wrote:
To make sure I'm understanding correctly, you need to run the mkcard.sh script on this page right? In order to format the microSD to have the correct format?

There seems to be a gap of information here. It sounds like I can take any old microSD and just put that text file in it and plug it into the BBB and the BBB will boot. I've tried several variations and I keep getting stuck at 3 solid LED's

Tommy

Charles Steinkuehler

unread,
Jun 27, 2013, 2:51:36 PM6/27/13
to beagl...@googlegroups.com, William Hermans
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If there is *ANY* SD card present, the eMMC boot-loader will try to
boot from the SD card and not the on-board flash. There is ABSOLUTELY
ZERO SANITY CHECKING AT THIS STEP!!! ANY SD CARD DETECTED WILL BE
BOOTED FROM, REGARDLESS OF WHETHER OR NOT IT CONTAINS A FILE SYSTEM OR
ANY BOOT FILES!!!

That means if you want your black to boot with an SD card it must have
at minimum a uEnv.txt file that points the boot process back to the eMMC.

If you want to avoid a uEnv.txt file on your SD card, you'll have to
re-build and update the uboot installed on the eMMC.

On 6/27/2013 1:48 PM, William Hermans wrote:
> I am having a hard time understanding what gentoo has to do with
> Booting Angstrom from emmc with an SDcard in the sd card slot.
>
>
> On Thu, Jun 27, 2013 at 11:37 AM, Tommy Snyder
> <numbersi...@gmail.com>wrote:
>
>> My intention is to launch Angstrom from the eMMC and have a
>> microSD card in the slot and have the BBB read it as extra
>> storage, not try to boot from it.
>>
>> To make sure I'm understanding correctly, you need to run the
>> mkcard.sh script on
>> this<http://dev.gentoo.org/~armin76/arm/beagleboneblack/install_emmc.xml#expand>
>>>>>>>> http://dev.gentoo.org/~**armi**n76/arm/beagleboneblack/
>>>>>>>>
>>>>>>>>
**instal**l_emmc.xml#expand<http://dev.gentoo.org/~armin76/arm/beagleboneblack/install_emmc.xml#expand>
in
>>>>>>>> hopes of getting the device to boot but am not having
>>>>>>>> any luck. I think I'm confused as to the specific
>>>>>>>> parameters, and the processor doing somethign
>>>>>>>> slightly different depending on if it sees the
>>>>>>>> removable card.
>>>>>>>>
>>>>>>>> What I really want is for the board to boot from its
>>>>>>>> internal storage, and mount the second partition from
>>>>>>>> the microsd card over /home/ so that I can use all of
>>>>>>>> that space for user storage.
>>>>>>>>
>>>>>>>> I copied the entire contents of /dev/mmcblk0p1 to the
>>>>>>>> FAT boot partition on the memory card, and then
>>>>>>>> modified the uEnv.txt file on the memory card. Should
>>>>>>>> that work?
>>>>>>>>
>>>>>>>> Since it didn't work, can someone tell me if I was
>>>>>>>> close, and should have been able to fix it simply by
>>>>>>>> using the correct options in the uEnv.txt file?
>>>>>>>>
>>>>>>>> root@beaglebone:/media/**BEAGLEB**ONE_# fdisk -l
>>>>>>>> root@beaglebone:/media/**BEAGLEB**ONE_# cat
>>>>>>>> /media/BEAGLEBONE_/uEnv.txt bootpart=1:2
>>>>>>>> mmcroot=/dev/mmcblk1p2 optargs=quiet
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sat, May 25, 2013 at 9:59 PM,
>>>>>>>> <ma...@erroraccessdenied.com>wrote:
>>>>>>>>
>>>>>>>>> This page by Armin76 explains it quite well, and
>>>>>>>>> even provides a shell script to set up an sd card
>>>>>>>>> to be used as external storage (basically, when the
>>>>>>>>> SD card is inserted, it shows up as mmc0, which is
>>>>>>>>> what uBoot tries to boot from, so you have to give
>>>>>>>>> it some instructions in a uEnv.txt to tell it to
>>>>>>>>> boot from the internal memory instead)
>>>>>>>>>
>>>>>>>>> http://dev.gentoo.org/~**armin76**/arm/beagleboneblack/**install_**
>>>>>>>>>
>>>>>>>>>
emmc.xml#expand<http://dev.gentoo.org/~armin76/arm/beagleboneblack/install_emmc.xml#expand>
>>>>>>>>>>> beagleboard...@**googlegroups.**co**m.
>>>>>>>>>>>
>>>>>>>>>>> For more options, visit
>>>>>>>>>>> https://groups.google.com/**grou**** ps/opt_out
>>>>>>>>>>> <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
>>>>>>>>> beagleboard...@**googlegroups.**com.
>>>>>>>>>
>>>>>>>>> For more options, visit
>>>>>>>>> https://groups.google.com/**grou** ps/opt_out
>>>>>>>>> <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 beagleboard...@**googlegroups.**com.
>>>>>>>>
>>>>>>>> For more options, visit
>>>>>>>> https://groups.google.com/**grou**ps/opt_out<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
>>>> beagleboard...@**googlegroups.com. For more options, visit
>>>> https://groups.google.com/**groups/opt_out<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
>> beagleboard...@googlegroups.com. For more options, visit
>> https://groups.google.com/groups/opt_out.
>>
>>
>>
>


- --
Charles Steinkuehler
cha...@steinkuehler.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlHMibgACgkQLywbqEHdNFwBUwCeIX2FwIDDTbOMWauPePNp2zgL
yHcAoLI1NLdAdGj4AROVNFrJcWkmlNFG
=4ouz
-----END PGP SIGNATURE-----

Tommy Snyder

unread,
Jun 27, 2013, 2:57:37 PM6/27/13
to beagl...@googlegroups.com
Well, because I read the entire thread when I come across one, I read the post earlier about that tutorial. That tutorial also says to add a uEnv.txt file to the microSD. 

A uEnv.txt file with nearly the same lines you suggested, only, that tutorial has you format and partition the microSD in a certain way.

You didn't say how the sd has to be partitioned or formatted. SO I wasn't sure if you were adding to the tutorial mentioned earlier in the post or if it is simply:

You have a microSD (no special formats/partitions)
You put a uEnv.txt file with those 3 lines in it, on the microSD
You put the microSD in the BBB and boot


I'm trying to add this to the FAQ and I just wanted some clarification on what to do and not to do based on the other posts in this thread.

Robert P. J. Day

unread,
Jun 27, 2013, 3:12:07 PM6/27/13
to beagl...@googlegroups.com, William Hermans
On Thu, 27 Jun 2013, Charles Steinkuehler wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> If there is *ANY* SD card present, the eMMC boot-loader will try to
> boot from the SD card and not the on-board flash. There is
> ABSOLUTELY ZERO SANITY CHECKING AT THIS STEP!!! ANY SD CARD
> DETECTED WILL BE BOOTED FROM, REGARDLESS OF WHETHER OR NOT IT
> CONTAINS A FILE SYSTEM OR ANY BOOT FILES!!!

then i'm confused ... to upgrade, the instructions are to copy the
eMMC flasher image to an SD card, insert it and power up *while
holding down the USER/BOOT button*. but if it will boot off the SD
card by default, what's the purpose of holding down the USER/BOOT
button? am i misunderstanding something here?

rday

--

========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================

Robert Nelson

unread,
Jun 27, 2013, 3:20:34 PM6/27/13
to beagl...@googlegroups.com
On Thu, Jun 27, 2013 at 2:12 PM, Robert P. J. Day <rpj...@crashcourse.ca> wrote:
> On Thu, 27 Jun 2013, Charles Steinkuehler wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> If there is *ANY* SD card present, the eMMC boot-loader will try to
>> boot from the SD card and not the on-board flash. There is
>> ABSOLUTELY ZERO SANITY CHECKING AT THIS STEP!!! ANY SD CARD
>> DETECTED WILL BE BOOTED FROM, REGARDLESS OF WHETHER OR NOT IT
>> CONTAINS A FILE SYSTEM OR ANY BOOT FILES!!!
>
> then i'm confused ... to upgrade, the instructions are to copy the
> eMMC flasher image to an SD card, insert it and power up *while
> holding down the USER/BOOT button*. but if it will boot off the SD
> card by default, what's the purpose of holding down the USER/BOOT
> button? am i misunderstanding something here?

First lets get this out of the way:
The "eMMC" is always default, unless you hold down the button, which
changes the boot rom order...

Now to the 'bug'... The factory u-boot, only "looks" for the presents
of a microSD card, if found it 'finds' a microSD it just assumes and
starts down this path: load uEnv.txt, loads zImage, loads *.dtb: and
tries to run..

One of the first thing i did with my version, was change it to: look
for microSD, load uEnv.txt, "uevcmd set? <yes/no>", yes: boot of
microSD, no: repeat on eMMC..

http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Bootloader

However:
u-boot (in eMMC) can be patched to look at the microSD card first..
(and other combinations)

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Robert P. J. Day

unread,
Jun 27, 2013, 3:28:28 PM6/27/13
to beagl...@googlegroups.com
thank you ... confusion abated.

Charles Steinkuehler

unread,
Jun 27, 2013, 3:35:55 PM6/27/13
to beagl...@googlegroups.com, Robert P. J. Day, William Hermans
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/27/2013 2:12 PM, Robert P. J. Day wrote:
> On Thu, 27 Jun 2013, Charles Steinkuehler wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>
>> If there is *ANY* SD card present, the eMMC boot-loader will try
>> to boot from the SD card and not the on-board flash. There is
>> ABSOLUTELY ZERO SANITY CHECKING AT THIS STEP!!! ANY SD CARD
>> DETECTED WILL BE BOOTED FROM, REGARDLESS OF WHETHER OR NOT IT
>> CONTAINS A FILE SYSTEM OR ANY BOOT FILES!!!
>
> then i'm confused ... to upgrade, the instructions are to copy the
> eMMC flasher image to an SD card, insert it and power up *while
> holding down the USER/BOOT button*. but if it will boot off the SD
> card by default, what's the purpose of holding down the USER/BOOT
> button? am i misunderstanding something here?

If you don't hold down the boot button, you will be booting off the
eMMC first. This could be a bad thing if your eMMC is corrupt,
erased, or otherwise broken. If you hold down the boot button, you
FORCE the SD card to be read before the eMMC, so your factory update
works regardless of the current state of the eMMC.

- --
Charles Steinkuehler
cha...@steinkuehler.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlHMlBsACgkQLywbqEHdNFwVrwCg9NnyK0Qivi+Yls+qqVIS6bgP
NjIAoIlppNdv29ZmWMkWhI4pVTzOialY
=ZF1g
-----END PGP SIGNATURE-----

Tommy Snyder

unread,
Jun 27, 2013, 3:47:14 PM6/27/13
to beagl...@googlegroups.com
Never mind. I got the answer to my question. Sorry for the confusion.

For anyone else not clear after reading this this is how I was able to use a uSD card in the uSD card slot as extra storage while booting Angstrom from the eMMC

Insert the uSD into a USB hub connected to the BBB using a usb adapter
Open up the Disk Utility in Applications > System Tools > Disk Utility
Unmount the uSD
Format the drive
Click add a partition and make it of type FAT, name it and size it however you want
After it has been formatted and partitioned mount the FAT 32 partition you just made
Open it in file explorer and Right Click > Create Document
Name it uEnv.txt
Add the following lines to uEnv.txt:

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


Then power down your BBB
Remove the uSD from the hub and insert it into the uSD slot on the BBB
Power on the BBB and there should be a mounted  storage device with the name you gave it

William Hermans

unread,
Jun 27, 2013, 4:03:48 PM6/27/13
to beagl...@googlegroups.com
As for the partition type, I am unsure if it matters.

But in the case of mounting the SD as /home/ worse case scenario is that you create two partitions. One FAT ( assuming uEnv.txt is required on a FAT partition and just large enough to hold the file) and one of whatever filesystem type you prefer.

As for mount, this is a Linux executable, so you can use mount however you like( within reason of course ). With that said the only way in my mind is to use /etc/fstab to avoid complexity / complications. Remember you may need to manually write a mount point in fstab, but this only needs to be done once to stay persistent. Need to temporarily remove it ? umount /mount/point. Need to change this for a longer period of time ? Comment out the mount point in fstab.

I am sure there is even a way you could have the drive mount every time you log in, and umount every time you log out via .profile but . . . yeah outside of my personal abilities.. .

William C Bonner

unread,
Jun 27, 2013, 4:03:34 PM6/27/13
to beagl...@googlegroups.com
I was just going to mention my results along the same lines. I put my SD card in a USB adapter so it showed up as /dev/sda and then ran the following commands:

fdisk /dev/sda
(Deleted all existing partitions with the "d" command, created a new primary partition with the "n" command, default initial location, +1M size, changed type to "c". Created second primary partition that used the rest of the drive. "w" to exit and save changes.)
mkfs -t vfat -F 32 -n BoneBoot /dev/sda1 
mkfs -V -t ext4 -j -L BoneData /dev/sda2
mount /dev/sda1 /mnt/card 
(create /mnt/card/uEnv.txt with the lines
mmcdev=1
bootpart=1:2
mmcroot=/dev/mmcblk1p2
optargs=quiet
And then shutdown my board, put the card in the microSD slot, and power on. The board booted from the internal mmc, and the partitions were automounted under the /media directory.)

Here's part of the df output after rebooting.
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/mmcblk0p1       992       1       991   1% /media/BoneBoot
/dev/mmcblk1p1     71133   55239     15895  78% /media/BEAGLEBONE
/dev/mmcblk0p2   1918992    2928   1816916   1% /media/BoneData




On Thu, Jun 27, 2013 at 12:47 PM, Tommy Snyder <numbersi...@gmail.com> wrote:

Bill Lewis

unread,
Jul 16, 2013, 11:21:34 AM7/16/13
to beagl...@googlegroups.com
What might this output from 'mount' indicate?

/dev/mmcblk0p1 on /media/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

My automounts have stopped working and I noticed that errors=remount-ro above.

William Hermans

unread,
Jul 16, 2013, 1:07:46 PM7/16/13
to beagl...@googlegroups.com
man mount for more details but basically the command mount with no parameters lists all mount points on a Linux system.

Normally mount with no parameters is used to check if a device is auto mounted or not Usually right after creating a new partition, and file system on a block device.



 

--

powe...@gmail.com

unread,
Jul 31, 2013, 2:29:50 PM7/31/13
to beagl...@googlegroups.com
Anyone who hasn't found this solution yet check out the circuit co. solution here.   Piece of advice.  I suggest using terminal editors such as nano to add uEnv.txt to the volume.  I was able to format the disk with an SD to USB adapter in Mac OSX and add uEnv.txt in terminal.  I tried TextEdit first but it added some formatting that is not desirable and didn't let the BBB boot. 

Gerald Coley

unread,
Jul 31, 2013, 2:34:18 PM7/31/13
to beagl...@googlegroups.com
It is now working in our latest test image. Hopefully we will have a formal release here in another week or so. We are waiting on the HDMI update.

Gerald


On Wed, Jul 31, 2013 at 1:29 PM, <powe...@gmail.com> wrote:
Anyone who hasn't found this solution yet check out the circuit co. solution here.   Piece of advice.  I suggest using terminal editors such as nano to add uEnv.txt to the volume.  I was able to format the disk with an SD to USB adapter in Mac OSX and add uEnv.txt in terminal.  I tried TextEdit first but it added some formatting that is not desirable and didn't let the BBB boot. 

--

Alexander Holler

unread,
Jul 31, 2013, 2:53:42 PM7/31/13
to beagl...@googlegroups.com
Am 31.07.2013 20:29, schrieb powe...@gmail.com:
> Anyone who hasn't found this solution yet check out the circuit co.
> solution here<http://circuitco.com/support/index.php?title=MicroSD_As_Extra_Storage>.
> Piece of advice. I suggest using terminal editors such as nano to add
> uEnv.txt to the volume. I was able to format the disk with an SD to USB
> adapter in Mac OSX and add uEnv.txt in terminal. I tried TextEdit first
> but it added some formatting that is not desirable and didn't let the BBB
> boot.
>

TI maintainers didn't want to support carriage returns in uEnv.txt. You
might search the u-boot mailing list for a patch to fix that.

Regards,

Alexander Holler

Alexander Holler

unread,
Jul 31, 2013, 3:09:31 PM7/31/13
to beagl...@googlegroups.com, Koen Kooi, Alexander Holler
Use the new option -r for env import.

Signed-off-by: Alexander Holler <hol...@ahsoftware.de>
---
include/configs/am335x_evm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index db85dd2..223b407 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -111,7 +111,7 @@
"bootenv=uEnv.txt\0" \
"loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
"importbootenv=echo Importing environment from mmc ...; " \
- "env import -t $loadaddr $filesize\0" \
+ "env import -t -r $loadaddr $filesize\0" \
"ramargs=setenv bootargs console=${console} " \
"${optargs} " \
"root=${ramroot} " \
--
1.8.1.5

Alexander Holler

unread,
Jul 31, 2013, 3:09:30 PM7/31/13
to beagl...@googlegroups.com, Koen Kooi, Alexander Holler
When this option is enabled, CRLF is treated like LF when importing environments
from text files, which means CRs ('\r') in front of LFs ('\n') are just ignored.

Drawback of enabling this option is that (maybe exported) variables which have
a trailing CR in their content will get imported without that CR.

Signed-off-by: Alexander Holler <hol...@ahsoftware.de>
---
common/cmd_nvedit.c | 17 ++++++++++++++---
common/env_common.c | 6 +++---
include/search.h | 3 ++-
lib/hashtable.c | 17 ++++++++++++++++-
4 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 2478c95..978a366 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -964,11 +964,15 @@ sep_err:

#ifdef CONFIG_CMD_IMPORTENV
/*
- * env import [-d] [-t | -b | -c] addr [size]
+ * env import [-d] [-t [-r] | -b | -c] addr [size]
* -d: delete existing environment before importing;
* otherwise overwrite / append to existion definitions
* -t: assume text format; either "size" must be given or the
* text data must be '\0' terminated
+ * -r: handle CRLF like LF, that means exported variables with
+ * a content which ends with \r won't get imported. Used
+ * to import text files created with editors which are using CRLF
+ * for line endings. Only effective in addition to -t.
* -b: assume binary format ('\0' separated, "\0\0" terminated)
* -c: assume checksum protected environment format
* addr: memory address to read from
@@ -983,6 +987,7 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
int chk = 0;
int fmt = 0;
int del = 0;
+ int crlf_is_lf = 0;
size_t size;

cmd = *argv;
@@ -1007,6 +1012,9 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
goto sep_err;
sep = '\n';
break;
+ case 'r': /* handle CRLF like LF */
+ crlf_is_lf = 1;
+ break;
case 'd':
del = 1;
break;
@@ -1022,6 +1030,9 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
if (!fmt)
printf("## Warning: defaulting to text format\n");

+ if (sep != '\n' && crlf_is_lf )
+ crlf_is_lf = 0;
+
addr = (char *)simple_strtoul(argv[0], NULL, 16);

if (argc == 2) {
@@ -1060,7 +1071,7 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
}

if (himport_r(&env_htab, addr, size, sep, del ? 0 : H_NOCLEAR,
- 0, NULL) == 0) {
+ crlf_is_lf, 0, NULL) == 0) {
error("Environment import failed: errno = %d\n", errno);
return 1;
}
@@ -1166,7 +1177,7 @@ static char env_help_text[] =
#endif
#endif
#if defined(CONFIG_CMD_IMPORTENV)
- "env import [-d] [-t | -b | -c] addr [size] - import environment\n"
+ "env import [-d] [-t [-r] | -b | -c] addr [size] - import environment\n"
#endif
"env print [-a | name ...] - print environment\n"
#if defined(CONFIG_CMD_RUN)
diff --git a/common/env_common.c b/common/env_common.c
index 906b41f..8d57dde 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -136,7 +136,7 @@ void set_default_env(const char *s)
}

if (himport_r(&env_htab, (char *)default_environment,
- sizeof(default_environment), '\0', flags,
+ sizeof(default_environment), '\0', flags, 0,
0, NULL) == 0)
error("Environment import failed: errno = %d\n", errno);

@@ -153,7 +153,7 @@ int set_default_vars(int nvars, char * const vars[])
*/
return himport_r(&env_htab, (const char *)default_environment,
sizeof(default_environment), '\0',
- H_NOCLEAR | H_INTERACTIVE, nvars, vars);
+ H_NOCLEAR | H_INTERACTIVE, 0, nvars, vars);
}

#ifndef CONFIG_SPL_BUILD
@@ -176,7 +176,7 @@ int env_import(const char *buf, int check)
}
}

- if (himport_r(&env_htab, (char *)ep->data, ENV_SIZE, '\0', 0,
+ if (himport_r(&env_htab, (char *)ep->data, ENV_SIZE, '\0', 0, 0,
0, NULL)) {
gd->flags |= GD_FLG_ENV_READY;
return 1;
diff --git a/include/search.h b/include/search.h
index d9ac8df..8603cad 100644
--- a/include/search.h
+++ b/include/search.h
@@ -115,7 +115,8 @@ extern ssize_t hexport_r(struct hsearch_data *__htab,
*/
extern int himport_r(struct hsearch_data *__htab,
const char *__env, size_t __size, const char __sep,
- int __flag, int nvars, char * const vars[]);
+ int __flag, int __crlf_is_lf, int nvars,
+ char * const vars[]);

/* Walk the whole table calling the callback on each element */
extern int hwalk_r(struct hsearch_data *__htab, int (*callback)(ENTRY *));
diff --git a/lib/hashtable.c b/lib/hashtable.c
index 4cdbc95..c679a75 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -789,7 +789,7 @@ static int drop_var_from_set(const char *name, int nvars, char * vars[])

int himport_r(struct hsearch_data *htab,
const char *env, size_t size, const char sep, int flag,
- int nvars, char * const vars[])
+ int crlf_is_lf, int nvars, char * const vars[])
{
char *data, *sp, *dp, *name, *value;
char *localvars[nvars];
@@ -854,6 +854,21 @@ int himport_r(struct hsearch_data *htab,
}
}

+ if(!size)
+ return 1; /* everything OK */
+ if(crlf_is_lf) {
+ /* Remove Carriage Returns in front of Line Feeds */
+ unsigned ignored_crs = 0;
+ for(;dp < data + size && *dp; ++dp) {
+ if(*dp == '\r' &&
+ dp < data + size - 1 && *(dp+1) == '\n')
+ ++ignored_crs;
+ else
+ *(dp-ignored_crs) = *dp;
+ }
+ size -= ignored_crs;
+ dp = data;
+ }
/* Parse environment; allow for '\0' and 'sep' as separators */
do {
ENTRY e, *rv;
--
1.8.1.5

jorda...@gmail.com

unread,
Aug 8, 2013, 11:34:22 PM8/8/13
to beagl...@googlegroups.com
I set up uEnv.txt as described above but when booting up the BBB it takes me to the angstrom tty1 interface. After rebooting with the sd card out the device only powers on, no gui no tty1. I am working from a windows machine. Can anyone help?

cstu...@gmail.com

unread,
Aug 9, 2013, 3:42:36 PM8/9/13
to beagl...@googlegroups.com
Not sure what I'm missing here, but I can't get this working.  I've tried the May 27 and June 20th images, and several different SD cards.  The boot messages indicate that it's booting from mmc, but it gets stuck uncompressing the image.  The next message I get in a boot without the card inserted is:

systemd-fsck[84]: Angstrom: clean, 50592/112672 files, 301396/449820 blocks
[    7.375623] libphy: PHY 4a101000.mdio:01 not found
[    7.380762] net eth0: phy 4a101000.mdio:01 not found on slave 1

Boot messages with card inserted:

U-Boot SPL 2013.04-dirty (Jun 19 2013 - 09:57:14)
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-dirty (Jun 19 2013 - 09:57:14)

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:   <ethaddr> 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
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
62 bytes read in 3 ms (19.5 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
gpio: pin 55 (gpio 55) value is 1
mmc_send_cmd : timeout: No status update
4270840 bytes read in 745 ms (5.5 MiB/s)
gpio: pin 56 (gpio 56) value is 1
24129 bytes read in 51 ms (461.9 KiB/s)
Booting from mmc ...
## Booting kernel from Legacy Image at 80007fc0 ...
   Image Name:   Angstrom/3.8.13/beaglebone
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4270776 Bytes = 4.1 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 80f80000
   Booting using the fdt blob at 0x80f80000
   XIP Kernel Image ... OK
OK
   Using Device Tree in place at 80f80000, end 80f88e40

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.194037] omap2_mbox_probe: platform not supported
[    0.204665] tps65217-bl tps65217-bl: no platform data provided
[    0.281214] bone-capemgr bone_capemgr.8: slot #0: No cape found
[    0.318318] bone-capemgr bone_capemgr.8: slot #1: No cape found
[    0.355427] bone-capemgr bone_capemgr.8: slot #2: No cape found
[    0.392535] bone-capemgr bone_capemgr.8: slot #3: No cape found
[    0.412534] bone-capemgr bone_capemgr.8: slot #6: BB-BONELT-HDMIN conflict P8.45 (#5:BB-BONELT-HDMI)
[    0.422155] bone-capemgr bone_capemgr.8: slot #6: Failed verification
[    0.428931] bone-capemgr bone_capemgr.8: loader: failed to load slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
[    0.451602] omap_hsmmc mmc.4: of_parse_phandle_with_args of 'reset' failed
[    0.515997] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.7
[    0.527710] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.7) status -22
[    0.535025] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single
*** stuck here***
Thoughts anyone?

cstu...@gmail.com

unread,
Aug 12, 2013, 4:21:58 PM8/12/13
to beagl...@googlegroups.com, cstu...@gmail.com
To close the loop on this, the problem was that I was copying the uEnv.txt from http://circuitco.com/support/index.php?title=MicroSD_As_Extra_Storage verbatim, and there is an error in it.

mmcroot=/dev/bbcblk1p2 ro should be mmcroot=/dev/mmcblk1p2 ro

Not sure how that got past me, but thought I'd post in case someone else ran in to it.  Perhaps someone with wiki contribution will read this and update the topic.

Juan C.

unread,
Aug 12, 2013, 4:41:26 PM8/12/13
to beagl...@googlegroups.com, cstu...@gmail.com
Thank for the catch! It'll be updated soon. 

William Hermans

unread,
Aug 12, 2013, 10:48:27 PM8/12/13
to beagl...@googlegroups.com

rjc2827

unread,
Jan 7, 2015, 3:31:22 AM1/7/15
to beagl...@googlegroups.com
When I get to your line
mount /dev/sda1 /mnt/card

I get the response
mount point /mnt/card does not exist

Bob

Graham

unread,
Jan 7, 2015, 9:51:32 AM1/7/15
to beagl...@googlegroups.com
I suspect that will only work if your card is named "card."
You might try substituting the name or ID of your card for the term 'card'.

--- Graham

==

rjc2827

unread,
Jan 7, 2015, 11:24:01 PM1/7/15
to beagl...@googlegroups.com
Earlier I said:
 When I get to your line
mount /dev/sda1 /mnt/card

I get the response
mount point /mnt/card does not exist

=-=-=-=-=-=-==-=-=-=-=--==-=-
Now I continue:

I tried using BEAGLE_BONE as the name (that's the name that my 8GB SD card came with, pre-formatted from Adafruit) but no help.  I then did a bit of digging and discovered that it was my responsibility to build (and name) a directory myself, so I created /mnt/SDcard and where the sample code referred to "card" I used my "SDcard" name, and the problem was solved.  I'm new at this and there IS a lot to learn.

Unfortunately, this success just exposed a bunch of other problems that I'm sure that I'm hitting just because of my inexperience.  Right now, my system won't boot (the lights are on but PuTTY can't see the system) WITH my SD card in at power-on.  Everything works fine if I boot from the 
on-board 4 GB eMMC without the SD card in pace.

The card looks (in Windows) to have the same files in it as it did after I used it to capture the Win32 DiskImager download that allowed a successful flash of the eMMC, including the reduced size that I am trying to fix in this process (8 GB total space dropped to a little under 100 MB total space during the DiskImager download according to Windows - properties)

There were a couple of deviations that I had from the sample code:  The sample code said 'changed type to "c"' ... there was no type c, but there was a command option "c" (that I used)  "compatible mode: 'dos' or 'nondos' (default)" so I moved to the 'dos' mode for partition 1.  For the second partition, I did NOT use the "c" command on this second partition.  I did install it as a Primary partition though as was suggested (should it have been an ext partition?

I was allowed a partition size of 2048 to 15,523,839 for partition 1 and I used 2048 as a starting sector, and +1M as recommended to get the end sector.  For partition 2, I was surprised to see my size choice start partition sectors limited to 62 - 15,523,839 with a default of 62 for a start.  Shouldn't the 1024 bites per sector have taken the first partition from 2048 start to 3072 end?  I accepted the default 62. The resulting available end sector range was then shown as 62 - 2047.  Where did the end sector choice of 15,523,839 go to?  I tried for it, but nothing higher than 2047 would work.

I'm wondering if I should reformat the SD card under windows to get it back to its 8GB size and then retry the Debian fdisk approach.
 
For now it's back to thinking and reading to figure out a rational next step.  Hmmmm.  Maybe I'll try something.

Ok the following gets me a successful boot with the card inserted, and a full load of memory on the card.  But I don't think that I quite have access to the card yet.  Here's what I did (sort of) all at once (and yes, I do know that I'm only supposed to change one thing at a time between tests.)

Partition 1 is Primary 2048 to +1M, just like before, but no more type "c" (command c) so it's NOT dos ... this lets me get a bigger Partition 2.  Partition gets a start at 4096 (default) and takes 15,523,839 as the end sector (also now the default).  I left the line "mkfs -V -t ext4 -j -L BoneData /dev/sda2" as it was although some reading I did says that the default for mkfs is ext2 rather than the ext4 in the sample.

I'm stopping at this point as there are just too many variables to play with.  If someone can point to the problems and say you did this one right and this other one wrong, then I can probably muddle my through from there.  Time to get back to my reading.  I'll sure be happy once I get some of the basics under control.
 
Bob

=-=-=-=-=-=-=-=-=-=-=--=

On Wednesday, January 7, 2015 12:31:22 AM UTC-8, rjc2827 wrote:
When I get to your line
mount /dev/sda1 /mnt/card

I get the response
mount point /mnt/card does not exist

Bob

=-=-=-=-=-=-=-=-=-=-=-

Larry Nestor

unread,
Mar 2, 2017, 4:14:47 PM3/2/17
to BeagleBoard
I am running bone-debian-8.7-lxqt-2gb-armhf-2017-02-12-2gb. I plugged my sd card in a USB adapter in linux box. I ran gparted, removed all partitions, and set up the sd card as all fat32. Shut it down and removed usb from linux box, put the sd card in BBB running debian (while it was running). Type
$lsblk, found the sd card as mmcblk0 and the first and only partiton on card mmcblk0p1. This listed the entire card. Issue the mount command
$sudo mount /dev/mmcblk0p1 /media
$cd /media
$ sudo touch test.txt
$ls
This showed test.txt is there. Not very complicated.

neas...@ncsu.edu

unread,
Jan 22, 2018, 2:47:36 PM1/22/18
to BeagleBoard
For me, running lsblk always shows mmcblk0 -- even when the SD card is not inserted; it's the eMMC.
Are you sure test.txt was actually on the SD card and not on the onboard eMMC storage?
Reply all
Reply to author
Forward
0 new messages