Eu encontrei o mesmo problema! Depois de googlar por um bom tempo, finalmente ficou (no meu caso) que o toolchain de construção do kernel é muito exigente sobre algumas opções env
, como apontado aqui .
Aqui, no meu ~/.bashrc
, eu tive export GREP_OPTIONS='--color=always'
e isso parece estar causando problema na geração do script de módulo.
Então alterá-lo para export GREP_OPTIONS='--color=auto'
ou export GREP_OPTIONS='--color=never'
AND efetuando logout / in resolveu o problema!
Quando GREP_OPTIONS='--color=always'
usado:
$ make clean modules SUBDIRS=drivers/staging/usbip
CLEAN drivers/staging/usbip/.tmp_versions
CLEAN drivers/staging/usbip/Module.symvers
LD drivers/staging/usbip/built-in.o
CC [M] drivers/staging/usbip/usbip_common.o
CC [M] drivers/staging/usbip/usbip_event.o
CC [M] drivers/staging/usbip/stub_dev.o
CC [M] drivers/staging/usbip/stub_main.o
CC [M] drivers/staging/usbip/stub_rx.o
CC [M] drivers/staging/usbip/stub_tx.o
CC [M] drivers/staging/usbip/vhci_sysfs.o
CC [M] drivers/staging/usbip/vhci_tx.o
CC [M] drivers/staging/usbip/vhci_rx.o
CC [M] drivers/staging/usbip/vhci_hcd.o
LD [M] drivers/staging/usbip/usbip-core.o
LD [M] drivers/staging/usbip/vhci-hcd.o
LD [M] drivers/staging/usbip/usbip-host.o
Building modules, stage 2.
MODPOST 0 modules
Alterando para GREP_OPTIONS='--color=auto'
e efetuando logout / in:
$ make clean modules SUBDIRS=drivers/staging/usbip
CLEAN drivers/staging/usbip/.tmp_versions
CLEAN drivers/staging/usbip/Module.symvers
LD drivers/staging/usbip/built-in.o
CC [M] drivers/staging/usbip/usbip_common.o
CC [M] drivers/staging/usbip/usbip_event.o
CC [M] drivers/staging/usbip/stub_dev.o
CC [M] drivers/staging/usbip/stub_main.o
CC [M] drivers/staging/usbip/stub_rx.o
CC [M] drivers/staging/usbip/stub_tx.o
CC [M] drivers/staging/usbip/vhci_sysfs.o
CC [M] drivers/staging/usbip/vhci_tx.o
CC [M] drivers/staging/usbip/vhci_rx.o
CC [M] drivers/staging/usbip/vhci_hcd.o
LD [M] drivers/staging/usbip/usbip-core.o
LD [M] drivers/staging/usbip/vhci-hcd.o
LD [M] drivers/staging/usbip/usbip-host.o
Building modules, stage 2.
MODPOST 3 modules
CC drivers/staging/usbip/usbip-core.mod.o
LD [M] drivers/staging/usbip/usbip-core.ko
CC drivers/staging/usbip/usbip-host.mod.o
LD [M] drivers/staging/usbip/usbip-host.ko
CC drivers/staging/usbip/vhci-hcd.mod.o
LD [M] drivers/staging/usbip/vhci-hcd.ko
Louco!