This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/WL1837MOD: My steps to build the WL18xx software, what's wrong?

Part Number: WL1837MOD
Other Parts Discussed in Thread: WL1837

Tool/software: Linux

Hi evrybody

My steps to build the WL18xx software:

1
I set all tools from "Setting up the Host Environment" (WL18xx WiFi Build Process, link processors.wiki.ti.com/.../WL18xx_WiFi_Build_Process, exseption is only lib32bz2-1.0.
The "sudo apt-get install lib32bz2-1.0" command does not find such packet.

2.
I set all build kernel options from "Creating configuration file (.config) for Linux kernel" (WL18xx Platform Integration Guide, link processors.wiki.ti.com/.../WL18xx_Platform_Integration_Guide).
I am using native kernel support for cfg80211/mac80211 and I set CONFIG_CFG80211=m, CONFIG_MAC80211=m.
To set "CONFIG_WIRELESS_EXT=y" I set "CONFIG_HOSTAP=y".
This option causes the following options to be set as well:
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_SPY=y
CONFIG_WEXT_PRIV=y

CONFIG_LIB80211=y
CONFIG_LIB80211_CRYPT_WEP=y
CONFIG_LIB80211_CRYPT_CCMP=y
CONFIG_LIB80211_CRYPT_TKIP=y

3.
lyudmila@lyudmila-linuxmint ~ $ pwd
/home/lyudmila
lyudmila@lyudmila-linuxmint ~ $ cd wl8-build
lyudmila@lyudmila-linuxmint ~/wl8-build $ git clone git://git.ti.com/wilink8-wlan/build-utilites.git

4.
lyudmila@lyudmila-linuxmint ~/wl8-build $ cd build-utilites/
lyudmila@lyudmila-linuxmint ~/wl8-build/build-utilites $cp setup-env.sample setup-env
Editing the setup-env file:
TOOLCHAIN_PATH=/home/lyudmila/timesysMinPoint/twr_vf600/toolchain/bin
ROOTFS=/home/lyudmila/wl8-build/fs
KERNEL_PATH=/home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13
KERNEL_VARIANT=3.13.9-ts-armv7l
CROSS_COMPILE=armv7l-timesys-linux-gnueabi- (from timesys SDK)
setup-env file attached.

5.
lyudmila@lyudmila-linuxmint ~/wl8-build/build-utilites $ ./build_wl18xx.sh init
"$ ./build_wl18xx.sh init" execution came to the end not absolutely correctly:
wl18_init.log file attached.

6.
$ ./build_wl18xx.sh patch_kernel
 Changing ROOTFS path to /home/lyudmila/wl8-build/fs
 Using user defined kernel
Makefile was found. Kernel version was set to 3.13.9.
   *****  only patching kernel  without performing an actual build! *****  
using kernel: /home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13
******  *******
Wifi Package Build Successful

7.
Build my kernel:
$ cd /home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13
$ export PATH=/home/lyudmila/timesysMinPoint/twr_vf600/toolchain/ccache:/home/lyudmila/timesysMinPoint/twr_vf600/toolchain/bin:$PATH
$ make ARCH=arm CROSS_COMPILE=armv7l-timesys-linux-gnueabi- uImage -j12
$ make ARCH=arm CROSS_COMPILE=armv7l-timesys-linux-gnueabi- modules
$ mkdir rfs
$ make ARCH=arm CROSS_COMPILE=armv7l-timesys-linux-gnueabi- INSTALL_MOD_PATH=/home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13/rfs  modules_install

8.
yudmila@lyudmila-linuxmint ~/wl8-build/build-utilites $ ./build_wl18xx.sh update R8.7_SP3
(from "Step 4: Build & Update" link processors.wiki.ti.com/.../WL18xx_System_Build_Scripts)
wl18_update.log file attached.

This step comes to the end with the "Makefile:98: *** Cannot find development files for any supported version of libnl. Stop." message.
There is not the fs_skeleton.tbz2 file in "<build-utilities>/outputs/" folder.


What's wrong?
Maybe in lib32bz2-1.0.  The "sudo apt-get install lib32bz2-1.0" command does not find such packet.
wl8-build-logs.tar.gz attached.

thanks
5047.wl8-build-logs.tar.gz

  • Hi

    1
    I set all tools from "Setting up the Host Environment" (WL18xx WiFi Build Process, link processors.wiki.ti.com/.../WL18xx_WiFi_Build_Process, exseption is only lib32bz2-1.0.
    The "sudo apt-get install lib32bz2-1.0" command does not find such packet.

    I resolved this issue. For my Linux mint 18.2 based on ubuntu 16.04 the command must be  "$ sudo apt-get install libz1:i386 libncurses5:i386 libbz2-1.0:i386".

    But this does not resolve the issue.  The "Makefile:98: *** Cannot find development files for any supported version of libnl. Stop." message remained still.

    "$ ./build_wl18xx.sh init" execution came to the end also as earlier.

    I am waiting for the help,

    thanks

  • Hi

    The additional information to the question.

    I started the command:
    lyudmila@lyudmila-linuxmint ~/wl8-build/build-utilites $ ./build_wl18xx.sh hostapd

    At execution the report is often given:

    Package libnl-3.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libnl-3.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libnl-3.0' found

    There is "libnl-3-dev libnl-route-3-dev libnl-genl-3-dev" in my Linux mint 18.2 based on ubuntu 16.04,
    But this does not resolve the issue.

    How to install libnl-3.0 package? 32 bit or 64 bit?

    thanks

  • Not sure, why you are seeing this error. On my Ubuntu 16.04LTS builds the builds went ok, for recent kernels with Linaro tool chain.

    Did, you try building libnl for the target file system first?

    $ ./build_wl18xx.sh libnl

    Thanks

  • Hi Hari

    1. Did, you try building libnl for the target file system first?

    Yes, I started 2 commands:

    $ ./build_wl18xx.sh libnl and ./build_wl18xx.sh update R8.7_SP3

    No problem with libnl.

    The problem is witth crda.

    build_crda from function build_all() from build_wl18xx.sh  reports

    "Makefile:98: *** Cannot find development files for any supported version of libnl.  Останов.
    ******  *******
    Makefile:98: *** Cannot find development files for any supported version of libnl.  Останов.
    ****** ERROR 0 *******"

    Thanks

  • Hi everybody

    I found, that environment variables  are not transferred, though in the build_wl18xx.sh script they are set.

    Here is the build_crda() function from the sbuild_wl18xx.sh script:

    function build_crda()
    {    
        cp `repo_path wireless_regdb`/regulatory.bin `path filesystem`/usr/lib/crda/regulatory.bin
        cp `repo_path crda`/pubkeys/* `path filesystem`/etc/wireless-regdb/pubkeys/
        cd_repo crda
        
        [ -z $NO_CLEAN ] && DESTDIR=`path filesystem` make clean
        [ -z $NO_CLEAN ] && assert_no_error
            PKG_CONFIG_LIBDIR="`path filesystem`/lib/pkgconfig" PKG_CONFIG_PATH="`path filesystem`/usr/local/ssl/lib/pkgconfig" DESTDIR=`path filesystem` CFLAGS+="-I`path filesystem`/usr/local/ssl/include -I`path filesystem`/include -L`path filesystem`/usr/local/ssl/lib -L`path filesystem`/lib" LDLIBS+=-lpthread V=1 USE_OPENSSL=1 make -j${PROCESSORS_NUMBER} all_noverify CC=${CROSS_COMPILE}gcc LD=${CROSS_COMPILE}ld AR=${CROSS_COMPILE}ar
        assert_no_error
            DESTDIR=`path filesystem` make install
            assert_no_error
        cd_back
    }

    I found this when I started the command ./build_wl18xx.sh crda. This command uses libnl-3-dev:amd64,  libnl-genl-3-dev:amd64 and gcc from my host  instead of CROSS_COMPILE=armv7l-timesys-linux-gnueabi-gcc and libnl32 from my ROOTFS ( from setup-env).

    In what reason?  What's wrong?

    thanks

  • Hi

    Are there  some ideas?

    thanks

  • Hi everybody

    I defined that iw packet is not built too. I made experiments and I want to specify the reason.

    "NL3xFOUND := $(shell $(PKG_CONFIG) --atleast-version=3.2 libnl-3.0 && echo Y)"   function from Makefile in iw folder does not find  libnl library, 

    though the libnl 3.2.25 library was built and installed successfully.

    I set a variable manually in the Makefile

    NL3xFOUND := Y

    and made corrections

    CFLAGS += -I/home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13/rfs/include/libnl3
    $(info CFLAGS="$(CFLAGS)")
    LIBS += -L/home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13/rfs/lib -lnl-3
    $(info LIBS="$(LIBS)")

    #LIBS += $(shell $(PKG_CONFIG) --libs $(NLLIBNAME))
    #CFLAGS += $(shell $(PKG_CONFIG) --cflags $(NLLIBNAME))
    endif # NO_PKG_CONFIG

    As a result the packet was successfully built.

    I have questions to professionals regarding NL3xFOUND := $(shell $(PKG_CONFIG) --atleast-version=3.2 libnl-3.0 && echo Y).

    1. Where does this function look for libnl library?

    2. What ways for the search does it use in this specific case?

    3. Whether can the "shell" in brackets change environment variables?

    4.  What is libnl-3.0 in brackets? Is this exact name of libnl library from the /.../kernel-source/linux-3.13/rfs/lib folder or something else?

    I am grateful for any help

  • Hi everybody

    I did not understand yet why pkg-config does not function, though PKG_CONFIG_PATH=/home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13/rfs/lib/pkgconfig and the libnl-3.0.pc file is placed in this folder. The pkg-config is installed:

    lyudmila@lyudmila-linuxmint ~ $ dpkg -l | grep pkg-config
    ii  pkg-config                                  0.29.1-0ubuntu1                              amd64

    Very strange situation!!!

    I made the following corrections in crda Makefile:

    ifeq ($(USE_OPENSSL),1)
    #CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
    CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\"
    #LDLIBS += `pkg-config --libs openssl`
    LDLIBS += -lcrypto -lssl

    .........

    NL3FOUND := Y

    ...........

        ifeq ($(NL3FOUND),Y)
        CFLAGS += -DCONFIG_LIBNL30
        NLLIBS += -lnl-genl-3 -lnl-3
    #    NLLIBS += $(shell pkg-config --libs libnl-genl-3.0)
        NLLIBNAME = libnl-3.0

    ..................

    CFLAGS += -I/home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13/rfs/include/libnl3
    #NLLIBS += `pkg-config --libs $(NLLIBNAME)`
    #CFLAGS += `pkg-config --cflags $(NLLIBNAME)`

    As a result the crda packet was successfully built  and the  execution of the $ ./build_wl18xx.sh update R8.7_SP3  command  came to the end with the message:

    Verifying filesystem skeleton...
    Wifi Package Build Successful

    Still there is not the fs_skeleton.tbz2 file in "<build-utilities>/outputs/" folder.

    I looked the  build_wl18xx.sh script.

    build_outputs() function  will not create the fs_skeleton.tbz2 file as my ROOTFS =/home/lyudmila/timesysMinPoint/twr_vf600/kernel-source/linux-3.13/rfs

    Is it the mistake or so has to be?

    build_outputs() function is given below:

    function build_outputs()
    {
        if [[ "$ROOTFS" == "DEFAULT" ]]
        then  
            echo "Building outputs"
            cd_path filesystem
            tar cpjf `path outputs`/${tar_filesystem[0]} .
            cd_back
            
            # Copy kernel files only if default kernel is used(for now)
            if [[ $DEFAULT_KERNEL -eq 1 ]]
            then
                if [ "$KERNEL_VERSION" -eq 3 ] && [ "$KERNEL_PATCHLEVEL" -eq 2 ]
                then
                    cp `path tftp`/uImage `path outputs`/uImage
                else
                    if [ -z $NO_DTB ]
                    then
                        cp `path tftp`/zImage `path outputs`/zImage
                        cp `path tftp`/*.dtb `path outputs`/
                    else
                        cp `path tftp`/uImage `path outputs`/uImage
                    fi
                fi
            fi
        fi
    }

  • Hi everybody

    1.

    I found why pkg-config does not function. The pkg-config not always functions correctly with the PKG_CONFIG_PATH variable.

    I copied *.pc files into the main catalog by default pkgconfig, then removed my corrections in crda Makefile and in iw Makefile and started the  ./build_wl18xx.sh update R8.7_SP3  command. The build came to the end successfully.

    2.

    There is  the fs_skeleton.tbz2 file in "<build-utilities>/outputs/" folder  if  ROOTFS=DEFAULT.

    Now I will try to start the wl1837 module on our board.