USB WiFi adapter rtl88121au on RZ/G1M board

Hello,

 

I am trying to cross compile the github.com/gnab/rtl8812au for the RZG1M board, I am getting the Compilation errors if I choose any other platforms.

I referred the question already asked in forum , But it didn't helped much.

In make file we have CONFIG_PLATFORM_xxx, but I am not able to find it, Can you pleases assist me how it can be cross compiled to RZG1M board in order to enable the wifi module.

 

Note:

I created the new layer named realtek, there I keep the driver source file and updated the .bb file.

 

Regards,

Charan

  • I think you can just edit the Makefile and add your own platform.

    Like the instructions said, first set:

    CONFIG_PLATFORM_I386_PC = n

    Then, make your own platform definition:

    CONFIG_PLATFORM_ARM_RPI = n
    CONFIG_PLATFORM_ARM_RZG1M = y
    CONFIG_PLATFORM_MIPS_RMI = n

    Then later down the Makefile:

    ifeq ($(CONFIG_PLATFORM_ARM_RZG2M), y)
    EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
    ARCH := arm
    CROSS_COMPILE :=
    KVER := 4.4.154
    KSRC ?= path/to/your/kernel/source
    endif
  • In reply to Chris:

    Hello Chris,

    Thanks for the reply,

    After editing the makefile with following details :

    CONFIG_PLATFORM_ARM_RZG1M = y

    ifeq ($(CONFIG_PLATFORM_RZG1M), y)
    EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
    ARCH := arm
    CROSS_COMPILE ?=
    KVER := 4.4.154
    KSRC ?= /home/charan/yocto2/build/tmp/work/skrzg1m-poky-linux-gnueabi/linux-renesas/4.4+git0d1912303e54ed1b2a371be0bba51c384dd57326-r0/build
    endif

     

     

    I am getting error during do compile:

    ERROR: Function failed: do_compile (log file is located at /home/charan/yocto2/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/realtek/0.1-r0/temp/log.do_compile.10560)
    ERROR: Logfile of failure stored in: /home/charan/yocto2/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/realtek/0.1-r0/temp/log.do_compile.10560
    Log data follows:
    | DEBUG: Executing shell function do_compile
    | make ARCH=arm -C /home/charan/yocto2/build/tmp/work/skrzg1m-poky-linux-gnueabi/linux-renesas/4.4+git0d1912303e54ed1b2a371be0bba51c384dd57326-r0/build M=/home/charan/yocto2/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/realtek/0.1-r0  modules
    | make[1]: Entering directory `/home/charan/yocto2/build/tmp/work/skrzg1m-poky-linux-gnueabi/linux-renesas/4.4+git0d1912303e54ed1b2a371be0bba51c384dd57326-r0/build'
    |   CC [M]  /home/charan/yocto2/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/realtek/0.1-r0/core/rtw_cmd.o
    | gcc: error: unrecognized argument in option '-mabi=aapcs-linux'
    | gcc: note: valid arguments to '-mabi=' are: ms sysv
    | gcc: error: unrecognized command line option '-mlittle-endian'
    | gcc: error: unrecognized command line option '-mapcs'
    | gcc: error: unrecognized command line option '-mno-sched-prolog'
    | gcc: error: unrecognized command line option '-mno-thumb-interwork'
    | gcc: error: unrecognized command line option '-mfpu=vfp'
    | make[4]: *** [/home/charan/yocto2/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/realtek/0.1-r0/core/rtw_cmd.o] Error 1
    | make[3]: *** [_module_/home/charan/yocto2/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/realtek/0.1-r0] Error 2
    | make[2]: *** [sub-make] Error 2
    | make[1]: *** [__sub-make] Error 2
    | make[1]: Leaving directory `/home/charan/yocto2/build/tmp/work/skrzg1m-poky-linux-gnueabi/linux-renesas/4.4+git0d1912303e54ed1b2a371be0bba51c384dd57326-r0/build'
    | make: *** [modules] Error 2
    | WARNING: exit code 2 from a shell command.
    | ERROR: Function failed: do_compile (log file is located at /home/charan/yocto2/build/tmp/work/cortexa15hf-vfp-neon-poky-linux-gnueabi/realtek/0.1-r0/temp/log.do_compile.10560)
    ERROR: Task 6 (/home/charan/yocto2/build/meta-realtek/recipes-example/example/realtek_0.1.bb, do_compile) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 371 tasks of which 365 didn't need to be rerun and 1 failed.
    No currently running tasks (371 of 378)

     

    Regards,

    Charan

  • In reply to Charan K S:

    I think your clue is these errors:

    | gcc: error: unrecognized argument in option '-mabi=aapcs-linux'
    | gcc: note: valid arguments to '-mabi=' are: ms sysv
    | gcc: error: unrecognized command line option '-mlittle-endian'
    | gcc: error: unrecognized command line option '-mapcs'
    | gcc: error: unrecognized command line option '-mno-sched-prolog'
    | gcc: error: unrecognized command line option '-mno-thumb-interwork'
    | gcc: error: unrecognized command line option '-mfpu=vfp'


    gcc does not know those compiled options, so my guess is that you are using the 'host x86' gcc, not the 'cross compiled ARM' gcc

    Fill in that "CROSS_COMPILE ?=" with the correct ARM gcc cross compiler.
  • In reply to Chris:

    Hello Chris,

    I am using the yocto2 build system configured in the elinux website for RZG1M, i am not sure what to mention for the variable CROSS_COMPILE ?=
    Can you tell me the what we need to set for the variable CROSS_COMPILE in order to cross compile for ARM?

    Regards,
    Charan
  • In reply to Charan K S:

    Actually, CROSS_COMPILE might already be set by the Yocto environment.
    So, simply remove that line from your Makefile. By not filling it in ("CROSS_COMPILE ?= " ), you are basically deleting the value that was already set....which is why it is trying to use the host x86 gcc (that is just call "gcc")
  • In reply to Chris:

    Hello Chris,

    I tried to couple of things :
    ifeq ($(CONFIG_PLATFORM_RZG1M), y)
    EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
    ARCH := arm
    "CROSS_COMPILE ?="
    KVER := 4.4.154
    KSRC ?= /home/charan/yocto2/build/tmp/work/skrzg1m-poky-linux-gnueabi/linux-renesas/4.4+git0d1912303e54ed1b2a371be0bba51c384dd57326-r0/build
    endif

    and also tried to comment it completely

    ifeq ($(CONFIG_PLATFORM_RZG1M), y)
    EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
    ARCH := arm
    #"CROSS_COMPILE ?="
    KVER := 4.4.154
    KSRC ?= /home/charan/yocto2/build/tmp/work/skrzg1m-poky-linux-gnueabi/linux-renesas/4.4+git0d1912303e54ed1b2a371be0bba51c384dd57326-r0/build
    endif

    Both the times i am getting the same error as before.

    Regards,
    Charan
  • In reply to Charan K S:

    Charan,

    Have you successfully cross-compiled your project?

    Mike
    Clements
    RenesasRulz Moderator
  • In reply to Mike Clements:

    Hello Mike,

    Yes I am able to cross compile the wifi driver. after setting the Cross compile with proper compiler

    ifeq ($(CONFIG_PLATFORM_RZG1M), y)
    EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
    ARCH := arm
    CROSS_COMPILE := arm-poky-linux-gnueabi-
    KVER := 4.4.154
    KSRC ?= /home/charan/yocto2/build/tmp/work/skrzg1m-poky-linux-gnueabi/linux-renesas/4.4+git0d1912303e54ed1b2a371be0bba51c384dd57326-r0/build
    endif
  • In reply to Charan K S:

    Charan,

    Thank you for sharing your solution with us.
    I am happy to hear that your issue has been resolved!

    Mike Clements
    RenesasRulz Moderator
  • In reply to Mike Clements:

    Hello,

    I am successfully cross compiled the driver, but now i am facing the issue in enabling the wireless module.

    I am not able to see the WLAN0, except this if i do ifconfig I will get bellow interfaces:
    eth0 and lo

    and if i do iwconfig i will get below details:
    sit0 no wireless extensions.

    lo no wireless extensions.

    eth0 no wireless extensions.


    I checked WIRELESS_EXT it is enabled in the menuconfig,
    I tried to enable many wireless drivers available in the menuconfig so that wlan0 interface may work, but no luck.

    I also checked the file /etc/network/interfaces

    it contains below details:
    # Wireless interfaces
    iface wlan0 inet dhcp
    wireless_mode managed
    wireless_essid any
    wpa-driver wext
    wpa-conf /etc/wpa_supplicant.conf

    iface atml0 inet dhcp

    # Wired or wireless interfaces
    auto eth0
    iface eth0 inet dhcp
    iface eth1 inet dhcp

    and I triedd to update the wpa_supplicant.conf file with ssid and password, nothing worked.

    can you please help me to enable the wlan0 configuration.

    Regards,
    Charan