简体   繁体   English

在ARM上本地编译Linux内核模块

[英]Compiling Linux kernel modules natively on ARM

I am trying to install wifi and bluetooth drivers using this link, http://processors.wiki.ti.com/index.php/WL18xx_System_Build_Scripts on my ARM based board (microzed) running ubuntu 12.04. 我正在尝试使用此链接http://processors.wiki.ti.com/index.php/WL18xx_System_Build_Scripts在运行ubuntu 12.04的基于ARM的主板(微粉化)上安装wifi和蓝牙驱动程序。

As per step 2 of the link, where they have mentioned different parameters for cross compilation, I am confused on how to set these parameters because I am compiling natively on the ARM processor itself. 在链接的第2步中,他们提到了用于交叉编译的不同参数,我对如何设置这些参数感到困惑,因为我是在ARM处理器本身上进行本地编译的。

1.) TOOLCHAIN_PATH : What should this parameter be set to ? 1.)TOOLCHAIN_PATH:此参数应设置为什么? I am compiling natively on my processor itself. 我在处理器本身上进行本地编译。 So, not sure what this should be set to. 因此,不确定该设置为什么。

2.) ROOTFS: What is this path generally ? 2.)ROOTFS:通常这是什么路径? How can i find this on my OS ? 我如何在我的操作系统上找到它?

3.) KERNEL_PATH: Is this the kernel header path ? 3.)KERNEL_PATH:这是内核头文件路径吗? I have the folder, /usr/src/kernels/3.12.0-xillinux-1.3 Is this the kernel path that I should set to ? 我有/usr/src/kernels/3.12.0-xillinux-1.3文件夹,这是我应该设置的内核路径吗?

And the parameters below: 以及以下参数:

export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm

can be left as it is or should they be changed to something else as I am compiling natively ? 可以保留原样,还是应该在我本机编译时将其更改为其他内容?

Supposing you don't need to cross-compile (but you will natively compile on your ARM machine): 假设您不需要交叉编译(但是您将在您的ARM机器上本地编译):

  • TOOLCHAIN_PATH : directory containing the gcc compiler (use which gcc to discover) TOOLCHAIN_PATH :包含gcc编译器的目录(使用which gcc进行发现)
  • ROOTFS=/ : directory containing the filesystem of the target (set to / because you're not cross-compiling) ROOTFS=/ :包含目标文件系统的目录(设置为/因为您没有交叉编译)
  • KERNEL_PATH : directory containing an (already compiled) kernel for your board KERNEL_PATH :包含您开发板的(已编译)内核的目录
  • CROSS_COMPILE : leave it blank, since you are not cross-compiling CROSS_COMPILE :将其留空,因为您没有交叉编译
  • ARCH=arm

By the way, if instead you need to cross-compile, then you have to set the variables as follows: 顺便说一句,如果需要交叉编译,则必须按如下所示设置变量:

  • TOOLCHAIN_PATH : directory containing the gcc cross -compiler TOOLCHAIN_PATH :包含gcc 交叉编译器的目录
  • ROOTFS : directory containing the filesystem of the target board ROOTFS :包含目标板文件系统的目录
  • KERNEL_PATH : directory containing an (already compiled) kernel for the target board KERNEL_PATH :目录包含目标板的(已编译)内核
  • CROSS_COMPILE : must be equal to the absolute path and the beginning of the name of the compiler stripped of the gcc name; CROSS_COMPILE :必须等于绝对路径,并且将编译器名称的开头除去gcc名称; for example if your compiler is arm-linux-gcc inside the directory /my/path/ then you will set CROSS_COMPILE=/my/path/arm-linux- ) 例如,如果您的编译器是目录/my/path/ arm-linux-gcc ,那么您将设置CROSS_COMPILE=/my/path/arm-linux-
  • ARCH=arm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM