When you build kernel modules or other programs that depend upon the kernel you need to have the kernel source configured per the currently running kernel. To see what kernel your machine is running, simply run uname -a. To setup your machine to allow things to build against the kernel, you first need the source for your currently running kernel:
export KERNEL_VERSION=uname -r|cut -d '-' -f 1
sudo aptitude install linux-source-$KERNEL_VERSION
cd /usr/src/
sudo tar jxf linux-source-$KERNEL_VERSION.tar.bz2
sudo ln -s linux-source-$KERNEL_VERSION linux
ln -s /usr/src/linux /lib/modules/uname -r/build
First, in order to get things to build against the kernel you have to alter a single file to match the kernel you’re running. Run uname -r and note everything following the first three decimal-separated numbers:
$ uname -r
2.6.17-10-386
Just use a text editor (vi!) and edit /usr/src/linux/Makefile, changing the EXTRAVERSION variable to match yours from above:
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 17
EXTRAVERSION = .14-ubuntu1
EXTRAVERSION = -10-386
NAME=Crazed Snow-Weasel
Next, you need to get the .config for the running kernel and setup the kernel source:
sudo cp /boot/config-uname -r /usr/src/linux/.config
cd /usr/src/linux
make oldconfig
make prepare0
make scripts
That’s it. Now you should be able to build things, like kernel modules, against the kernel source.
My local NPR station, WAMU has been running an advertisement for IBM federal services and they mention the URL, which is spoken as “ibm.com backslash foo backslash bar,” which won’t work if you type it into your interweb browser. Really, no one uses the Windows command line for anything real, who still thinks with backslashes?
I just finish reading Sam Harris’ Letter to a Christian Nation, which is a very good book. At one point he notes that the bible stipulates Pi is exactly 3. I wondered how such a book would lay out mathematical constants, but it’s pretty straightforward:
The sea was then cast; it was made with a circular rim, and measured ten cubits across, five in height, and thirty in circumference.
Under the brim, gourds encircled it, ten to the cubit all the way around; the gourds were in two rows and were cast in one mold with the sea.
Kings 7:23-24
He also made the molten sea. It was perfectly round, ten cubits in diameter, five in depth, and thirty in circumference
II Chronicles 4:2
I must say that it’s a weak argument, because they could be simply approximations by an observer, but it’s funny nonetheless.
The debate over whether to get rid of the worth-more-as-metal-than-currency penny has gone on for a number of years as inflation has marginalized the coin’s usefulness. In the February Chicago Fed Letter a senior economist at the Federal Reserve Bank of Chicago, François R. Velde, outlined a plan to rid the country of the 1 cent penny entirely. He does not advocate debasing pennies, making them out of cheaper materials than the current mix of Copper plating around a Zinc core, which has been done previously (think steel pennies). Rather, Verde proposes changing the value of the penny from one to five cents. As the New York Times article explains, there won’t really be any financial wizardry involved; the penny you hold would immediately increase in value five fold. That’s the best rate you can get short of winning the lottery and it’s enough to make me want to gather up thousands of pennies to store under my mattress.
My only thought is, when if it’s decided that The Fed will change the value of the penny, wouldn’t there be a mad rush to acquire pennies before the switch? You’d definitely see me in line at the bank.