简体   繁体   中英

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.

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.

1.) TOOLCHAIN_PATH : What should this parameter be set to ? I am compiling natively on my processor itself. So, not sure what this should be set to.

2.) ROOTFS: What is this path generally ? How can i find this on my OS ?

3.) KERNEL_PATH: Is this the kernel header path ? I have the folder, /usr/src/kernels/3.12.0-xillinux-1.3 Is this the kernel path that I should set to ?

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):

  • TOOLCHAIN_PATH : directory containing the gcc compiler (use which gcc to discover)
  • ROOTFS=/ : directory containing the filesystem of the target (set to / because you're not cross-compiling)
  • KERNEL_PATH : directory containing an (already compiled) kernel for your board
  • CROSS_COMPILE : leave it blank, since you are not cross-compiling
  • 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
  • ROOTFS : directory containing the filesystem of the target board
  • KERNEL_PATH : directory containing an (already compiled) kernel for the target board
  • CROSS_COMPILE : must be equal to the absolute path and the beginning of the name of the compiler stripped of the gcc name; for example if your compiler is arm-linux-gcc inside the directory /my/path/ then you will set CROSS_COMPILE=/my/path/arm-linux- )
  • ARCH=arm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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