ashrafhasson

ashrafhasson

Flash firmware from sdcard onto beaglebone green emmc

Hello all,

I might be confusing myself and this may be a question better suited for the beagleboard community, but I figured Nerves community might have experience with flashing BBGs from a nerves project perspective.

So, I’m trying to either flash the SDCard onto the eMMC of the BBG after having burnt the firmware onto that SDCard or directly (which I think is only possible with ssh firmware updates after the eMMC is flashed with a nerves firmware) and needless to say I’m failing at that :confused:

Has anyone been trying the same or is it customary to just boot off the SDCard?

My understanding is that the bbb image is not a flasher image so I’m not sure how to use it to flash the eMMC .. I also tried to blindly dd it over to the eMMC (blkmmc1) but that seems to corrupt the eMMC :thinking:
If this requires building some customer rootfs overlay, I haven’t got a clue (yet) how that is done :frowning:

My lack of knowledge is surely apparent now and I’d appreciate any directions and hints!

Thanks in advance :slight_smile:

Most Liked

fhunleth

fhunleth

Co-author of Nerves

Hi @ashrafhasson,

We ended up choosing to not support booting off the BBB’s eMMC since the MIcroSD worked fine and it was annoyingly difficult to make an image that worked on both eMMC and MicroSD.

Here’s what you need to do:

  1. Fork nerves_system_bbb. Call it nerves_system_bbb_emmc or whatever makes sense to you.
  2. Replace references to mmcblk0 with mmcblk1 in the Nerves System. This search shows where they are.
  3. In the uboot.env, also replace the “device:partition” with partition 1. I.e., 0:11:1, 0:21:2.
  4. Build the system
  5. Use it in your Elixir project by finding the references to nerves_system_bbb and updating them

The next part is how to actually get your Nerves firmware onto the eMMC for the first time. After the first time, you can update it over USB or WiFi, etc. I’d probably go with the first choice for a while even though it’s slow and manual. You’ll want to connect to the BBB over UART since the errors in the next parts show up before networking is up (if booting gets that far):

  1. Load a circuits_quickstart firmware onto a MicroSD and boot off MicroSD. It doesn’t what you load, but these are small.
    a. Get your Nerves firmware (the .fw file under _build/.../nerves/appname.fw) and run SFTP to copy it to the BBB. Copy it to the /root partition so that it will be there in the future.
    b. On the IEx prompt on the BBB, run cmd("fwup -d /dev/mmcblk0 /root/appname.fw")
    c. Power off, remove the MicroSD, power on and hope.
  2. If you’re doing this a lot, it’s nicer when the MicroSD card does everything automatically and blinks lights when it’s done. In the past, I’ve not used Nerves for this loader. The nerves_fw_loaders repository might be able to give you ideas.
  3. If it’s more convenient to connect the BBB to your laptop via USB, have it show up as a thumbdrive and then run fwup on your laptop, there’s a command called ums in U-Boot that can do this. What you need to do is create use Buildroot to create an image (like the nerves_fw_loaders), but you can remove everything related to Linux. I think that the command is something like ums 0 mmc 1:0 at the U-Boot prompt. Once you get the right command, set that as the U-Boot boot command.

Unfortunately, I’ve only done this with a custom board that was enough different from the BBB that it won’t help you. I hope some of this helps.

Last Post!

CaptChrisD

CaptChrisD

I have revived my effort on flashing the eMMC of a Beaglebone – black in my case but should be the same as a green – and have successfully completed flashing the eMMC and just put up some “prototype” repos to show how it works.

See Unable to boot Beaglebone Black from eMMC - #2 by CaptChrisD

Where Next?

Popular in Discussions Top

AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31695 143
New
ben-pr-p
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New
Crowdhailer
I’ve been hearing much about the new formatter and it’s something I have been keen to try. I find examples buy far the most illuminating...
248 19740 150
New
pillaiindu
In django there is a cache framework backed by memcached. Rails also puts a lot of emphasis on caching, and even the idea of russian-doll...
New
lorenzo
Hey everone! I created a prototype for my app using Nodejs for the api. But the framework I chose wasnt great (in general theresnt any g...
New
PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement