Cross compiling Linux wifi backports

I am trying to use Linux wifi drivers from 3.11 to linux-omap-l1 (2.6.39). I installed the cross-compiler on my Ubuntu 11.4 (kernel 2.6.38-11-generic) and verified that the cross-compiled kernel can run on an ARM processor as expected. I was also able to archive the wifi drivers into this Ubuntu by following the "User Guide" . However, I have the problem of cross compiling wifi backports. Here are two attempts:

Attempt # 1

After the Cross-compilation section from the same link, I set ARCH (= arm), CROSS_COMPILER, KLIB_BUILD (= Linux-omap-l1 directory) and KLIB (= Linux-omap-l1 directory), made make defconfig-wifi , then executed make -j4. He finished without any errors. However, when I check the generated ko files, they apparently do not cross-compile because they look like "rt2x00usb.ko: 32-bit LSB with 32-bit LSB switch, Intel 80386 , version 1 (SYSV), not divided "

Attempt # 2

Then I cleared the old make result and passed the above four macros directly to do as arguments and run it again. This time he reported many errors complaining about the lack of printk.h, atomic.h and average.h

Please help with any of the above cases.

+4
source share
3 answers

Ok, here I post rt2800usb wifi solution for other links. The following steps cross-compile successfully:

  • Menuconfig linux-omap-l1 (2.6.39) kernel to disable network support → Wireless, create and load it into the built-in module to ensure readiness
  • Run "make mrproper" from the backports directory on the pc assembly (Ubuntu 11.4)
  • Run the following sript command from the assembly. Make sure the KLIB directory is specified in advance, otherwise create it

    set -a CROSS_COMPILE="/opt/arm-2009q1/bin/arm-none-linux-gnueabi-" ARCH=arm KLIB_BUILD="/home/xxx/linux-omap-l1" KLIB="/home/xxx/linux-omap-l1/updates" set +a make defconfig-wifi make oldconfig # menuconfig worked here too make make install 
  • Copy the compiled binaries and modules to the device (10.11.2.3)

     scp -r /home/xxx/linux-omap-l1/updates/lib/modules/2.6.39.4-00537-g6c21e4a root@10.11.2.3 :/lib/modules/2.6.39.4/. 
  • Enter the built-in module and run "modprobe -v -f rt2800usb"

  • Download and install rt2800usb firmware in / lib / firmware if necessary
  • lsmod to verify driver downloads.
  • insert usb key (you may need to create or modify udev rules)
  • use iw to further explore its properties.
+4
source

backports cannot select my kernel configuration ..... mac80211 is installed in the module in my kernel configuration, when I look for mac80211 in the backport menu configuration, it shows disabled. I tried above ....

 set -a CROSS_COMPILE="/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-" ARCH=arm KLIB_BUILD="/home/xxx/rpm/BUILD/linux" KLIB="/home/xxx/rootfs/lib/modules/2.6.35.3-998-ga1cd8a7/updates" set +a make defconfig-wifi make menuconfig 
+1
source

I found this to be successful ...

 make defconfig-wifi CROSS_COMPILE=/home/xxx/Downloads/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi- ARCH=arm KLIB_BUILD=/home/xxx/Downloads/linux-3.10/ KLIB=/home/xxx/Downloads/rootfs/ make menuconfig CROSS_COMPILE=/home/xxx/Downloads/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi- ARCH=arm KLIB_BUILD=/home/xxx/Downloads/linux-3.10/ KLIB=/home/xxx/Downloads/rootfs/ make CROSS_COMPILE=/home/xxx/Downloads/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi- ARCH=arm KLIB_BUILD=/home/xxx/Downloads/linux-3.10/ KLIB=/home/xxx/Downloads/rootfs/ 
0
source

Source: https://habr.com/ru/post/1502655/


All Articles