Re: Kbuild support for rebuilding a single driver gone?

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

 



On Tue, Jul 7, 2020 at 11:01 PM Bjørn Mork <bjorn@xxxxxxx> wrote:
>
> [ previously posted to kernelnewbies ]
>
> I have "always" tested simple patches by rebuilding just the affected
> driver on whatever kernel I happen to run.  Like this:
>
> bjorn@miraculix:/usr/local/src/git/linux$ make -C /lib/modules/4.19.0-9-amd64/build M=$(pwd)/drivers/net/usb clean
> make: Entering directory '/usr/src/linux-headers-4.19.0-9-amd64'
>   CLEAN   /usr/local/src/git/linux/drivers/net/usb/Module.symvers
> make: Leaving directory '/usr/src/linux-headers-4.19.0-9-amd64'
> bjorn@miraculix:/usr/local/src/git/linux$ make -C /lib/modules/4.19.0-9-amd64/build M=$(pwd)/drivers/net/usb qmi_wwan.ko
> make: Entering directory '/usr/src/linux-headers-4.19.0-9-amd64'
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/qmi_wwan.o
>   MODPOST 1 modules
>   CC      /usr/local/src/git/linux/drivers/net/usb/qmi_wwan.mod.o
>   LD [M]  /usr/local/src/git/linux/drivers/net/usb/qmi_wwan.ko
> make: Leaving directory '/usr/src/linux-headers-4.19.0-9-amd64'
>
>
> But this is broken for some reason with recent Debian (bullseye/sid)
> kernels, based on 5.6 or 5.7 kernels.  They will always compile all
> source files in the directory, even of most of them are not necessary
> for the requested target:
>
>
> bjorn@miraculix:/usr/local/src/git/linux$ make -C /lib/modules/5.7.0-1-amd64/build M=$(pwd)/drivers/net/usb clean
> make: Entering directory '/usr/src/linux-headers-5.7.0-1-amd64'
>   CLEAN   /usr/local/src/git/linux/drivers/net/usb/Module.symvers
> make: Leaving directory '/usr/src/linux-headers-5.7.0-1-amd64'
> bjorn@miraculix:/usr/local/src/git/linux$ make -C /lib/modules/5.7.0-1-amd64/build M=$(pwd)/drivers/net/usb qmi_wwan.ko
> make: Entering directory '/usr/src/linux-headers-5.7.0-1-amd64'
>   AR      /usr/local/src/git/linux/drivers/net/usb/built-in.a
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/catc.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/kaweth.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/pegasus.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/rtl8150.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/r8152.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/hso.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/lan78xx.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/asix_devices.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/asix_common.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/ax88172a.o
>   LD [M]  /usr/local/src/git/linux/drivers/net/usb/asix.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/ax88179_178a.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/cdc_ether.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/cdc_eem.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/dm9601.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/sr9700.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/sr9800.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/smsc75xx.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/smsc95xx.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/gl620a.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/net1080.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/plusb.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/rndis_host.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/cdc_subset.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/zaurus.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/mcs7830.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/usbnet.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/int51x1.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/cdc-phonet.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/kalmia.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/ipheth.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/sierra_net.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/cx82310_eth.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/cdc_ncm.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/huawei_cdc_ncm.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/lg-vl600.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/qmi_wwan.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/cdc_mbim.o
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/ch9200.o
>   MODPOST 1 modules
>   CC [M]  /usr/local/src/git/linux/drivers/net/usb/qmi_wwan.mod.o
>   LD [M]  /usr/local/src/git/linux/drivers/net/usb/qmi_wwan.ko
> make: Leaving directory '/usr/src/linux-headers-5.7.0-1-amd64'
>
>
>
>
> Why is this? Am I doing something wrong here?

Thanks for the report.

You are not doing anything wrong.

This is a regression of f566e1fbadb6

Please check this:
https://patchwork.kernel.org/patch/11649263/


It will be included in the next pull request,
and eventually back-ported to stable kernels.

Meanwhile, if M= build is not important,
you can compile-test a particular module
with in-tree build:


$ make drivers/net/usb/qmi_wwan.ko



-- 
Best Regards
Masahiro Yamada




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux