OSOTek
Linux & ANDROID FAQ

Big Deals about
Linux and ANDROID

FAQ

What is Android?

Can you be more Specific?

The system comes free; why should I pay you?

Going Technical...

Is there any difference in Linux core?

But all files can be downloaded from one place, right?

What do we need to set up a development station?

What processor do you recommend?

What about using an FPGA?

How do we expand your ref system to meet our needs?

What's the parts cost for the Reference Design?


Reference Design Page

WHAT IS ANDROID?

ANDROID is an operating enviornment for a small embedded machine, piggy-backing on Linux OS.
As you know, it is developed by Google Inc, and released on GNU Open Source license. That means anyone can use it, for free. Technically.

There are two types of ANDROID developers:

  1. Those who writes applications (commonly referred to as "apps") to run on a machine that runs ANDROID.
    Applications are mostly written in DALVIK, a Google's dialect of JAVA. Part of the code can also be written in C, for faster processing, using NDK. The development kit (SDK) and sample codes can be downloaded from developer.android.com
  2. Platform Developers who port the operating system and the environment to a new hardware platform. Much fewer people work in this category, and most work for major corporations developing portable equipment (phones, pads).
    The source code and tools can be downloaded source.android.com, though customizing the system for a new hardware is not trivial.

We are of the second type, PLATFORM DEVELOPER, though we do not preclude type 1, either. As it was stated, you won't find many freelance doing the OS porting in this area. Once you've accomplish that, the type 1 becomes much easier.

CAN YOU BE MORE SPECIFIC?

Linux, as you know, is a highly popular open source operating system based on Unix. It is publicly distributed and maintained, ported to multiple CPUs. Covering application ranges from a big server to a little embedded system, it is one of the most versatile, robust, secure and efficient operating system. And the way this system is supported by multiple contributors all over the world is nothing short of amazing.

Particular version of the system we deal with here at OSO Tek is kernel 2.6.3x, the basis required for 2.x and beyond ANDROID system.

ANDROID, developed by Google is developed originally for cell phone, but because of its attractive GUI, affordability (it's free!) and versatility, it is spreading across the world quickly. Not just for phones, we see several tablet / pad systems showing up in the market place. We here at OSOTek, believes ANDROID has more market potential by porting to many more gadgets that traditionally did not have a nice Graphics oriented friendly user interface (e.g., TV remote, thermostat, sprinkler control for home use; I don't have enough fingers to count industrial applications!)

Its applications are mainly written in JAVA, supported by eclipse IDE and ANDROID development system attachment. The code is compiled into one-byte commands and interpreted by DALVIK environment. This is in contrast to Apple's iOS, where applications are written in Object Oriented C. By popular demand, NDK tool kit was added to support c-based modules for faster processing.

Particular version of ANDROID currently supported at OSOTek is 2.2, also known as Froyo. This is two versions behind 2.3 (Gingerbread) and 3.0 (Honeycomb), but difference between Froyo and two newer versions are speed-up based on graphic acceleration hardware and support of faster, multiple core processors.
Since we are currently focused on low cost platform, supporting those new versions were put off until we complete our low cost lineup first.
Even though those two versions are cliamed to be faster (when you use those extra hardware), Froyo is plenty faster compared to original 1.x version of the system.
We do not however, project the level of hardware that our current reference design utilizes (based on Freescale i.MX25 processors instead of bigger, faster i.MX5x series) is good enought to play HD video on a big screen. It should be good enough to play MP3 audio, but it is primarily meant to create a user friendly environment / tools to make a good use of today's complicated home and industrial equipment.

THE SYSTEM COMES IN FREE TO BEGIN WITH, WHY SHOUD I PAY YOU?

Ah. I knew you would ask that. Indeed, the sources and tools for the system come free. But being knowledgeable enough to ride that open-source animal to a successful end is entirely another matter.
If you have a strong development staff that is knowledgeable about specific hardware and source distribution trees, you are in luck. If you do not, you will need to hire several people to get things moving, then takes several months to get the customized system developed and ready. If you are lucky, that is.

Through our limited experience, these linux / Android build environment is a huge mine field. I know. I stepped on several. But what didn't kill us made us stronger. And we hope to share that experience with you, so you won't get injured, to get to the result quickly.

Going Technical...
IS THERE ANY DIFFERENCE IN LINUX CORE FROM "GENERIC" ONES?

Actually, no. Google hacked the Linux Kernel for ANDROID. It is documented, and re-submitted for public distribution, you just have to be careful to enable them when you building for ANDROID. The "hack" include:

  • Goldfish
    The Android emulator in SDK runs a virtual CPU Google calls Goldfish. It executes ARM926T instructions and has hooks for input and outps.
  • YAFFS2
    "Yet Another Flash File System ver 2". It provides a high performance interface between kernel and NAND flash devices.
  • Bluetooth
    Google made changes to Bluetooth communications stack, presumably for bug fix and enhancement.
  • Scheduler
    Google seems to have made some modifications to CPU process scheduler and time keeping algorithms. Don't know the motives and benefits of those. It just is.
  • IPC Binder
    "Inter Process Communications Binder". It allows processes to provide services to each other via a set of high level APIs.
  • Low Memory Killer
    Android adds a low memory killer that scans and kills one process each time it is called. I presume they did that to conserve free memory from idle processes, as small mobile devices are not memory rich (until now). Linux already have a low memory killer, but they must not liked that one.
  • Ashmem
    Anonymous SHared MEMory system" that adds interfaces so processes can share named blocks of memory. It provides a mean for the kernel to reclaim these shared memory blocks if they are not currently in use.
  • RAM Console and Log Device
    To aid in debugging, Android adds the ability to store kernel log messages to a RAM buffer. ANDROID also adds a separate logging module so tha user processes can read and write user log messages. (I just hope we never have to use this facility during the development...)
  • ANDROID Debug Bridge
    This one adds a protocol that runs over a USB link to between a target device running Android and a host system. Not sure if any actual tool make use of this.
  • Power Management
    Google added a new power management system to Linux, instead of reuse the existing one, though the latter is known to be perilous.
  • Misc
    There are a gremlin of little changes, like network management, keypad support, real-time clock, timed GPIO, etc., etc.

