ARM (DROID, Buntu, whatever) Development

Recently android devices are very cheap yet powerful enough to replace desktop/PC for every day tasks. For example, a android TV Box powered by A10 1GHz/1GB/4GB proc/mem/disk priced at only Rp 450k-600k, while dualcore procie priced at Rp 750k-850k, still much cheaper and more capable than PC/Net station…

When we have such a machine in hand, what will we do? For development, especially web development, we need only web server, server side language such as PHP, Perl, Ruby, etc, overly popular Node.js, and database engine like mysql, sqlite, mongodb, redis, etc. And since now is javascript era, server side programming not to be worried much, except if we code all in javascript both in server and client side (nodejs case).

We can set all of those environment development in android, natively. For lamp stack there are bunch of apps, I prefer domestic solution by Palapa Web Server, free of charge, or another domestic product, Bit Web Server, but we need to pay the bill. LAMP here means lighttpd, mysql, and php. Another tool for transporting files, we need ssh server, here I tried SSH Server from Ice Cold Apps. For nodejs, unfortunately no android package is available. You search nodejs, and some come up, but they’re only documentation… Alas, we need chrooted-environment here. I never try chrooted linux on android, so I can’t tell you how and what. But a quick search on Play Store, you’ll get Lil Debi, or Linux Installer, or else, just too much options, just choose one with highest star.

For development, I’d like to run full linux distro on these machine. On mine, A10 1GHz/1GB/4GB I installed linaro 12.10, and debian wheezy. Switching between two distro is easy, swap the external MicroSD and we’re done. Reboot, and we’re on another distro…

This little machine is now my backup machine for webdev projects in local git repos, synced to all machine I have/use.

So, what interesting here is we can fully build, create and package apps just as in normal linux machine, except all in ARM architecture. To make development even easier, I usually download minimal image like pengstick linaro, and complete the package I need later on. Usually I did this in TV Box machine via SSH, but recently I read a way to do the same thing in my current laptop. The key is chroot, and not to forget qemu-arm-static.

I assumed you use Ubuntu, so here are the steps:

  1. sudo apt-get install qemu-arm-static kpartx
  2. download linaro, or another distro based on ARM, e.g linaro-server.img
  3. sudo kpartx -a linaro-server.img
  4. sudo mount /dev/mapper/loop0p2 /mnt
  5. sudo mount -obind /dev /mnt/dev
  6. sudo mount -obind /dev/pts /mnt/dev/pts
  7. sudo mount -obind /proc /mnt/proc
  8. sudo mount -obind /sys /mnt/sys
  9. sudo chroot /mnt
  10. sudo apt-get uopdate, sudo apt-get install, etc., as you wish…

When you’ve done customizing your image, do sudo umount -a and sudo kpartx -d linaro-server.img
Lastly, transfer your tailored image into MicroSD, and boot from there.


RSS feed for comments on this post. TrackBack URL

Leave a Reply


Skip to toolbar