Nerves/x86

29 views
Skip to first unread message

Frank Hunleth

unread,
Mar 18, 2014, 2:25:15 PM3/18/14
to nerves-...@googlegroups.com
All,

Garth and I have been working on x86 support for Nerves. He's using
the PcEngines Alix (Geode) board and I'm using a Logic Supply AG150
(Atom N2800). I just merged our work into master and there are quite a
few changes especially in the firmware update framework. The ARM
firmware update still works the same at a high level, but many parts
of the code have been refactored to remove Uboot-specific assumptions.

It is important that the next time that you pull from the upstream
nerves-sdk that you rebuild clean. I.e., make realclean && make
<your_platform_defconfig> && make. It is also important that you
rebuild your Erlang projects clean so that the deps get updated
properly. For the latter, I don't know how to force rebar to make this
happen, so it's best to just "rm -fr deps ebin" than to take any
chances.

If you'd like to try out firmware update on the x86 board, here's what you do:

Copy the firmware update file to the target's /tmp directory. You
could write a cowboy server to get it or just do what I do and copy it
via Erlang's distribution mechanism:

$ erlcp buildroot/output/images/nerves-ag150.fw demo@nerves:/tmp

You can get erlcp from https://github.com/fhunleth/erlang_fileutils.

Then on the target board, run:

(demo@nerves)1> fwprogrammer:start_link().
(demo@nerves)2> fwprogrammer:program("/tmp/nerves-ag150.fw",
autoupdate, "/dev/sda").

It takes about 10 seconds to program on the AG150, so be patient. At
some point, I hope to provide status from the fwprogrammer, so that it
doesn't feel like the system is hung. Also, after
fwprogrammer:program/3 returns, you should reboot your board. The
fwprogrammer code does not detect when it has been called twice in a
row without a reboot.

I've started using travis-ci on a lot of Nerves components, so
hopefully the quality of the master branch will be improving, but I
cannot underscore how fresh the x86 code is at the moment, so please
let me know if you run into any trouble.

Frank

--
Frank Hunleth
Troodon Software LLC
Embedded Software Development
http://troodon-software.com/
Reply all
Reply to author
Forward
0 new messages