Most of these options are specified in the build configurtion menu. Be sure to check them.

BUT ALL FILES CAN BE DOWNLOADED FROM ONE PLACE, RIGHT?

Well, not quite. Android source and patch files can be downloaded from source.android.com, but you will need to donwload linux source from GNU, unless your board vendor already have BSP package for you. You might also download u-boot as cold boot system of choice.

You them might want to download SDK for applications developement from developer.android.com, but you need to get eclipse IDE and java envorinment from Sun Microsystems (now part of Oracle).

All in all, you'll have a few gigabytes worth of files to download from multiple places.

OK, WHAT DO WE NEED TO SET UP A DEVELOPMENT STATION?

To do ANDROID Froyo port, you'll need a Linux work station (iMac will also do, but I recommend Ubantu) with lots of memory ( >2GB, better have more) and storage ( >200GB). For Froyo development, recycling a 32-bit PC will do just fine, but for later version (Gingerbread and later) requires a 64-bit CPU.

Then you'll need a prototype of target board.

The connections to the target board consist of:

  • Power: source of the power can be a bench supply, wall wart supply, or a USB connection to the host system.
  • Serial line and JTAG: For initial bring-up, you will need a direct connection to the CPU, and a interactive console.
    In physical term, this can be accomplished by a so called "dongles" that has USB to serial / JTAG connection. We use Olimex adaptor since it is inexpensive (~$80) and Ubantu system already knows how to deal with it, but there are several different ones in the market.
  • Ethernet (OPTIONAL) if you want to facilitate boot via network TFTP, (goes much faster than if you use serial line upload or SD card) then the network connection to the same net with your host system is necessary. Obviously, your target system must have ethernet hardware and driver built-in, to utilize this approach, and sometimes it is more problem than it is worth...
SO WHAT PROCESSOR WOULD YOU RECOMMEND FOR THE TRAGET SYSTEM?

For the low cost system, Freescale i.MX25 series integrated application processor is highly recommended. You can also use TI OMAP series processors, but for the price and level of integration, I personally like Freescale. Thus our reference design.
i.MX2x series device (and so is OMAP) is based on ARM 9 CPU core, running at 400MHz with built-in code and data cache along with internal memory. Most ANDROID based smart phones use ARM processors, so this is a robust approach.
It supports external DDR2 memory and NAND flash storage. It has built-in LCD controller and touch panel interface with built-in AtoD Converters. It even comes with ethernet MAC (though you need to supply an external PHY).

And these processor come in cheap! Less than $10 a piece in single quantity. Check out the budgetary BOM for our reference design.

For high end systems, the choice expands more. But OSOTek is not yet operating in that domain. I'm not sure if we ever will. Or maybe we will.

HOW ABOUT USING AN FPGA?

We initially approached the reference design project that way. But no matter how hard we try, we could not bring the processors fast enough for a decent GUI engine using an affordable device. It was difficult to exceed 100MHz speed for most devices, while Freescale device runs at 400MHz, no problem.

So we address FPGA as a collector of custom hardware for a system, but not as the primary processor.

Customization / Expansion
WHAT MEANS DO WE HAVE TO EXPAND UPON YOUR REFERENCE SYSTEM TO MEET OUR NEEDS?

The Topaz reference design have:

  • Three I2C ports
  • Three SPI ports
  • Two CAN (Controller Area Netowrk) ports
  • Analog I/O with 5-ch Audio Mux
  • Six GPIO pins (more if we chuck some other I/O options)
  • 1-wire interface
  • SD / MMC card interface
  • Four Pulse Width Modulation output
  • Two USB ports (an OTG and a device port)
  • Five UART

We can hook up peripheral devices directly, or with minimal glue logic to attach to these ports.
Potential connectivities to outside world include:

  • 802.3 ethernet (wired)
  • 802.11a/b/g/n wireless LAN
  • Bluetooth
  • IrDA (ala TV remote...)
  • Custom wired / wireless link

As it was stated, the basic system supports backlit LCD TFT panel of up to 800 x 600 resolution, plus 4 or 5 wire touch panel, and 8x8 keypad matrix.

The Cost

Download the trial BOM here

WHAT IS THE PRODUCTION COST OF YOUR REFERENCE BOARD?

We didn't build the board ourselves, so we can only estimate what the cost is. The board retails for somewhere between $70 to $90 per unit. Please examine our budgetary BOM.

Admittedly, it was researched rather casually, using available catalog data. In an actual production environment, you can do this much better than this, and I estimate the parts BOM (less PC board and connectors) should be in low $30 to high $20 range, depending on the quantity and the vendors.

Contact Us... Did the information get you excited?
Need more detailed information?
Wish to discuss possible course of actions?
Please contact us!

e-mail: info@osotek.net
Phone: (949) 322-0492

Copy Right 2011, OSO Technology