[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Ho to properly rebuild single module?



Hi there,

I need to apply the following
https://lore.kernel.org/linux-rdma/1645106372-23004-1-git-send-email-mike.marciniszyn@cornelisnetworks.com/T/#u
and rebuild ib_qib. To rebuild I wrote the following script
($1 is the kernel version, i.e. 5.16.0-3)

#!/bin/sh
#use in /usr/src
set -e -x
tar xJf linux-source-`echo $1| cut -f -2 -d.`.tar.xz
cp linux-headers-$1-amd64/.config linux-source-`echo $1| cut -f -2 -d.`/
cp linux-headers-$1-amd64/Module.symvers linux-source-`echo $1| cut -f -2 -d.`/
cd linux-source-`echo $1| cut -f -2 -d.`
patch -p1 < ../ib_qib.patch
make menuconfig
# press exit and save
make kernelversion
make scripts
make prepare
make modules_prepare
make M=drivers/infiniband/hw/qib ib_qib.ko

But the module I get is almost 20 times bigger than the original one.

What is the proper way to build?

Regards Greg


Reply to: