×

Happy to Help!

This website doesn't store cookies. Enjoy the experience, without worrying about your data!

Great, thanks!

Porting of Android OS on Toradex SoM for a Smart Electric Scooter

  • 0

Porting of Android OS on Toradex SoM for a Smart Electric Scooter

 

About the Customer:

A prominent electric vehicle startup, our customer has embarked on the journey of ‘Make in India’. This company of young entrepreneurs is designing Smart Electric Scooters, from the ground up, in India.

Headquartered in Bangalore, the automotive startup is working towards bringing the electric vehicles to the mainstream market and providing a superior commute experience.
 

Business Challenge:

The customer had been working on making connected Smart electric scooters with the help of an in-house team. The critical areas of software and hardware development involved designing of the battery management system, dashboard HMI, battery pack, vehicle suspension and more.

The proposed fully connected, smart electric scooter boasts of advanced features such as on-board navigation, remote vehicle diagnostics and Android Infotainment system. This advanced infotainment platform had been initially built on a Toradex SOM and was running on the Linux 3.14.28.

But owing to the growing popularity of Android as a dominant OS that caters to a wide array of Android Apps, the customer wanted to port Android 6.0 (Marshmallow) onto their Toradex SOM with carrier card.

Here the challenge was that the Toradex module does not inherently support Android Operating System capabilities.

Thus, our customer started looking for a reliable embedded product development specialist who could help them with seamless Android 6.0 (Marshmallow) porting and provide technical support on Toradex platform without affecting the performance of their infotainment system running Linux.
 

Embitel Solution:

Porting of Android
During the brainstorming sessions and technical workshops, customer developed trust and confidence in the embedded software and hardware expertise of our team. Also, our past experience in developing an end-to-end Infotainment and Automotive Head-up Display systems proved to be a value-added advantage for our customer.

Equipped with a technically strong and experienced team, we took up the challenge of migration to the Android 6.0 OS without affecting the performance of the infotainment system running on Linux.

The Embitel team took charge to build an Android based solution that involved:

  • Setting up the Build Environment.
  • Porting of Android 6.0 (Marshmallow) onto Toradex SOM which was running Linux 3.14.
    • Porting Bootloader
    • Porting kernel
    • Porting Android file system
    • Porting the flashing mechanism from NXP to Toradex
    • Porting the Go Application from Linux OT to Android
  • Integrating Android with the following modules
    • Ublox SARA-U270-00S GSM module with data profile
    • Ublox EVA-M8M GPS modules
    • LSM9DS1 IMU module – A, G,M
    • LVDS based display
    • I2C based touch screen
    • TI CC2564 based Bluetooth module connected over HCI UART.
  • User acceptance testing and document testing

 

Embitel Impact:

Our customer was able to make a smooth and effortless transition to Android M, which seemed quite challenging for them in the beginning.
 

Tools and Technology

  • Cross compiler tool chain for ARM
  • Freescale MFG tool
  • Android 6.0 OS
  • Android SDK
  • File Editors such as Vim , gedit

  • 0

5 Best Practices for Porting of Android OS to the Embedded Platforms

Android is undoubtedly one of the most successful Linux based operating systems in the world.

Although it gained prominence with its implementation in smart phones and later in wearables, porting of Android OS in embedded systems has also recently garnered a lot of attention.

Starting with consumer electronics like set-top boxes, smart televisions and gaming consoles, porting of Android is also very popular fo the automotive and IoT applications like Infotainment, HUD and likes.

One of the most striking advantages of porting Android OS to the embedded platforms is the compatibility of developed applications for one platform across different platforms with minimum tweaking.

As we move forward, we will discuss more such advantages and how to go about porting Android to the embedded systems.

What is Meant by Android OS Porting?

Android Porting for Embedded PlatformsOS porting in its general terms refers to the modification of the operating system to make it suitable to run on a different hardware architecture than the OS is intended for.

For instance, if a Linux OS is designed to originally run on a personal computer based on Intel X86 or X64 architecture but business-use requires it to be loaded to an embedded system, some changes in the Linux OS is mandatory.

This set of changes is called OS Porting and when the operating system to be ported is Android, the process becomes Android Porting.

Android’s Compatibility with Embedded Platforms

Android OS runs on a Linux Kernel and its development and testing have been performed on various ARM platforms. Therefore, porting Android to an ARM-based embedded system does not require many changes.

Since, Android OS also finds its implementation in Automotive industry, porting Android to I.MX6 (a widely used hardware platform in multimedia applications) is also quite prevalent these days. Such porting will also require BSP (Board Support Package) customization.

BSP is beyond the scope of the blog and will be discussed in more detail in upcoming blogs.

P.S: In a nutshell, a BSP is an interface that enables the communication between the OS kernel and the hardware assets like microcontroller etc.

Best Practices for Porting of Android to the embedded platforms

As Android stack is built on top of a Linux Kernel, Android porting starts with the porting of the kernel and then the Android Stack.

However, before the actual porting is executed, following are some of the best practices one can follow to ensure efficient and successful Android porting.

  • Always design a 2 Stage Bootloader: The first step of Android Porting is to install the bootloader. For X86 platform, one of the widely used bootloaders is GRUB. The reason for using a 2 stage bootloader is to have ample space for installing a 32-bit kernel along with error-handling codes.
  • Low memory footprint for the bootloader: Memory footprint is the amount of main memory required for running of any program. By keeping the memory footprint of the bootloader low, maximum memory is made available for the main application that is designed to solve a specific business problem/use-case.
  • Code as per Linux/Android standards to ensure bug-free drivers: This goes without saying that the driver customization you make while Android porting must conform to the Linux/Android coding standards.

    This ensures bug-free and easily maintainable drivers. One of the pointers that the developers also need to keep in mind is that the code is free from any unused or uninitialized variables.

  • Fault-handling and error recovery implementations: Handling exception is not enough if you wish to keep the Android OS up and running at all times in an embedded environment. As an Embedded System Developer, one should make sure that the OS is able to recover from the error and report the cause.
  • After-boot practices: In the final step of porting, the Android kernel merged with the reference kernel is configured and built and Android file system is setup. After the booting is executed, one of the most common mistake is to expect Android file system to offer similar functionality as Linux file system or work like it. This needs to be avoided.

Although Android was built keeping mobile phones in mind, its potential as a preferred OS for embedded system is quite evident.

Consumer electronics, automotive and IoT are some of the industries that are readily embracing Android.

It is important that the product engineering services companies and the embedded system developers must develop relevant expertise and experience to effectively partner with customers for successful Android porting projects.