• Coding,  mir,  Open Source,  Ubuntu

    Mir and Android FAQ

    There’s been some murmurs and uncertainty about Mir and Ubuntu Touch support, so here’s a quick FAQ. Does mir support android drivers? Yes! We put great care into our platform abstraction so that when you run on mesa desktop drivers, you use our mesa/gbm platform, but when you run mir inside of an Ubuntu Touch phone/tablet, you use the android platform to get full OpenGLES acceleration. What sort of acceleration do you provide with android drivers? Full acceleration! More specifically, this means that entire path, from client render to framebuffer post, is OpenGLES accelerated and there is no-copy of the color buffers. This gives mir clients and Unity Next the…

  • Coding,  Open Source,  Random,  Uncategorized

    The Black Triangle

    Stuart Langridge on Planet Ubuntu posted about this story a while back, and its a something that’s happened to me a lot of times over my career. The Black Triangle The tl;dr is that a complex, extremely flexible system, well built system often takes a long time to put together, and the first fruit of the labor is often something seemingly simple to do from the perspective of someone else. However, the complex underpinnings of the well designed system allow the project to grow by leaps and bounds once that first black triangle is shown on the screen! That ‘black triangle’ one of the coolest parts of being an engineer.…

  • Coding,  Hardware,  Random

    Android ARM inline assembly

    If you happen to want to write some inline assembly in Android, its just about as easy as you’d expect! See the code snippet below for a simple example of how to add two numbers in assembly on ARM. Download code with Android makefile [code lang=”c”] include "stdio.h" static inline int add(int a, int b) { int sum; __asm__ __volatile ("add %[c][/c], %[a], %[b]" : [c][/c] "=r" (sum) /* one output */ : [a] "r" (a), [b] "r" (b) /* two inputs */ : /*code does not clobber*/ ); return sum; } int main(int argc, char ** argv) { printf("sum is %in", add(4,222)); return 0; } [/code] If you run…

  • Coding,  Hardware,  Open Source

    Installing the blob on your Pandaboard for Android

    The Pandaboard by Texas Instruments is a pretty good, mostly open source little development board with one teensy problem…. the blobbbbbbbbb (illustrated by Hermes Conrad to the left…) If you’ve followed this blog post from last week, you have an image that was built from source, and is identical to the images that linaro produces. However, you still have to go and install the binary drivers provided by TI to get things like graphics acceleration working. I’ve been using a script by vishalbhoj from linaro here. Pretty much, if you read it, it just has a download location, and then conveinently installs the download to the proper partition on the…

  • Coding,  Hardware,  Open Source

    Building Linaro Android (12.04 or daily) for Pandaboard

    I recently came into possession of a TI pandaboard for ARM development. Its a pretty cool little package, but if you want to build from source, you run into all sorts of old outdated wiki’s from Linaro that have you chasing your tail trying to build the android tree from source. Here’s how you do it as of May 2012 You have to get a ARM cross-compile toolchain and an android source tree that are in sync with each other. This is the tricky part, because its not exactly well tagged on the internet which version of the toolchain will work with what version of the source tree! When I…

  • Coding,  Open Source,  Ubuntu

    Good Practices: Compiling from Source #3

    In my first post, I wrote about the configuration step in compilation. In my last post, I wrote about the compile step. This post is about the last step, installation. Rubber Hits the Road You’ve configured and compiled your project, and all the files that the project needs to run are built and ready to be used. They’re in the build directory after the compile, and need to be put in the filesystem the right way. For example, if you built a command line executable, it has to be put somewhere where the default $PATH variables can find the executable. It also has to put any libraries it needs in…

  • Coding,  Open Source,  Ubuntu,  Uncategorized

    Good Practices: Compiling from Source #2

    I went over the first part of compiling (configuring) in my earlier blog post here. Easy Make Oven Now, you’ve successfully configured your project, and you’re ready to build. Thankfully, this step is usually pretty straightforward and simple, all you do is type make and the project should build successfully. The configure step took care of all the heavy lifting for you, and is why we have that configure step! Although this step is usually pretty foolproof, there are annoyances and frustrations that can pop up. The Time, man, the Time! The first annoyance is that this step can take a long long time! I’m still surprised when coders don’t…

  • Coding,  Open Source,  Ubuntu

    Good Pracitices: Compiling from Source #1

    If you’ve ever been enthusiastic about an open source project, you’ve likely compiled a bleeding edge version of a project before. I know a many non-coders do this, and I can empathize that it is potentially confusing for people. The basic idea of a build system is to: ensure that you have all the libraries, tools, and files needed for the project (configure) be able to compile the program with one command (make) install the project onto the host system so that it usable (make install) I’m going to cover #1 today, that is, how to ensure you have what you need, and how to practically work through problems when…

  • Coding,  Open Source

    The Art of

    “We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil” –Donald Knuth   If you’ve heard of Big-O analysis, or linked lists, or sorting, or searching, or recursion, or pretty much any other thing you as a programmer would know, chances are Donald Knuth was writing about it first in his 1968 book The Art of Computer Programming. The quote above is one of my favorites, and there’s a lot of insight in it. Put another way, Knuth is reminding us that “over-optimization” from the start leads to unnecessary headaches further down the road, and can even cause projects to…