Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ev3dev as firmware for the EV3 - aka ev3devLite #416
@botbench (product manager of ROBOTC) has expressed interest in using ev3dev as the OS for ROBOTC, but only if it can be installed as firmware rather that being installed on a microSD card. The primary concern is that microSD cards in a classroom full of kids is asking for problems. If you have ever tried teaching robotics to children, you won't have any trouble imaging the things they will do. And, now that OpenRoberta seems to be moving to ev3dev as well, I think this could be a benefit to that project as well.
To make this work, we basically need a kernel configuration and root file system that are trimmed down to fit in the 16MB flash and still leave room for some user programs. I think we can still use brickstrap and debian packages to make the root file system, although we probably want to take a hint from the now defunct emdebian repositories and strip out all of the docs.
Here are the tasks I have identified that are needed to make this happen:
I just came across this: http://buildroot.uclibc.org/
I think it may be the way to go. We just have to hook it up so that it uses our kernel and uboot from LEGO. That should be enough to get a bootable system, then we can add custom ev3dev packages as needed, like brickstrap/ev3devKit/GRX.
referenced this issue
Jan 28, 2016
added a commit
Feb 18, 2016
Look ma, no SD card! Here is an ev3dev image that you can install in the flash memory of your EV3. Unzip the file and use the official LEGO MINDSTORMS EV3 software to load it.
There are some serious issues with this, like no brickman, I2C sensors cause a lock up, sound doesn't work, no bluetooth, UART on ports 3,4 doesn't work and so on. But if you know what you are doing, you can get EV3 sensors and motors to work. Default root password is
To re-flash the EV3 after installing this image, hold down the back, enter and right buttons on the EV3 until it turns off, then release the enter button first, then the other buttons.
Anyone interested in pursuing this further?
Most of the issues are actually only serious from the point of view of usability but not from the point of view of fixing them. It is mostly that there are not buildroot packages for custom EV3 stuff. We need the firmware files for Bluetooth and soft UARTs, and some init scripts and udev rules. This will fix most things. Then we need to package grx, ev3devKit and brickman. These could be a bit tricky since they actually have to be compiled and the latter two are written vala (although I have recently fixed those to make cross compiling easier).
The only really serious issue is the I2C lockup. PCM playback also locks up, so this tells me that it has to do with using FIQ. However I would actually rather pursue using the PRU instead of FIQ rather than trying to figure out what is wrong with FIQ (see #506).
That’s great news! Thanks so much!
We don’t have a UI, as we use the LEGO’s VM to do that, but that would be the least of our issues. If we have working I2C, sound and all that fun stuff, that wouldn’t be all that important. We could make something pretty quickly, I’m sure. We could modify the one for the NXT, as it’s baked into the ROBOTC NXT VM. All of the VMs in ROBOTC use a generic interface to the underlying video buffer hardware.
I’ll try to take a look this weekend, but I am on super slow internet right now, so downloading stuff is painful. I’ll be back in the Netherlands next Saturday or Sunday, though, where I have a 55Mbit/5Mbit VDSL2 line.
Quick update: I sent some patches to builtroot recently. You can now use the official buildroot software to build a firmware image (and sd card image) that will actually boot on the EV3. Using buildroot >= 2016.11-rc1...
It will take 30 minutes to several hours to build depending on how fast your machine is. This will produce a firmware file