编译Linux的树外驱动程序的详细信息

时间:2019-07-15 09:08:44

标签: linux-kernel linux-device-driver cross-compiling embedded-linux

我正在尝试为较旧的(3.18.29)内核编译WiFi驱动程序。

处理器是MT7628(微处理器),板是VoCore2。

我已正确配置并内置/home/mcon/vocore/kernel中的内核。 在进行交叉编译时,我还需要提供一个指向交叉工具链的指针。

mcon@cinderella:~/vocore/kernel$ make ARCH=mips CROSS_COMPILE=/home/mcon/vocore/Buildroot/toolchain/host/bin/mipsel-linux- 
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  HOSTCC  scripts/dtc/dtc.o
  ...
  IHEX    firmware/edgeport/down3.bin
  IHEX2FW firmware/whiteheat_loader.fw
  IHEX2FW firmware/whiteheat.fw
  IHEX2FW firmware/keyspan_pda/keyspan_pda.fw
  IHEX2FW firmware/keyspan_pda/xircom_pgs.fw
mcon@cinderella:~/vocore/kernel$ make ARCH=mips CROSS_COMPILE=/home/mcon/vocore/Buildroot/toolchain/host/bin/mipsel-linux- modules_prepare
scripts/kconfig/conf --silentoldconfig Kconfig
net/sched/Kconfig:43: warning: menuconfig statement without prompt
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh

潜水员是从here取来的,并在/home/mcon/vocore/mt7628-p4rev-120395中解包了

我必须添加一个符号链接,因为Makefile../mt_wifi中查找,而不是在../src中查找(如果不为OpenWRT编译)。

无论如何编译似乎什么也没做:

mcon@cinderella:~/vocore/mt7628-p4rev-120395/build$ make -C /home/mcon/vocore/kernel M=$(pwd) CROSS_COMPILE=/home/mcon/vocore/Buildroot/toolchain/host/bin/mipsel-linux- ARCH=mips
make: Entering directory '/home/mcon/vocore/linux-3.18-vocore2'
  Building modules, stage 2.
  MODPOST 0 modules
make: Leaving directory '/home/mcon/vocore/linux-3.18-vocore2'

我无法启动模块的内核配置:

mcon@cinderella:~/vocore/mt7628-p4rev-120395/build$ make -C /home/mcon/vocore/kernel M=$(pwd) CROSS_COMPILE=/home/mcon/vocore/Buildroot/toolchain/host/bin/mipsel-linux- ARCH=mips menuconfig
make: Entering directory '/home/mcon/vocore/linux-3.18-vocore2'
make: *** No rule to make target 'menuconfig'.  Stop.
make: Leaving directory '/home/mcon/vocore/linux-3.18-vocore2'

...并且我还尝试将相关的配置变量手动添加到.config和/或命令行中,但是它们似乎被完全忽略了。

我显然错过了一些必要的步骤,但是我不知道要做什么。

0 个答案:

没有答案