Creating x86_64 Voyage Linux in a 32-bit Debian

I was ask to create a x86_64 bit port (aka amd64) of Voyage Linux long time ago. There are two parts for the work. 1) x86_64 port of kernel ; and 2) amd64 port of Voyage Linux. Since I only have i386 (i.e 32-bit) port of Debian build server, I will try building the kernel on my 32 bit environment first.

After a bit of research, I found this link. What I need to do is to put amd64-linux-gcc to /usr/local/bin. When building with make-kpkg, I need to supply make-kpkg --arch amd64 and it will build voyage kernel in amd64 arch.

But for Voyage Linux in amd64 port is another story. I need to setup a full 64-bit development environment to do so. VMWare is the quickest way to achieve that. Since my development server is running Xen Dom0 for 3 DomU guests, I cannot run VMWare on it, but only on my Windows desktop. Right now, I used the slowest option: qemu. But qemu does not always work on my Debian etch server. Somehow, when installing lenny using business card ISO, qemu failed to recongnize the IDE disk. So my way in getting a permanent amd64 environment on qemu is quite indirect, but finally it works.

  1. Install lenny amd64 over VMWare
  2. Build Voyage Linux under lenny amd64 - this will get us a Voyage Linux Live CD in amd64 arch!
  3. Start Voyage Linux amd64 Live CD under qemu. It can recongize the IDE disk under qemu but not using lenny business card CD
  4. # qemu-system-x86_64 \
        --hda ./disk.img \
        --cdrom ./voyage-current-amd64.iso \
        -m 256 -boot d -net nic \
        -net tap,script=/etc/kvm/kvm-ifup -curses
  5. Install Voyage Linux amd64 Live CD to disk image under qemu.
  6. # genericpc <= this will install Voyage Linux from live cd to /dev/hda!
  7. Reboot to run Voyage Linux amd64 on disk image
  8. # qemu-system-x86_64 \
        --hda ./disk.img \
        -m 512 -boot c -net nic \
        -net tap,script=/etc/kvm/kvm-ifup -curses
With amd64 Voyage Linux run under qemu, I install all required build tools for building Voyage Linux in amd64 arch:
# apt-get install build-essential kernel-package subversion live-helper devscripts
Now you know what!? Building a Voyage Linux Live CD now takes 110 mins under qemu vs. 6 mins under VMWare!