matchstick-logo

Mozilla Matchstick

For those that don’t know yet, Matchstick from Mozilla is basically a really cheap, open (hardware and software), Chromecast alternative.

I have backed Matchstick on Kickstarter, and they should be shipping soon. In the meantime though, I wanted to get started with some apps and things, so, after a little poking around, I have managed to get the source and instructions for flashing FirefoxOS + Matchstick onto a pretty generic device for testing.

The device that I will be using is an M808b Android device, but any device that has the Rockchip RK30SDK (rk3066 etc) chipset in it should work just fine.

Once you have your hardware, the rest is pretty simple

First you need to grab a copy of the source code with

git clone git://github.com/flingone/B2G-FlingOne.git

Once that is done, you simply need to checkout the Matcstick branch of the B2G source code and build it for rk30sdk

cd B2G-FlingOne
BRANCH='matchstick' ./config.sh -d rk30sdk

At this point, you could opt also to build the entire B2G (FirefoxOS system) on your device, and if that is the case, simply configure without the branch qualifier!

Once config has completed, and downloaded all the needed sources, simply run your build using the script

./build.sh

Once the build has completed, you can flash the generated image files to your device with

./flash.sh

which should give you some instructions along the lines of

There are two methods to flash your device:

  The first one is for normal users. Detail steps:
   1. copy "rockdev" to windows (or map a network drive from linux to windows)
   2. double click "rockdev\AndroidTool.exe" to run the flash application
   3. press recovery key of the device and plug in the USB cable
   3a. wait for the Rockusb interface enumerates in windows
       you need install driver under "rockdev\Driver" for the 1st time
   4. click Run button in AndroidTool to flash


  The second one is for real geeks. It ONLY works for device with EMMC flash.
  You will brick you device if it's mounted with NAND flash.

  Detail steps:
   1. copy "rockdev" to windows (or map a network drive from linux to windows)
   2. double click "rockdev\AndroidTool.exe" to run the flash application
   2a. change the Loader file to RK30xxLoader(L)_V0.02_PRELIMINARY_EMMC_ONLY.bin
   3. press recovery key of the device and plug in the USB cable
   3a. wait for the Rockusb interface enumerates in windows
       you need install driver under "rockdev\Driver" for the 1st time
   4. click Run button in AndroidTool to flash

  From now on you do not need copy images around, since you can flash with
  fastboot under Linux.  To enter fastboot, reboot with argument fastboot.
  For the partition name, check rockdev/parameter.

   adb reboot fastboot
   fastboot -i 0x930 oem unlock
   fastboot -i 0x930 oem unlock_accept
   fastboot -i 0x930 flash boot     rockdev/Image/boot.img
   fastboot -i 0x930 flash kernel   rockdev/Image/kernel.img
   fastboot -i 0x930 flash misc     rockdev/Image/misc_wipe_all.img
   fastboot -i 0x930 flash recovery rockdev/Image/recovery.img
   fastboot -i 0x930 flash system   rockdev/Image/system.img

Simple and easy!

Liked this post? Follow this blog to get more.