Mike Levin SEO

Future-proof your technology-skills with Linux, Python, vim & git... and me!

Compiling static curses enabled QEMU on 64 Bit Linux

by Mike Levin SEO & Datamaster, 10/28/2013

dEvery morning, I should force myself to read the stuff at the top of my journal. It’s my metaphors for guiding life, and my 1-page plan. Powerful stuff.

Life’s short, so pick projects you love and get on it!

What’s most broken, where do you get the biggest bang for the buck, and what plates need spinning.

And then, the 1-page plan, whose gist is do something brilliant that helps people educate themselves on important technology and achieve their dreams, and then spark of a sort of renaissance in education, applying the principles of mastery to tech tools. Make it reward you financially (somehow) and free you to do awesome stuff with your family.

This is a good plan, and a good way to start my day, and a particularly good way to start a Monday morning. I can not assume I’m going to have the sort of freedom of time I have right now - although one of my recent recurring thoughts is that I will indeed always have the freedom of thought. No matter how things evolve on the home or professional front, I will always have freedom of thought, and be able to exist on… is it in fact a higher plane? …than the realities of life typically allow.

To further refine this idea, EVERYONE is plagued by similar issues of too-much-to-do, and not enough time to focus on things that are important and not urgent. One of my most important learnings was the quadrant of importance and urgency that Stephen R. Covey had in his very first and seminal book, the 7 Habits of Highly Effective People. There’s never enough time, but those people who somehow just deal with it, and still get stuff done from the “Important but Not Urgent” quadrant, generally improve their lives in a series of small iterating steps that collectively look like massive accomplishments when you look back, but at the time were only a series of very small and humble, but none-the-less, unlikely accomplishments.

I am privileged at this moment in my life to be able to focus on a few of those, so it is urgent that I slam them out before my calendar starts filling in again with meetings and other sorts of work. I don’t think it’s an accident that I’m being afforded a tremendous amount of latitude right now. My champions have made it so. Do not let them down!

Slam out the 64-bit static cursor compile of qemu for Linux. Eliminate a bunch more files from the install, making it perhaps smaller, and getting the 64 bit version in parity with the 32 bit version. Build the GNU toolchain on my 64 bit Mac Fusion instance of Ubuntu 13.04…

sudo apt-get install build-essential

Okay, my Mac now has a more featured location in my desktop arrangement. I was moved yet again at the office, but the arms for my dual-monitor system don’t bind them together, so I can put the Mac in the middle in an awesome 3-monitor looking system.

Okay, now install all the qemu dependencies:

sudo apt-get build-dep qemu

Okay, I have the qemu source code in dropbox. Copy the qemu-1.6.1 folder into home ~/ and cd into it.

Okay, now I do the very conservative configure. I’d love to turn off all the unnecessary qemu features at this point, with all the –disable-this_and_that options of configure, but I’m establishing sort of a baseline qemu compile across all host OSes for Levinux right now, and am not getting ambitious yet. Doing a static compile with curses enabled across all host OSes is ambitious enough. And now:

./configure –target-list=x86_64 softmmu –enable-curses


sudo make install

Okay, now cd into /usr/local/bin

Okay, put qemu-system-x86_64 into location in a fresh Levinux directory, update the launch script, delete the entire 64 bit Linux dependency directory and the LD_LIBRARY_PATH trick, and… voilà! It works! And the archive shrinks to 16MB again.

I’m tempted to just rev the version to 2.3, but it’s so easy and small an update, that I’m going to get more ambitious. Put the archive somewhere safe so you can go back to it if you screw up. But your next platform to try to tackle is Mac!