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

Re: Ho to properly rebuild single module?



On 2/27/22 23:13, Grzesiek wrote:
> 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?
> 

Hi Greg,

I don't know how to build a single module but I use this Debian's howto
to build Debian packages for Linux kernel.

https://wiki.debian.org/BuildADebianKernelPackage

HTH

Kind regards
Georgi


Reply to: