Monthly Archives: July 2010

qemu-user: Turning your dual-core 2.6GHz processor into a dual-core 500MHz processor

I just discovered qemu-user, thanks to lu_zero on #gentoo-embedded. It’s brilliant. They took QEMU’s ability to simulate an entire processor, tossed out the other hardware emulation, and packaged it up. qemu-user’s primary use is for running foreign binaries.

So far, I’ve been running all my stage generation for Neuvoo on the BeagleBoard, which has a 500MHz armv7a processor. Everything compiles very slowly, but at least it’s native and stable.

There’s a couple problems with that setup. First, everything is running off an SDHC card. We’re talking slow. Second, the beagle has 128M of RAM, and after that it’s using the swapfile. Which is on the SDHC card. Now we’re really talking slow.

qemu-user deftly solves these problems. Of course, running stage generation on my hefty 2.6GHz Core2 Duo processor is going to slightly speed up compiling, just because of the dual cores. But not only that: now I have a huge, fast 7200rpm hard-drive to run everything off of, and 4G of RAM (2 of which is almost always cache) to run it all within.

Think of it like this: qemu-user enables you to run a chroot (and possibly other things) for almost any processor on a system of your choice, as though it were running natively.

Setting up qemu-user is a piece of cake, so I won’t go into details here. Just follow these instructions. One thing I didn’t get at first was why they use “USE=static”. The reason is this: if you’re going to be running an armv7a chroot, you need something inside the chroot to be translating (qemu-user). The problem is, that something can’t link dynamically against any libraries, because they’ll all be armv7a libraries. Static linking means the binary is self-contained and portable.

Let me know if there are other cool uses for qemu-user. I’m all ears. 🙂

Course Listing Database Project

I was just told by UMass Dartmouth that they wouldn’t be releasing publicly available data in a database format just so I, a mere student, could work on a simple project for what they deemed is likely only a personal project for my own benefit, without actually asking me what the project is about.

They then proceeded to say I was more than welcome to process the HTML-ified version of the course listing, which, they reminded, is a more ambitious project. What the…!? Are they trying to make my life difficult?

Well, you know what? I’m going to process that HTML, and then I’m going to push that database to my home directory on the UMass Dartmouth servers, so everyone can use it without bothering with talking to these people.

There shouldn’t be any problem with this, given that it’s already publicly available information. I think the real problem here is they just don’t have time for silly student ideas.

Edit: HTML processing code finished. I have an SQLite database of all UMass Dartmouth classes. 🙂

Do (Computer) Geeks Really Rule the (Computer) World?

I just read about an interesting development with the latest iPhone. It all started when we found out the iPhone’s antenna is bad. Now we’re finding out AppleCare has informed customers it won’t be fixed (really), Consumer Reports specifically does not recommend the iPhone 4, and Apple forum moderators are deleting threads right and left, which apparently isn’t out of the ordinary, nor will that likely change in the future. (Whew, that was a mouthful!)

If that weren’t enough, Megan McArdle reported about a growing aggravation with Apple’s policies among the geek crowd (surprise, surprise).

Now, what I have to say here is largely speculation. It’s one of those thoughts where you think about it, and it interests you, but you have no real way or need to prove it at the time, but, as time goes on, you start to notice patterns that add leverage to the idea. Continue reading

“I like bug 327809”: Let’s make revdep-rebuild obsolete

That’s a quote from solar. I also like this bug. I really like it. I think it’s one of the best bug reports I’ve ever seen.

(First, a disclaimer: I’m not a Gentoo developer, I’ve only just started any kind of serious portage work, and have had quite a few stupid ideas at this point. Take what I have to say with a healthy pinch of salt.)

First of all, here’s the bug link:

Here’s a highlight of what I think makes this bug so impressive, and my comments on it: Continue reading