compcache needs kernel 2.6.31 headers

This forum is for all other ARMv5 devices

compcache needs kernel 2.6.31 headers

Postby supes » Fri Aug 05, 2011 10:29 am

Yesterday I was trying to compile http://code.google.com/p/compcache/ in my pogopro, but after downloading gcc & development tools, I just realize it does not have proper kernel headers (/lib/modules/2.6.31xxx/build/), anyone know where can I download it or has anyone got working compcache binaries for pogopro?

TIA.
supes
 
Posts: 1
Joined: Fri Aug 05, 2011 10:22 am

Re: compcache needs kernel 2.6.31 headers

Postby acansado » Fri Oct 21, 2011 9:34 pm

I have installed compcache in my Pogoplug Pro downloading the kernel sources from:
http://www.pogoplug.com/developers-open-source.html

Unpack 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/PlugComputers

Edit 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.
acansado
 
Posts: 3
Joined: Fri Oct 21, 2011 9:13 pm


Return to Community Supported

Who is online

Users browsing this forum: No registered users and 44 guests