Nov 14

You have to love the hacker communities that come up around embedded devices. Although most of the talk around Android development has been Java, the platform is built on Linux, has an ARM chip, and thus you can compile some C!

Tom Cooksey was one of the first to get “Hello World” working in the emulator (and it is a true emulator, so if it works there, it will work on the devices):

1) Create your hello world program:

#include

int main(int argc, char** argv) {
printf(”hello world\n”);
return 0;

}

2) Compile with an arm cross-compiler toolchain. I used a toolchain I
built with gentoo’s crossdev tool, but there are lots out there.
Assuming your c file is hi.c and your cross compiler is called armv6-
vfp-linux-gnueabi-gcc, you can compile using:

armv6-vfp-linux-gnueabi-gcc hi.c -o hi -static

Note the -static. I’ve not figured out the version of libc etc or the
ABI used yet, so for now, link applications statically.

3) Copy to a running emulator:
adb push hi /system/sbin/hi

4) Run it! From the emulator console:
cd /system/sbin
./hi

5) Smile as you see “hello world” printed on the console. :-)

That being said, you are recommended to check out the TOS and think about the ease of using the nice Java APIs ;)

Nov 13

Android is fully open source, which is a challenge as it requires every last bit to be open. Device drivers can often be a pain, but it is testimony to Linux that we have so many open drivers.

A really important new donation is providing kernel support for the QualcommMSM7K:

This release means that support in the Linux kernel is now available for the on board serial, i2c, timer, NAND flash controller, MDP/MDDI framebuffer, gpio controller, and high speed USB client controller. This code also provides access to the baseband features of the chip. The announcement to the kernel developer community can be found on the ARM Linux mailing list. Like all proper Linux kernel code, these patches were released under v2 of the GNU GPL. Stay tuned for more open source related details.