In my last post, I was talking about the idea of using an ARM machine to build my image. That sounds really slow and painful, sure, but at least it could be done without problems.

Well, I posted the blog entry on twitter, and fortunately, TheVaw, a good friend from Galicia, point me about using qemu. I knew qemu, but honestly, i never use it before.

To install qemu, on debian (or similars) you can follow this simple guide on the debian wiki. Basically, i installed:

apt-get install qemu binfmt-support qemu-user-static

With this package, you can cross compile a binary using the toolchain (apt-get install gcc-4.7-arm-linux-gnueabihf in my case), and run the arm binary in your x64 machine. It works.

So, I built the required binaries and they worked.. great! Then I continue compiling things, and dependencies, downloading repos, etc.

But after a while, I realized that this is totally insane! I have to patch some makefiles, I got errors with static libc libraries, blah blah, and I am tired of waste my time reinventing the wheel.

Looking for a better solution, i found the buildroot package. It seems to do everything that I am doing here, compile the kernel, make a minimum root filesystem, make an sdcard image, etc. I tested it, and it works!!

And even better, on the last version from git, all the projects binaries for sunxi are included!! the cubieboard is supported, and it has the tools for the boot loader. It builds the kernel 3.4 with the sunxi  modifications. And it compiles everything.

Also, I found another great candy, a custom buildroot in github. It seems based on buildroot, but with many modifications. I am reading the logs, trying to understand the differences, etc. You can read more on the linux-sunxi wiki.

Then, at this point, My idea is continue working on buildroot. As the target is to make my own board, I forked the buildroot git repo, and created my own version on github. To do so :

git init
git add
git commit -m "first commit"
git remote add origin
git push -u origin master
git remote add buildroot git://
git fetch buildroot
git merge buildroot/master
git push -u origin master

Then, you can update the buildroot repo to your local repo (it will be buildroot/master), and rebase (if you dare to do so)

This is the github repo, if you want to followmy progress  (i dont promiss any commit :)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: