Yesterday I've been trying to build the module that way:

aptitude install linux-source-2.6.32
cd /usr/src; tar -xjf linux-source-2.6.32.tar.bz2
cd /lib/modules/2.6.32-5-amd64/
ln -s /usr/src/linux-source-2.6.32 build
cd /usr/src/linux-source-2.6.32
make mrproper
cp /boot/config-2.6.32-5-amd64 .config
make oldconfig && make prepare && make scripts
make CONFIG_BLK_DEV_NBD=m M=drivers/block

  WARNING: Symbol version dump /usr/src/linux-source-2.6.32/Module.symvers
           is missing; modules will have no dependencies and modversions.

modprobe -r nbd
mv /lib/modules/2.6.32-5-amd64/kernel/drivers/block/nbd.ko /root/nbd.ko.bkp
cp /usr/src/linux-source-2.6.32/drivers/block/nbd.o
/lib/modules/2.6.32-5-amd64/kernel/drivers/block/nbd.ko

# modprobe nbd
FATAL: Error inserting nbd
(/lib/modules/2.6.32-5-amd64/kernel/drivers/block/nbd.ko): Invalid
module format




2011/8/24 Alex Bligh <[email protected]>:
> If you look at
>  http://git.alex.org.uk/
>
> you will find a version of nbd which can be compiled as a standalone
> module. If you don't like my changes, just take it up to and
> including commit 0834c5ab761346177e685b8b1178d08f5ff1ff2d, or just
> reapply the first few changesets to a slightly more modern source.

I tryed this:

git clone http://git.alex.org.uk/nbd-module.git

root@valelap:/usr/src/nbd-module# make -j 2
make -C /lib/modules/`uname -r`/build M=$PWD
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
  LD      /usr/src/nbd-module/built-in.o
  CC [M]  /usr/src/nbd-module/nbd.o
/usr/src/nbd-module/nbd.c: In function ‘nbd_handle_req’:
/usr/src/nbd-module/nbd.c:481: error: ‘REQ_FLUSH’ undeclared (first
use in this function)
/usr/src/nbd-module/nbd.c:481: error: (Each undeclared identifier is
reported only once
/usr/src/nbd-module/nbd.c:481: error: for each function it appears in.)
/usr/src/nbd-module/nbd.c: In function ‘nbd_init’:
/usr/src/nbd-module/nbd.c:827: error: implicit declaration of function
‘blk_queue_flush’
/usr/src/nbd-module/nbd.c:827: error: ‘REQ_FLUSH’ undeclared (first
use in this function)
make[4]: *** [/usr/src/nbd-module/nbd.o] Error 1
make[3]: *** [_module_/usr/src/nbd-module] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
make: *** [default] Error 2

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to