flash eMMC without SD card (replacing Angstrom with Debian)

1,828 views
Skip to first unread message

Lopez Gonzalez Sebastian

unread,
Oct 19, 2014, 7:40:28 PM10/19/14
to beagl...@googlegroups.com
Hi,

I'm having an issue trying to flashed my BBB eMMC thorugh doing the common sd-card process. Here's what I've been doing:
 
   - I downloaded the latest debían from here
   - I wrote the image to my sd-card (8GB size sd-card)
      unxz BBB-eMMC-flasher-debian-7.6-console-armhf-2014-08-13-2gb.img.xz
      dd if=./BBB-eMMC-flasher-debian-7.6-console-armhf-2014-08-13-2gb.img of=/dev/sdb

   - Inserted the sd-card into the board, pressed/hold S2 button, apply power.
   - Nothing happens. Only a bunch of "C" as if the sd-card was never connected.

Through uboot, I couldn't get to detect SD, nor thorugh the currently installed Angstrom distribution.

Could the sd slot module have died?

BTW: I was able to flash eMMC a few months ago, so I know it worked at least once.

Is there a way to flash eMMC without the sd-card? I mean, is it posible to download a Debian image and copy it to the eMMC with using dd command?

I found other people that does this here. They copied the image to the eMMC like this.
   
   xzcat debian-wheezy-7.0.0-armhf-minfs-3.8.12-bone17.img.xz | dd of=/dev/mmcblk1 bs=1M

Could I repeat this command from my Angstrom distribution in order to flash the eMMC?

Thanks for your help and time


Sebastian

Robert Nelson

unread,
Oct 19, 2014, 7:53:26 PM10/19/14
to Beagle Board
On Sun, Oct 19, 2014 at 6:40 PM, Lopez Gonzalez Sebastian
<slop...@gmail.com> wrote:
> Hi,
>
> I'm having an issue trying to flashed my BBB eMMC thorugh doing the common
> sd-card process. Here's what I've been doing:
>
> - I downloaded the latest debían from here
> - I wrote the image to my sd-card (8GB size sd-card)
> unxz BBB-eMMC-flasher-debian-7.6-console-armhf-2014-08-13-2gb.img.xz
> dd if=./BBB-eMMC-flasher-debian-7.6-console-armhf-2014-08-13-2gb.img
> of=/dev/sdb
>
> - Inserted the sd-card into the board, pressed/hold S2 button, apply
> power.
> - Nothing happens. Only a bunch of "C" as if the sd-card was never
> connected.
>
> Through uboot, I couldn't get to detect SD, nor thorugh the currently
> installed Angstrom distribution.
>
> Could the sd slot module have died?

Just try dd'ing the card again..

>
> BTW: I was able to flash eMMC a few months ago, so I know it worked at least
> once.
>
> Is there a way to flash eMMC without the sd-card? I mean, is it posible to
> download a Debian image and copy it to the eMMC with using dd command?
>
> I found other people that does this here. They copied the image to the eMMC
> like this.
>
> xzcat debian-wheezy-7.0.0-armhf-minfs-3.8.12-bone17.img.xz | dd
> of=/dev/mmcblk1 bs=1M
>
> Could I repeat this command from my Angstrom distribution in order to flash
> the eMMC?

Just a tiny problem with the kernel dynamically naming /dev/mmcblkXY
based on the presence of the microSD card.

The current setup is just more reliable and easier for end users to
just use their device and have easily accessible storage on the
microSD not mess up the boot..

Regards,

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

Lopez Gonzalez Sebastian

unread,
Oct 19, 2014, 9:46:50 PM10/19/14
to beagl...@googlegroups.com
Thanks for the reply Robert,

I've tried several times dd'ing the card (also tried Wind32 disk imager).

I've noticed that even uboot nor the Angstrom distro cannot detect the card when I plug it into the board. I tried "lsblk -l" with no success.

That is why I was asking, since the microSD will not be present, if I could just dd the image to the emmc directly.

What do you mean about "the current setup"?

Robert Nelson

unread,
Oct 19, 2014, 10:04:50 PM10/19/14
to Beagle Board
On Sun, Oct 19, 2014 at 6:46 PM, Lopez Gonzalez Sebastian
<slop...@gmail.com> wrote:
> Thanks for the reply Robert,
>
> I've tried several times dd'ing the card (also tried Wind32 disk imager).
>
> I've noticed that even uboot nor the Angstrom distro cannot detect the card
> when I plug it into the board. I tried "lsblk -l" with no success.

