编译内核但不构建内核模块

编译内核但不构建内核模块

我正在尝试为我的 Banana pi 编译 linux-sunxi 内核。

使用此链接:http://sunxi.org/Linux_Kernel#Compilation

不幸的是,当我尝试编译 uImage 和模块时,我在底部收到以下消息。 (步:make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules

  Building modules, stage 2.
  MODPOST 0 modules

有谁知道如何解决这个问题?我确实有一个启用可加载模块的配置,例如我启用了 hid-multitouch。

执行时make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install我得到:

DEPMOD  3.19.0-rc6-45640-g77f18db

根本没有构建模块..

答案1

我遇到了同样的问题!经过一段时间的谷歌搜索后,最终发现(在我的例子中)内核构建工具链对某些env选项非常挑剔,正如指出的那样这里

在这里,在我的模块脚本~/.bashrc生成export GREP_OPTIONS='--color=always'中,这似乎导致了问题。

所以将其更改为export GREP_OPTIONS='--color=auto'export GREP_OPTIONS='--color=never' 注销/登录解决了问题!

使用时GREP_OPTIONS='--color=always'

$ 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

更改为GREP_OPTIONS='--color=auto'并注销/登录:

$ 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

疯狂的!

相关内容