I have installed compcache in my Pogoplug Pro downloading the kernel sources from:
http://www.pogoplug.com/developers-open-source.htmlUnpack and copy the default config:
$this->bbcode_second_pass_code('', '
cd /usr/src
tar -xvjf /root/pogopro-linux-2.6.31.6-r2.tar.bz2
cd /usr/src/pogopro-linux-2.6.31.6-r2
cp ./.config.old ./.config
')
Edit configuration as needed. Since I compiled the kernel within Pogoplug, I had to disable disable cross-compiling.
More info:
http://www.nslu2-linux.org/wiki/Optware/PlugComputersEdit the Makefile and there are 4 lines to modify:
$this->bbcode_second_pass_code('', '
#ARCH ?= arm
#CROSS_COMPILE ?= arm-none-linux-gnueabi-
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
')
Compile and install the kernel modules, which will put the necessary files in /lib/modules/2.6.31.6_SMP_820/build
$this->bbcode_second_pass_code('', 'make modules_install')
Finally, you should be ok to compile compcache.
I've written a script to enable it:
$this->bbcode_second_pass_code('', '
#!/bin/sh
COMPCACHE=/root/zram/compcache-0.6.2
MEMORY=15360 # memory in kb
BACKING_SWAP=/swapfile.img # swap file on disk
insmod $COMPCACHE/ramzswap.ko backing_swap=$BACKING_SWAP memlimit_kb=$MEMORY
')
remember to disable your standard swapfile first, or set it as a lower priority swap.