Odd, well 1000's of boards have been flashed this way since the May
2014 release was pushed out.

If dd/win32 flasher is making a card that Angstrom can't read. I'd look at:

microSD
usb-mmc adapter
OS

>
> That is why I was asking, since the microSD will not be present, if I could
> just dd the image to the emmc directly.
>
> What do you mean about "the current setup"?

The way it's currently setup.

Flash "microSD" which then auto flashes the eMMC on bootup..

Jason Kridner

unread,
Oct 20, 2014, 2:35:13 PM10/20/14
to beagl...@googlegroups.com
On Sun, Oct 19, 2014 at 7:40 PM, Lopez Gonzalez Sebastian <slop...@gmail.com> wrote:
Hi,

I'm having an issue trying to flashed my BBB eMMC thorugh doing the common sd-card process. Here's what I've been doing:
 
   - I downloaded the latest debían from here
   - I wrote the image to my sd-card (8GB size sd-card)
      unxz BBB-eMMC-flasher-debian-7.6-console-armhf-2014-08-13-2gb.img.xz
      dd if=./BBB-eMMC-flasher-debian-7.6-console-armhf-2014-08-13-2gb.img of=/dev/sdb

   - Inserted the sd-card into the board, pressed/hold S2 button, apply power.
   - Nothing happens. Only a bunch of "C" as if the sd-card was never connected.

Through uboot, I couldn't get to detect SD, nor thorugh the currently installed Angstrom distribution.

Could the sd slot module have died?

BTW: I was able to flash eMMC a few months ago, so I know it worked at least once.

Is there a way to flash eMMC without the sd-card? I mean, is it posible to download a Debian image and copy it to the eMMC with using dd command?

Doing 'dd' with the mounted image can't work if you are RUNNING off of that image. It IS, however, possible to boot over USB and run from RAM using https://github.com/ungureanuvladvictor/BBBlfs and then use that to perform flashing. 

I found other people that does this here. They copied the image to the eMMC like this.
   
   xzcat debian-wheezy-7.0.0-armhf-minfs-3.8.12-bone17.img.xz | dd of=/dev/mmcblk1 bs=1M

Could I repeat this command from my Angstrom distribution in order to flash the eMMC?

Thanks for your help and time


Sebastian

--
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/d/optout.

Lopez Gonzalez Sebastian

unread,
Oct 20, 2014, 4:51:46 PM10/20/14
to beagl...@googlegroups.com
Thanks Jason,
 
Despite Robert and your warnings, I just couldn't resist to dd the image from the Angstrom image to the eMMC. (I know youre  probably saying WHY?!?). True is that I didn't considered USB flashing until now.
 
But hey! something weird but good happened.
 
  • As Robert said, after dd'ing the image to the eMMC, there was an issue with the image trying to boot from mmcblk1p1 (the sd card boot partition), but since no SD was present, no Debian image was booted, but instead, a minimal image was booted.
  • With this virtual image I was able to mount the contents of the eMMC (mmcblk0) and see what the dd command did on it. It seems that the dd cmd was able to copy the Debian image to the eMMC.
  • I modified the uEnv.txt from the mmcblk0p1 (boot part) to use the /dev/mmcblk0p2 as root on the mmcargs definition (root=/dev/mmcblk0p2).
  • When I rebooted, this time the Debian image was booted, but not entirely. Apparently some init scripts (which the virtual image had on /scripts/init-*) kept looking for mmcblk1, causing a kernel panic.
  • after restablishing the uEnv.txt (loading a non-modified uEnv.txt through uboot), I rebooted, commented out the line in the boot/uEnv.txt where it defines the cmdline to run the init_flasher script, rebooted again, when out for lunch and when I came back I had the Debian image working.
  • What happen? I feel bad saying, I actually don't know for sure.

Now I don't know if this image is stable (I was afraid to reboot when I first got it working). I will re-flash it again through USB once I make some research on what really happen.

I'm not telling you this to demonstrate that my procedure worked, but instead I wanted to get your opinion.
 
One thing is sure, this is not the correct procedure. The USB flashing, as you pointed out, seems the right way to do it when no SD card slot is available.
 
I appreciate your comments on this
 
Thanks a lot
 
Sebastian
Reply all
Reply to author
Forward
0 new messages