hacker emblem
jaegerfesting
Search | Tags | Photos | Flights | Gas Mileage | Log in

Introducing Portico

Started: 2008-04-12 11:45:24

Submitted: 2008-04-12 12:36:06

Visibility: World-readable

On Monday morning, I ordered a shiny new Dell Latitude D830. Once I finished customizing it, the site told me they'd ship it by next Tuesday, with an estimated arrival time of next Thursday. I checked my order status sporadically through the week; by Thursday, I was surprised and pleased to see that my computer had shipped the previous day and was expected to arrive at my house on the following day. It turned out that Kiesa worked from home on Friday (she woke up early in the morning with a brilliant solution for one of her pressing problems and decided to work on it on the spot), so she was able to sign for the package when it arrived. (Otherwise, I likely would have had to wait until Monday to get my computer.)

I arrived home to find a surprisingly-large box with a Dell label waiting for me. Inside, I found a power adaptor, a few CDs of software already installed on the system (including real Windows XP Home re-installation media), and my new computer, cradled inside two interlocking blocks of polystyrene foam. I carefully cut the tape holding the blocks together, pulled the blocks apart, and delivered my new notebook into the world.

I booted the machine, went through the generic Windows set up, and had to choose what to name my machine. Earlier in the week, it occurred to me that I don't have any hardware named from Neil Gaiman's books. (Or, really, any fiction I read, with the sole exception of my server, Honor.) The only problem is that Gaiman's urban fantasy tends to involve otherwise-normal people (with basically normal names) brought into fantastic parallel worlds they didn't previously know existed. I'm currently listening to the Author's Preferred Text version of Neverwhere; the name "Door" didn't speak to me, but Lord Portico, of the House of the Arch, did. My new computer is now named Portico, after the famous London Below crusader who sought to bring the people together and end the factionalism that was tearing their society apart.

I abandoned Windows as soon as I downloaded and installed Seamonkey. Dell was kind enough to offer the option of partitioning my hard drive for me; I opted for a 40 gig primary partition for Windows and the remaining space in a secondary partition. I carved the remaining space into two ten-gig primary partitions (one for 64-bit Linux, one for 32-bit Linux), a swap partition, and a big LVM volume. (I confess I'm a bit dubious about carving up the partitions like this, since I often end up screwing up the partition sizes based on needs I hadn't previously considered, but this still seems like the best option available at the moment.) I installed 64-bit Ubuntu 7.10; I was enchanted by the novelty of running a 64-bit operating system, and I had seen some text indicating that Debian didn't see the need to provide both 32-bit and 64-bit libraries on its x86_64 builds. (Why would one need to run 32-bit binary software when binary software is inherently evil anyway? As it happens, I live in a world that is slightly more pragmatic than the Debian world.)

To expose the fact that I'm really running my Intel Core 2 Duo (T7250 at 2.0 GHz) in 64-bit mode, I wrote a tiny C file to check what common variable sizes were:

#include <stdio.h>
#include <stdint.h>

int main(int argc, char ** argv) {
printf("sizeof(char) = %d\n", sizeof(char));
printf("sizeof(int) = %d\n", sizeof(int));
printf("sizeof(long) = %d\n", sizeof(long));
printf("sizeof(long long) = %d\n", sizeof(long long));
printf("sizeof(void *) = %d\n", sizeof(void *));
printf("sizeof(intptr_t) = %d\n", sizeof(intptr_t));
printf("argv = %p\n", argv);
return 0;
}

Built in 64-bit mode, I 64-bit longs and pointers:

sizeof(char) = 1
sizeof(int) = 4
sizeof(long) = 8
sizeof(long long) = 8
sizeof(void *) = 8
sizeof(intptr_t) = 8
argv = 0x7fff25c2a328

(I'm also fascinated that the argv pointer only has the lower 48 bits set, though that's enough to directly address 256 terrabytes. /proc/cpuinfo does tell me that my processor's address sizes are "36 bits physical, 48 bits virtual". I only have two gigabytes of physical memory anyway.)

Built in 32-bit mode (with -m32), I get just what I would expect on any 32-bit x86 machine:

sizeof(char) = 1
sizeof(int) = 4
sizeof(long) = 4
sizeof(long long) = 8
sizeof(void *) = 4
sizeof(intptr_t) = 4
argv = 0xffc6c474

So far, I haven't had much trouble running the 64-bit operating system, even with 32-bit application. I did have to install gcc-multilib to build the 32-bit version of my test application above, and ia32-libs to get the 32-bit binary version of Google Earth to install and run. Neither of these were well-documented, but they weren't all that hard to figure out.

My next mission will be to encode the Worst Sci-Fi Quadrilogy in a format suitable for playing on the exciting new set-top box I'm building in my day job.