My first choice was to use WINE. Unfortunately, WINE is pretty slow, annoying to use, and unreliable (the MPLAB IDE install failed for me). So I booted to Windows Vista and installed the tools there. They installed after a little fiddling with compatibility options, but booting to Vista every time I want to make a change is a pain, especially considering how slow Vista is to boot.
So my last option was to virtualize Windows (here's a tutorial if you're interested). Luckily, my laptop's CPU supports hardware virtualization extensions (it's an Intel Core 2 Duo T7200) so full virtualization should be pretty fast—around 80% of native performance. I installed the Ubuntu qemu and kvm packages. Qemu is a basic open-source emulator that can run any x86 OS. It usually runs pretty slowly, at around 10% of native. KVM is the Linux kernel module that takes advantage of the CPU's virtualization extensions to speed things up significantly.
Once those two packages were installed, I modprobe'd the kvm and kvm_intel modules and created a 3-gigabyte disk image. I installed Windows XP onto it (we have 3 or 4 copies of XP lying around, and since we either replaced those installations with Ubuntu or Vista, the copies are available for me to use). I backed up the fresh image onto an external drive and installed Office XP (same thing as above, we have a few licenses) and the MPLAB tools onto the image.
So now I have a nice virtualized session of Windows XP up that boots in around 15 seconds and is almost as fast as the real thing. Here's a screenshot of the robot code building (successfully!) under the virtual machine:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR5UJXUgCxF_u5jUHEHwKd4GwvuIjZBULEGatUhOr7CFQJBxFqsHIWxZu06hyziELoB79Tanw80kvsCxONF3XGwFYzac_9JsxldvWgKN4O5TTIf4q8DY89m3KBaz0Hl6p187rXx_m8aqk/s400/qemu-mplab.png)
1 comment:
I just bothered to read this.
Funny, I understood more than I thought I would xD.
Very nice new colors, btw. [=
Post a Comment