Over a million developers have joined DZone.

Flashing a New Android Image to the RIoT Board

· IoT Zone

Access the survey results 'State of Industrial Internet Application Development' to learn about latest challenges, trends and opportunities with Industrial IoT, brought to you in partnership with GE Digital.

I understand the challenges of board vendors: they produce many boards, and typically they have an early/first firmware version on it. And when that board gets shipped to customers, that firmware typically is old and outdated :-(. Same for the RIoT board I have received: I was desperately trying some advanced features, only to realize that the firmware on the board is an older one from this year. So time to update the Android on that board.

Freescale RIoT Board

Freescale RIoT Board

Where is the latest stuff?

As the documentation, software and tools on riotboard.org and element14 are outdated, go directly to http://www.embest-tech.com/shop/star/riotboard.html and to download the more recent stuff:

  1. User Manual V2.0:https://www.dropbox.com/s/ang6nrpbm9045db/RIoTboard%20User%20Manual_V2.0.pdfas reference information.
  2. Android svn2597 image (image.rar):https://www.dropbox.com/sh/cz9gcglv5sxpa8s/AADOoqUqaiYRz3Qm255cJYjBa. This archive has the binary image files we are going to load to the board.
  3. Andriod Programming tools:https://www.dropbox.com/sh/iiu9qko36ftbs2y/u_Ljn1c2VS. This tools are needed to download the image files to the board.

The Embest site has as a very brief release note what has been changed between releases. The Update List mentions two Android releases: SVN2515 (initial version from 20-Jan-2014, this is what I have on my board as shipped) and SVN2597 which as of the time of this post the most recent one (file date 30-Apr-2014)).

:?: I have no idea why the element14/riotboard.org site has outdated and old firmare on it. Only google helped me to find the Embest site with the newer files.

Loading a new Android Firmware

So in the steps below, I show how to flash the new Android firmware binaries to the board. The User Manual describes some steps how to boot a new firmware from the SD card(s), but up to now this is very confusing information. Instead, I’m showing how to flash a new Android firmware using with a serial download. For this I download the new files with a loader over USB to the board.

  1. Create a new folder (e.g. riot_update)
  2. Extract the ‘Android tools’ files into that folder
  3. Extract the ‘Android image’ files into folder
  4. Copy riot_update\u-boot-mx6solo-RIoTboard.bin intoriot_update\tools\Mfgtools-Rel-4.1.0_130816_MX6DL_UPDATER\Profiles\MX6DL Linux Update\OS Firmware\files\android
  5. From riot_update\eMMC, copy boot.imgrecovery.img and system.img and place them into same folder as above (riot_update\tools\Mfgtools-Rel-4.1.0_130816_MX6DL_UPDATER\Profiles\MX6DL Linux Update\OS Firmware\files\android) and replace the existing files in that folder.
  6. Power off the board and set the switches from the original settings
    Jumper Original Settings

    Jumper Original Settings

    to this Serial Download Settings:

    Serial Download Switch Settings

    Serial Download Switch Settings (Source: RIoT User Manual)

    Serial Download Settings

    Serial Download Settings

  7. Plug-in the USB cable to J11 (Mini-USB port near Ethernet plug on the board).
  8. Power the board with the 5V power supply.
  9. The board should now be recognized as and drivers getting installed:
    SE Blank RIGEL Driver Installation

    SE Blank RIGEL Driver Installation

  10. The device should now be recognized as USB HID:
    USB HID

    USB HID

  11. Now start the MFG tool (tools\Mfgtools-Rel-4.1.0_130816_MX6DL_UPDATER\MfgTool2.exe), and most likely you will have an error….
  12. If you get an error 21:
    MFG Tool Error

    MFG Tool Error

    then the log file will not tell other than “ModuleID[2] LevelID[1]: Parse ucl script failed, error code: 21″. That cryptic message means that riot_update\tools\Mfgtools-Rel-4.1.0_130816_MX6DL_UPDATER\Profiles\MX6DL Linux Update\OS Firmware\ucl2.txt needs to renamed into ucl2.xml (!!!!) (thanks to this guide I have found the solution)

  13. If everything goes fine, you should get this dialog with the board recognized as HID-compliant device:
    MfgTool_MultiPanel with RIoT Board as HID Device

    MfgTool_MultiPanel with RIoT Board as HID Device

  14. Press the “Start” to begin downloading the new image.
  15. While downloading, the board enumerates as USB Mass Storage Device:
    New MSD Device

    New MSD Device

  16. Be patient while the download progresses:
    Formatting SystemPartition

    Formatting SystemPartition

  17. It takes about 2-3 minutes to complete the operation:
    Sucess

    Sucess

  18. Press ‘Stop’ and then ‘Exit’ to finish and close the dialog.
  19. Unpower the board.
  20. Restore the previous jumper settings again:
    Jumper Original Settings

    Jumper Original Settings

  21. Re-power the board with the 5V barrel and let it boot again.

With this, a new Android version should be on the board. You can verify this in the About of the board:

Updated Android to new version

Updated Android to new version

How cool is that? :-)

Summary

Always check if the firmware is the latest and greatest if something is not working or not present. Boards from large batches can have old firmware on it. Updating the firmware of a board is typically not very easy, except there is a step-by-step guide. And as in this case, it is not easy to find the latest firmware files (I hope riotboard.org improves that?), and even the provided tools and configuration files have bugs in it, like that *.txt to *.xml file name extension? It looks like Embest is the real provider of that board, and element14 is lagging behind with their files and updates. So best to always check at the source for the latest and greatest files. I wish that riotboard.org would be the first stop for anything around that board. At least I have now a new shiny Android on my board, and I hope that this post can save others a lot of time.

Happy Androiding :-)

The IoT Zone is brought to you in partnership with GE Digital.  Discover how IoT developers are using Predix to disrupt traditional industrial development models.

Topics:

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}