kernel 4.14 does not compile for module3

Test and fix the Kernel 4.14 features

Moderators: odroid, mdrjr

kernel 4.14 does not compile for module3

Unread postby mtdew365 » Fri Dec 01, 2017 7:01 am

I received the following error when I try and compile the driver for module 3...

Code: Select all
DKMS make.log for 8192cu-1.10 for kernel 4.14.0-83 (armv7l)
Thu Nov 30 15:43:34 CST 2017
make: Entering directory '/usr/src/linux-headers-4.14.0-83'
  AR      /var/lib/dkms/8192cu/1.10/build/built-in.o
  CC [M]  /var/lib/dkms/8192cu/1.10/build/core/rtw_cmd.o
In file included from ./include/linux/netfilter.h:8:0,
                 from ./include/linux/netfilter/nf_conntrack_tuple_common.h:6,
                 from ./include/linux/netfilter/nf_conntrack_dccp.h:29,
                 from ./include/net/netns/conntrack.h:11,
                 from ./include/net/net_namespace.h:27,
                 from ./include/linux/netdevice.h:42,
                 from /var/lib/dkms/8192cu/1.10/build/include/osdep_service.h:769,
                 from /var/lib/dkms/8192cu/1.10/build/core/rtw_cmd.c:23:
./include/linux/if.h:28:54: fatal error: sys/socket.h: No such file or directory
compilation terminated.
scripts/Makefile.build:314: recipe for target '/var/lib/dkms/8192cu/1.10/build/core/rtw_cmd.o' failed
make[1]: *** [/var/lib/dkms/8192cu/1.10/build/core/rtw_cmd.o] Error 1
Makefile:1503: recipe for target '_module_/var/lib/dkms/8192cu/1.10/build' failed
make: *** [_module_/var/lib/dkms/8192cu/1.10/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.14.0-83'


I am using the following script to compile....
Code: Select all
#!/bin/bash

sudo -v

echo "Installing packages required to build rtl8192cu"

sudo apt-get -y update
sudo apt-get -y install \
     git \
     linux-headers-generic \
     linux-headers-$(uname -r) \
     build-essential \
     dkms

cd /lib/modules/$(uname -r)

if [ ! \( -e "build" \) ]
then
   echo 'Building link to build'
   sudo ln -s /usr/src/linux-headers-$(uname -r) build
fi

cd $HOME

echo 'Compiling ftl8192cu-fixes'
echo 'Set it up as a DKMS module'
sudo dkms add ./rtl8192cu-fixes

echo 'Build and install it'
sudo dkms install 8192cu/1.10

echo 'Refresh the module list'
sudo depmod -a

echo 'Ensure the native (and broken) kernel driver is blacklisted'
cd /etc/modprobe.d

if [ ! \( -f "blacklist-native-rtl8192.conf" \) ]
then
   echo "Copying blacklisted file"
   sudo cp $HOME/rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/
fi

echo 'PLEASE REBOOT SYSTEM TO COMPLETE'


This worked on 4.9.x
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby meveric » Fri Dec 01, 2017 7:26 am

it say's it can't find sys/socket.h which should be part of libc6-dev package.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8766
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Fri Dec 01, 2017 7:35 am

I tried the following....

sudo apt-get install libc6-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6-dev is already the newest version (2.23-0ubuntu9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Fri Dec 01, 2017 1:47 pm

Reference this post.... https://forum.odroid.com/viewtopic.php?f=146&p=193092

I had an issue with kernel 4.9 and this thread fixed it. Now I have another issue with this and this is 4.14. (This is just for reference)

Any help would be greatly appreciated :)
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Fri Dec 01, 2017 2:56 pm

Our prebuilt kernel package has the wifi module 3 driver and it should work out of the box once you install it.
Why do you want to build it again?
Has this AP mode guide any problem with Kernel 4.14?
https://wiki.odroid.com/accessory/conne ... fi/wlan_ap
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: kernel 4.14 does not compile for module3

Unread postby meveric » Fri Dec 01, 2017 4:36 pm

I just tried compiling this version: https://github.com/pvaret/rtl8192cu-fixes on my Debian Jessie image.

Worked perfectly fine under Kernel 4.14 and I haven't had any issues.. I could also easily install the dkms package I build on the C2 (arm64).
So I don't see any issue here it's straight forward and I created a dkms package for it and uploaded it to my repository: viewtopic.php?p=208097#p208097
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8766
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Sat Dec 02, 2017 1:03 am

I don't understand why this quit working with 4.14.... Module 3 uses driver=rtl871xdrv according to the docs. I take this off the blacklist and lsmod gives me the following...

Code: Select all
rtl_usb                20480  1 rtl8192cu
rtl8192c_common        49152  1 rtl8192cu
rtlwifi                73728  3 rtl_usb,rtl8192c_common,rtl8192cu


This there something I should delete so it rebuilds everything?
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Sat Dec 02, 2017 1:34 am

Here are the configuration files as they worked in 4.9.x

/etc/hostapd/hostapd_24.conf
Code: Select all
# interface
interface=wlan20
bridge=br0

# driver
driver=rtl871xdrv
#driver=rtl8192cu

# CTRL-Interface
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

# SSID
ssid=OdroidAP24

--snip--


/etc/default/hostapd
Code: Select all
DAEMON_CONF="/etc/hostapd/hostapd.conf /etc/hostapd/hostapd_24.conf"
##DAEMON_CONF="/etc/hostapd/hostapd.conf"


/etc/modprobe.d/blacklist-native-rtl8192.conf
Code: Select all
## This file ships with the rtl8192-fixes DKMS module.
## Keep the native (and currently broken) kernel driver from loading so ours
## is used instead:
install rtl8192cu /bin/false
install rtl8192c_common /bin/false
install rtlwifi /bin/false
## There is also a new mainline driver starting with kernel v4.4
install rtl8xxxu /bin/false


If I comment out one line in the /etc/default/hostapd and uncomment out the other (only use the hostapd.conf instead of the hostapd.conf and hostapd_24.conf) the 5.8 GHz (module 5) comes up correctly.
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Sat Dec 02, 2017 3:57 pm

Just tried compiling it again....

sudo dkms remove 8192cu/1.10 --all

Code: Select all
------------------------------
Deleting module version: 1.10
completely from the DKMS tree.
------------------------------
Done.


odroid@odroid2:~/rtl8192cu-fixes$ cd
odroid@odroid2:~$ sudo dkms add ./rtl8192cu-fixes

Code: Select all
Creating symlink /var/lib/dkms/8192cu/1.10/source ->
                 /usr/src/8192cu-1.10

DKMS: add completed.


odroid@odroid2:~$ sudo dkms install 8192cu/1.10

Code: Select all
Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=4.14.0-83 -C /lib/modules/4.14.0-83/build M=/var/lib/dkms/8192cu/1.10/build....(bad exit status: 2)
ERROR (dkms apport): binary package for 8192cu: 1.10 not found
Error! Bad return status for module build on kernel: 4.14.0-83 (armv7l)
Consult /var/lib/dkms/8192cu/1.10/build/make.log for more information.


odroid@odroid2:~$ cat /var/lib/dkms/8192cu/1.10/build/make.log
Code: Select all
DKMS make.log for 8192cu-1.10 for kernel 4.14.0-83 (armv7l)
Sat Dec  2 00:49:12 CST 2017
make: Entering directory '/usr/src/linux-headers-4.14.0-83'
  AR      /var/lib/dkms/8192cu/1.10/build/built-in.o
  CC [M]  /var/lib/dkms/8192cu/1.10/build/core/rtw_cmd.o
In file included from ./include/linux/netfilter.h:8:0,
                 from ./include/linux/netfilter/nf_conntrack_tuple_common.h:6,
                 from ./include/linux/netfilter/nf_conntrack_dccp.h:29,
                 from ./include/net/netns/conntrack.h:11,
                 from ./include/net/net_namespace.h:27,
                 from ./include/linux/netdevice.h:42,
                 from /var/lib/dkms/8192cu/1.10/build/include/osdep_service.h:769,
                 from /var/lib/dkms/8192cu/1.10/build/core/rtw_cmd.c:23:
./include/linux/if.h:28:54: fatal error: sys/socket.h: No such file or directory
compilation terminated.
scripts/Makefile.build:314: recipe for target '/var/lib/dkms/8192cu/1.10/build/core/rtw_cmd.o' failed
make[1]: *** [/var/lib/dkms/8192cu/1.10/build/core/rtw_cmd.o] Error 1
Makefile:1503: recipe for target '_module_/var/lib/dkms/8192cu/1.10/build' failed
make: *** [_module_/var/lib/dkms/8192cu/1.10/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.14.0-83'


I see that it can't find sys/socket.h but I have libc6-dev package installed. I have also tried reinstalling it. This worked until I upgraded to 4.14 I believe around the 23rd... Does anybody know what I am possibly doing wrong? Please? Thanks.
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Mon Dec 04, 2017 1:27 pm

odroid wrote:Our prebuilt kernel package has the wifi module 3 driver and it should work out of the box once you install it.
Why do you want to build it again?
Has this AP mode guide any problem with Kernel 4.14?
https://wiki.odroid.com/accessory/conne ... fi/wlan_ap


I was just following what I had to do to get module 3 to work with hostapd at 2.4GHz. Reference https://forum.odroid.com/viewtopic.php?f=146&t=27287

This worked for kernel 4.9.x but errors out on 4.14.

Module 3 in configuration file.
# driver
driver=rtl871xdrv
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby moon.linux » Mon Dec 04, 2017 5:06 pm

@mtdew365
It look like some some cleanup and restructuring of net structure clean happened between 4.9.x to 4.14.x.
on comparing this module with staging driver it seem to me lot's of cleanup happened.
and some strangle compilation error occur when we compile the module.

Code: Select all
root@odroid:~/rtl8192cu-fixes# ARCH=arm make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.14.0-83/build M=/root/rtl8192cu-fixes  modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.0-83'
  CC [M]  /root/rtl8192cu-fixes/core/rtw_cmd.o
In file included from ./include/linux/rculist.h:11:0,
                 from ./include/linux/sched/signal.h:5,
                 from /root/rtl8192cu-fixes/include/osdep_service.h:25,
                 from /root/rtl8192cu-fixes/core/rtw_cmd.c:23:
./include/linux/netfilter.h: In function ‘nf_hook’:
./include/linux/netfilter.h:198:33: error: dereferencing pointer to incomplete type ‘struct net’
  hook_head = rcu_dereference(net->nf.hooks[pf][hook]);
                                 ^
./include/linux/rcupdate.h:349:10: note: in definition of macro ‘__rcu_dereference_check’
  typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
          ^
./include/linux/rcupdate.h:545:28: note: in expansion of macro ‘rcu_dereference_check’
 #define rcu_dereference(p) rcu_dereference_check(p, 0)
                            ^
./include/linux/netfilter.h:198:14: note: in expansion of macro ‘rcu_dereference’
  hook_head = rcu_dereference(net->nf.hooks[pf][hook]);
              ^
scripts/Makefile.build:314: recipe for target '/root/rtl8192cu-fixes/core/rtw_cmd.o' failed
make[2]: *** [/root/rtl8192cu-fixes/core/rtw_cmd.o] Error 1
Makefile:1503: recipe for target '_module_/root/rtl8192cu-fixes' failed
make[1]: *** [_module_/root/rtl8192cu-fixes] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.14.0-83'
Makefile:584: recipe for target 'modules' failed
make: *** [modules] Error 2


This driver need to be overhault if we want to get this thing supported.
moon.linux
 
Posts: 1081
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: kernel 4.14 does not compile for module3

Unread postby meveric » Mon Dec 04, 2017 7:02 pm

O_o

I really don't see why you all have so much trouble compiling this.
It worked perfectly fine and out of the box on my Debian images:

Code: Select all
root@loki:~/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes# uname -a
Linux loki 4.14.0+ #1 SMP PREEMPT Tue Nov 28 15:53:53 UTC 2017 armv7l GNU/Linux
root@loki:~/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes# make ARCH=arm
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.14.0+/build M=/root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes  modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.0+'
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_cmd.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_security.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_debug.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_io.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_ioctl_query.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_ioctl_set.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_ieee80211.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_mlme.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_mlme_ext.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_wlan_util.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_pwrctrl.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_rf.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_recv.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_sta_mgt.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_ap.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_xmit.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_p2p.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_tdls.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_br_ext.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_iol.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/rtw_sreset.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/core/efuse/rtw_efuse.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/hal_intf.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/hal_com.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/dm.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_hal_init.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_phycfg.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rf6052.o
/root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rf6052.c: In function ‘PHY_RFShadowRefresh’:
/root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rf6052.c:1020:37: warning: iteration 63u invokes undefined behavior [-Waggressive-loop-optimizations]
    RF_Shadow[eRFPath][Offset].Value = 0;
                                     ^
/root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rf6052.c:1018:3: note: containing loop
   for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
   ^
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_dm.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rxdesc.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_cmd.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/usb/usb_halinit.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/usb/rtl8192cu_led.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/usb/rtl8192cu_xmit.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/usb/rtl8192cu_recv.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/usb/usb_ops_linux.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_sreset.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_xmit.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/hal/rtl8192c/usb/Hal8192CUHWImg.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/os_dep/osdep_service.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/os_dep/linux/os_intfs.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/os_dep/linux/usb_intf.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/os_dep/linux/usb_ops_linux.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/os_dep/linux/ioctl_linux.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/os_dep/linux/xmit_linux.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/os_dep/linux/mlme_linux.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/os_dep/linux/recv_linux.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/os_dep/linux/rtw_android.o
  LD [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/8192cu.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/8192cu.mod.o
  LD [M]  /root/sources/TOOLS/DKMS/WLAN/rtl8192cu-fixes/8192cu.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.14.0+'


My guess you're probably missing certain header files that should come from the 4.14 headers packages.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8766
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: kernel 4.14 does not compile for module3

Unread postby moon.linux » Mon Dec 04, 2017 8:30 pm

@meveric It could be because you have compiled the kernel and then you have the linux-header probably build correctly.
I feel their could be issue with the linux-headers-4.14.0-83 I am trying on linux-image provided by odroid.

Edited: I also go this compile on pre-compiled kernel

Code: Select all
root@odroid:~/rtl8192cu-fixes# uname -a
Linux odroid 4.14.0-rc8-xu4ktb #4 SMP PREEMPT Fri Nov 10 11:02:04 IST 2017 armv7l armv7l armv7l GNU/Linux
root@odroid:~/rtl8192cu-fixes# make ARCH=arm
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.14.0-rc8-xu4ktb/build M=/root/rtl8192cu-fixes  modules
make[1]: Entering directory '/usr/src/linux-tobetter'
  CC [M]  /root/rtl8192cu-fixes/core/rtw_cmd.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_security.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_debug.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_io.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_ioctl_query.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_ioctl_set.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_ieee80211.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_mlme.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_mlme_ext.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_wlan_util.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_pwrctrl.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_rf.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_recv.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_sta_mgt.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_ap.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_xmit.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_p2p.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_tdls.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_br_ext.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_iol.o
  CC [M]  /root/rtl8192cu-fixes/core/rtw_sreset.o
  CC [M]  /root/rtl8192cu-fixes/core/efuse/rtw_efuse.o
  CC [M]  /root/rtl8192cu-fixes/hal/hal_intf.o
  CC [M]  /root/rtl8192cu-fixes/hal/hal_com.o
  CC [M]  /root/rtl8192cu-fixes/hal/dm.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_hal_init.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_phycfg.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rf6052.o
/root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rf6052.c: In function ‘PHY_RFShadowRefresh’:
/root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rf6052.c:1020:37: warning: iteration 63u invokes undefined behavior [-Waggressive-loop-optimizations]
    RF_Shadow[eRFPath][Offset].Value = 0;
                                     ^
/root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rf6052.c:1018:3: note: containing loop
   for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
   ^
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_dm.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_rxdesc.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_cmd.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/usb_halinit.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/rtl8192cu_led.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/rtl8192cu_xmit.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/rtl8192cu_recv.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/usb_ops_linux.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_sreset.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/rtl8192c_xmit.o
  CC [M]  /root/rtl8192cu-fixes/hal/rtl8192c/usb/Hal8192CUHWImg.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/osdep_service.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/os_intfs.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/usb_intf.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/usb_ops_linux.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/ioctl_linux.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/xmit_linux.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/mlme_linux.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/recv_linux.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /root/rtl8192cu-fixes/os_dep/linux/rtw_android.o
  LD [M]  /root/rtl8192cu-fixes/8192cu.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/rtl8192cu-fixes/8192cu.mod.o
  LD [M]  /root/rtl8192cu-fixes/8192cu.ko
make[1]: Leaving directory '/usr/src/linux-tobetter'
moon.linux
 
Posts: 1081
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Tue Dec 05, 2017 2:45 am

uname -a

Code: Select all
Linux odroid2.bergmann.c 4.14.0-83 #1 SMP PREEMPT Thu Nov 23 14:07:46 UTC 2017 armv7l armv7l armv7l GNU/Linux


Sorry... I forgot to list the kernel used.

I have two different XU4's with 4.14.0-83 and they are both giving me the same error.
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Tue Dec 05, 2017 3:13 am

I have another XU4 with 4.9.x kernel and it compiled. So it appears to be something with 4.14.x

uname -a

Code: Select all
Linux cloudshell.bergmann.c 4.9.61-73 #1 SMP PREEMPT Thu Nov 9 17:00:42 UTC 2017 armv7l armv7l armv7l GNU/Linux


Code: Select all
odroid@cloudshell:~$ ./hostapdgit

--------------------------
Setup & Download rtl8192cu-fixes
Cloning into '/home/odroid/rtl8192cu-fixes'...
remote: Counting objects: 520, done.
remote: Total 520 (delta 0), reused 0 (delta 0), pack-reused 520
Receiving objects: 100% (520/520), 1.83 MiB | 1.39 MiB/s, done.
Resolving deltas: 100% (270/270), done.
Checking connectivity... done.
--------------------------

The local repository is current. No update is needed. (rtl8192cu-fixes)
odroid@cloudshell:~$ ./compile_rtl8192cu-fixes
[sudo] password for odroid:
Installing packages required to build rtl8192cu
Get:1 http://deb.odroid.in/5422-s xenial InRelease [1,704 B]
Hit:2 http://ppa.launchpad.net/kyle1117/ppa/ubuntu xenial InRelease     
Hit:3 http://ppa.launchpad.net/saiarcot895/myppa/ubuntu xenial InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports xenial InRelease             
Get:5 http://deb.odroid.in/5422-s xenial/main armhf Packages [55.4 kB]   
Get:6 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease [102 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports xenial-backports InRelease [102 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease [102 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main Sources [285 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf Packages [582 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports xenial-updates/universe armhf Packages [496 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports xenial-security/main Sources [103 kB]
Get:13 http://ports.ubuntu.com/ubuntu-ports xenial-security/main armhf Packages [325 kB]
Get:14 http://ports.ubuntu.com/ubuntu-ports xenial-security/universe armhf Packages [173 kB]
Fetched 2,328 kB in 19s (119 kB/s)                                       
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
git is already the newest version (1:2.7.4-0ubuntu1.3).
The following additional packages will be installed:
  fakeroot libfakeroot linux-headers-4.4.0-101
  linux-headers-4.4.0-101-generic
The following NEW packages will be installed:
  dkms fakeroot libfakeroot linux-headers-4.4.0-101
  linux-headers-4.4.0-101-generic linux-headers-4.9.61-73
  linux-headers-generic
0 upgraded, 7 newly installed, 0 to remove and 13 not upgraded.
Need to get 18.9 MB of archives.
After this operation, 131 MB of additional disk space will be used.
Get:1 http://deb.odroid.in/5422-s xenial/main armhf linux-headers-4.9.61-73 armhf 20171109 [8,021 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf dkms all 2.2.0.3-2ubuntu11.5 [66.3 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports xenial/main armhf libfakeroot armhf 1.20.2-1ubuntu1 [21.7 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports xenial/main armhf fakeroot armhf 1.20.2-1ubuntu1 [61.1 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf linux-headers-4.4.0-101 all 4.4.0-101.124 [9,916 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf linux-headers-4.4.0-101-generic armhf 4.4.0-101.124 [807 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main armhf linux-headers-generic armhf 4.4.0.101.106 [2,278 B]
Fetched 18.9 MB in 12s (1,533 kB/s)                                     
Selecting previously unselected package dkms.
(Reading database ... 201720 files and directories currently installed.)
Preparing to unpack .../dkms_2.2.0.3-2ubuntu11.5_all.deb ...
Unpacking dkms (2.2.0.3-2ubuntu11.5) ...
Selecting previously unselected package libfakeroot:armhf.
Preparing to unpack .../libfakeroot_1.20.2-1ubuntu1_armhf.deb ...
Unpacking libfakeroot:armhf (1.20.2-1ubuntu1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../fakeroot_1.20.2-1ubuntu1_armhf.deb ...
Unpacking fakeroot (1.20.2-1ubuntu1) ...
Selecting previously unselected package linux-headers-4.4.0-101.
Preparing to unpack .../linux-headers-4.4.0-101_4.4.0-101.124_all.deb ...
Unpacking linux-headers-4.4.0-101 (4.4.0-101.124) ...
Selecting previously unselected package linux-headers-4.4.0-101-generic.
Preparing to unpack .../linux-headers-4.4.0-101-generic_4.4.0-101.124_armhf.deb ...
Unpacking linux-headers-4.4.0-101-generic (4.4.0-101.124) ...
Selecting previously unselected package linux-headers-4.9.61-73.
Preparing to unpack .../linux-headers-4.9.61-73_20171109_armhf.deb ...
Unpacking linux-headers-4.9.61-73 (20171109) ...
Selecting previously unselected package linux-headers-generic.
Preparing to unpack .../linux-headers-generic_4.4.0.101.106_armhf.deb ...
Unpacking linux-headers-generic (4.4.0.101.106) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up dkms (2.2.0.3-2ubuntu11.5) ...
Setting up libfakeroot:armhf (1.20.2-1ubuntu1) ...
Setting up fakeroot (1.20.2-1ubuntu1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up linux-headers-4.4.0-101 (4.4.0-101.124) ...
Setting up linux-headers-4.4.0-101-generic (4.4.0-101.124) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.4.0-101-generic /boot/vmlinuz-4.4.0-101-generic
Setting up linux-headers-4.9.61-73 (20171109) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.9.61-73 /boot/vmlinuz-4.9.61-73
Setting up linux-headers-generic (4.4.0.101.106) ...
Building link to build
Compiling ftl8192cu-fixes
Set it up as a DKMS module

Creating symlink /var/lib/dkms/8192cu/1.10/source ->
                 /usr/src/8192cu-1.10

DKMS: add completed.
Build and install it

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area......
make KERNELRELEASE=4.9.61-73 -C /lib/modules/4.9.61-73/build M=/var/lib/dkms/8192cu/1.10/build...........................................................................................................................................................................................
cleaning build area......

DKMS: build completed.

8192cu.ko:
Running module version sanity check.

Good news! Module version v4.0.2_9000.20130911 for 8192cu.ko
exactly matches what is already found in kernel 4.9.61-73.
DKMS will not replace this module.
You may override by specifying --force.

depmod.....

Backing up initrd.img-4.9.61-73 to /boot/initrd.img-4.9.61-73.old-dkms
Making new initrd.img-4.9.61-73
(If next boot fails, revert to initrd.img-4.9.61-73.old-dkms image)
update-initramfs.................................

DKMS: install completed.
Refresh the module list
Ensure the native (and broken) kernel driver is blacklisted
Copying blacklisted file
PLEASE REBOOT SYSTEM TO COMPLETE
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Thu Dec 07, 2017 8:12 am

I have reloaded kernel 4.9 from an image and module 3 works with hostapd and an AP again. I can again compile the module.

uname -ar
Code: Select all
Linux odroid2.bergmann.c 4.9.47-57 #1 SMP PREEMPT Sun Sep 3 01:08:34 UTC 2017 armv7l armv7l armv7l GNU/Linux


How do I go about upgrading to 4.14 and still retain the ability to compile this module?

I usually upgrade by the following command...

Code: Select all
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get dist-upgrade


Thanks.
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Thu Dec 07, 2017 12:04 pm

You might need run sudo apt install linux-image-xu3 if the kernel package was locked.

Refer this thread to update from 4.9 to 4.14
viewtopic.php?f=29&t=28895

Today's kernel version is
Code: Select all
odroid@odroid:~$ uname -a                                                                                                       
Linux odroid 4.14.4-91 #1 SMP PREEMPT Wed Dec 6 17:45:11 UTC 2017 armv7l armv7l armv7l GNU/Linux 
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Thu Dec 07, 2017 12:10 pm

Thank you. I believe this what I did before but I will try it.

Code: Select all
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt install xserver-xorg-video-armsoc ffmpeg
sudo apt install linux-image-xu3
sync
sudo reboot
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Thu Dec 07, 2017 12:21 pm

Here is the output from the last step....

Code: Select all
sudo apt install linux-image-xu3

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
linux-image-4.14.4-91
Suggested packages:
fdutils linux-doc-4.14.4-91 | linux-source-4.14.4-91 linux-image-4.14.4-91-dbg linux-manual-4.14.4-91
The following packages will be REMOVED:
linux-image-4.14.0-83
The following NEW packages will be installed:
linux-image-4.14.4-91
The following packages will be upgraded:
linux-image-xu3
1 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 16.2 MB of archives.
After this operation, 147 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://deb.odroid.in/5422-s xenial/main armhf linux-image-4.14.4-91 armhf 20171206 [16.2 MB]
Get:2 http://deb.odroid.in/5422-s xenial/main armhf linux-image-xu3 armhf 91-1 [964 B]
Fetched 16.2 MB in 10s (1,602 kB/s)
Preconfiguring packages ...
Selecting previously unselected package linux-image-4.14.4-91.
(Reading database ... 392292 files and directories currently installed.)
Preparing to unpack .../linux-image-4.14.4-91_20171206_armhf.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/remove-old-on-upgrade 4.14.4-91 /boot/vmlinuz-4.14.4-91
Done.
Unpacking linux-image-4.14.4-91 (20171206) ...
Replacing files in old package linux-image-4.14.0-83 (20171123) ...
dpkg: linux-image-4.14.0-83: dependency problems, but removing anyway as you requested:
linux-image-xu3 depends on linux-image-4.14.0-83.

(Reading database ... 393991 files and directories currently installed.)
Removing linux-image-4.14.0-83 (20171123) ...
Ok, proceeding with removing running kernel image.
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.14.0-83 /boot/vmlinuz-4.14.0-83
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.14.0-83 /boot/vmlinuz-4.14.0-83
update-initramfs: Deleting /boot/initrd.img-4.14.0-83
(Reading database ... 392295 files and directories currently installed.)
Preparing to unpack .../linux-image-xu3_91-1_armhf.deb ...
Unpacking linux-image-xu3 (91-1) over (83-1) ...
Setting up linux-image-4.14.4-91 (20171206) ...

Hmm. There is a symbolic link /lib/modules/4.14.4-91/build
However, I can not read it: No such file or directory
Therefore, I am deleting /lib/modules/4.14.4-91/build


Hmm. The package shipped with a symbolic link /lib/modules/4.14.4-91/source
However, I can not read the target: No such file or directory
Therefore, I am deleting /lib/modules/4.14.4-91/source

Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.14.4-91 /boot/vmlinuz-4.14.4-91
run-parts: executing /etc/kernel/postinst.d/copy_dtb 4.14.4-91 /boot/vmlinuz-4.14.4-91
run-parts: executing /etc/kernel/postinst.d/copy_dtb2 4.14.4-91 /boot/vmlinuz-4.14.4-91
run-parts: executing /etc/kernel/postinst.d/dkms 4.14.4-91 /boot/vmlinuz-4.14.4-91
Error! Your kernel headers for kernel 4.14.4-91 cannot be found.
Please install the linux-headers-4.14.4-91 package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.14.4-91 /boot/vmlinuz-4.14.4-91
update-initramfs: Generating /boot/initrd.img-4.14.4-91
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.14.4-91 /boot/vmlinuz-4.14.4-91
run-parts: executing /etc/kernel/postinst.d/uInitrd 4.14.4-91 /boot/vmlinuz-4.14.4-91
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.14.4-91 /boot/vmlinuz-4.14.4-91
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.14.4-91 /boot/vmlinuz-4.14.4-91
run-parts: executing /etc/kernel/postinst.d/zImage 4.14.4-91 /boot/vmlinuz-4.14.4-91
Setting up linux-image-xu3 (91-1) ...
Code: Select all
odroid@odroid:~$ sync


I did not yet reboot in case something else needed to be done or an error is seen that is needed to be corrected.
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby moon.linux » Thu Dec 07, 2017 12:36 pm

If you want to remove old obsolete kernel image you probably need to execute following command.
Code: Select all
dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge

for linux-headers
Code: Select all
dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge
moon.linux
 
Posts: 1081
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Thu Dec 07, 2017 1:04 pm

@moon.linux
Thank you for the commands. It nicely removed the obsolete packages and saved a lot of storage space.
I've added the commands to the release notice : viewtopic.php?f=29&t=28895

@mtdew365
Those messages are normal if you choose "Yes" when you installed linux-image-xu3 package.
Try to reboot a couple of times.
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Thu Dec 07, 2017 1:24 pm

@odroid

Do I need to also install linux-headers-xu3? Here is the output from the latest attempt....it didn't compile.

Code: Select all
Installing packages required to build rtl8192cu
Hit:1 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports xenial-backports InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease
Hit:5 http://ppa.launchpad.net/saiarcot895/myppa/ubuntu xenial InRelease                                   
Hit:6 http://deb.odroid.in/5422-s xenial InRelease         
Reading package lists... Done   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
dkms is already the newest version (2.2.0.3-2ubuntu11.5).
git is already the newest version (1:2.7.4-0ubuntu1.3).
linux-headers-generic is already the newest version (4.4.0.101.106).
The following NEW packages will be installed:
  linux-headers-4.14.4-91
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,509 kB of archives.
After this operation, 55.1 MB of additional disk space will be used.
Get:1 http://deb.odroid.in/5422-s xenial/main armhf linux-headers-4.14.4-91 armhf 20171206 [8,509 kB]
Fetched 8,509 kB in 8s (1,021 kB/s)                                                                                             
Selecting previously unselected package linux-headers-4.14.4-91.
(Reading database ... 392295 files and directories currently installed.)
Preparing to unpack .../linux-headers-4.14.4-91_20171206_armhf.deb ...
Unpacking linux-headers-4.14.4-91 (20171206) ...
Setting up linux-headers-4.14.4-91 (20171206) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.14.4-91 /boot/vmlinuz-4.14.4-91
Error! Your kernel headers for kernel 4.14.4-91 cannot be found.
Please install the linux-headers-4.14.4-91 package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/header_postinst.d/link 4.14.4-91 /boot/vmlinuz-4.14.4-91
/usr/src/linux-headers-4.14.4-91/include/asm-armhf does not exist
Compiling ftl8192cu-fixes
Set it up as a DKMS module
Error! DKMS tree already contains: 8192cu-1.10
You cannot add the same module/version combo more than once.
Build and install it

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=4.14.4-91 -C /lib/modules/4.14.4-91/build M=/var/lib/dkms/8192cu/1.10/build....(bad exit status: 2)
ERROR (dkms apport): binary package for 8192cu: 1.10 not found
Error! Bad return status for module build on kernel: 4.14.4-91 (armv7l)
Consult /var/lib/dkms/8192cu/1.10/build/make.log for more information.
Refresh the module list
Ensure the native (and broken) kernel driver is blacklisted
PLEASE REBOOT SYSTEM TO COMPLETE
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Thu Dec 07, 2017 1:57 pm

Did you reboot a couple of times?

Yes. What happens if you run sudo apt install linux-headers-xu3?
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Thu Dec 07, 2017 2:27 pm

I rebooted a couple of time and installed linux-headers-xu3. Still did not compile.
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Thu Dec 07, 2017 2:46 pm

DKMS tree already contains: 8192cu-1.10
Our prebuild kernel package already included the driver probably.
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: kernel 4.14 does not compile for module3

Unread postby moon.linux » Thu Dec 07, 2017 2:54 pm

@mtdew365 @odroid.

Their seams to be an issue with include of some unwanted userspace header when building the module.
possible solution is to integrate this module in linux kernel tree.
moon.linux
 
Posts: 1081
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Thu Dec 07, 2017 10:44 pm

@odroid

Realtek RTL8192CU does not support the standard nl80211 driver used by hostapd according to the wiki http://odroid.com/dokuwiki/doku.php?id=en:xu4_wlan_ap or the new wiki [url]https://wiki.odroid.com/accessory/connectivity/wifi/wlan_ap?s[]=wireless&s[]=access&s[]=point[/url]
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby moon.linux » Fri Dec 08, 2017 2:27 am

It's long standing issue with Realtek wireless cards.
On 4.9.x we has integrated the module into the kernel https://github.com/hardkernel/linux/com ... 7926eb5cb5
but with the same commit on 4.14.x it's not working.

When we start hostapd realtek it dies out.
Code: Select all
root@odroid:~/hostapd-2.6-rtl/hostapd# ./hostapd -dd hostap-2.6.conf
random: Trying to read entropy from /dev/random
Configuration file: hostap-2.6.conf
ctrl_interface_group=0
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x96c90
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Previous country code , new country code KR
Continue interface setup after channel list update
ctrl_iface not configured!
random: Got 15/20 bytes from /dev/random
random: Got 5/5 bytes from /dev/random
Channel list update timeout - try to continue anyway
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=52 freq=5260 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=56 freq=5280 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=60 freq=5300 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=64 freq=5320 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=100 freq=5500 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=104 freq=5520 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=108 freq=5540 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=112 freq=5560 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=116 freq=5580 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=120 freq=5600 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=124 freq=5620 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=128 freq=5640 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=132 freq=5660 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=136 freq=5680 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=140 freq=5700 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
DFS 0 channels required radar detection
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
hostapd_setup_bss(hapd=0x97290 (wlan0), first=1)
wlan0: Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
wlan0: Could not connect to kernel driver
wlan0: Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
Using interface wlan0 with hwaddr 7c:dd:90:52:13:1e and ssid "OdroidAP"
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=8):
     4f 64 72 6f 69 64 41 50                           OdroidAP
PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
RSN pre-auth interface 'wlan0'
rtl871x_set_beacon_ops
rtl871x_set_hidden_ssid_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set beacon parameters
wlan0: Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
wlan0: Could not connect to kernel driver
wlan0: Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=3
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
hostapd_free_hapd_data(wlan0)
Interface initialization failed
wlan0: interface state COUNTRY_UPDATE->DISABLED
wlan0: AP-DISABLED
hostapd_interface_deinit_free(0x966e0)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x966e0)
wlan0: interface state DISABLED->DISABLED
hostapd_bss_deinit: deinit bss wlan0
wlan0: Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
wlan0: Could not connect to kernel driver
wlan0: Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=3
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
wlan0: AP-DISABLED
hostapd_cleanup(hapd=0x97290 (wlan0))
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=0x72364 drv_priv=0x96c00 -> hapd_deinit
hostapd_interface_free(0x966e0)
hostapd_interface_free: free hapd 0x97290
hostapd_cleanup_iface(0x966e0)
hostapd_cleanup_iface_partial(0x966e0)
hostapd_cleanup_iface: free iface=0x966e0
ELOOP: remaining socket: sock=6 eloop_data=0x96d38 user_data=(nil) handler=0x4f121
root@odroid:~/hostapd-2.6-rtl/hostapd#

Its strange is not compiling externally and it not working when build as module
moon.linux
 
Posts: 1081
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Fri Dec 08, 2017 3:16 am

@moon.linux

I am open to any and all suggestions :)
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby moon.linux » Sat Dec 09, 2017 6:27 pm

I feel that some header package is missing for this kernel. linux-headers-generic
Code: Select all
root@odroid:~# apt-get install --reinstall linux-headers-$(uname -r) linux-headers-generic build-essential dkms git
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 5 reinstalled, 0 to remove and 9 not upgraded.
Need to get 0 B/10.8 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 263962 files and directories currently installed.)
Preparing to unpack .../build-essential_12.1ubuntu2_armhf.deb ...
Unpacking build-essential (12.1ubuntu2) over (12.1ubuntu2) ...
Preparing to unpack .../dkms_2.2.0.3-2ubuntu11.5_all.deb ...
Unpacking dkms (2.2.0.3-2ubuntu11.5) over (2.2.0.3-2ubuntu11.5) ...
Preparing to unpack .../git_1%3a2.7.4-0ubuntu1.3_armhf.deb ...
Unpacking git (1:2.7.4-0ubuntu1.3) over (1:2.7.4-0ubuntu1.3) ...
Preparing to unpack .../linux-headers-4.14.4-91_20171206_armhf.deb ...
Unpacking linux-headers-4.14.4-91 (20171206) over (20171206) ...
Preparing to unpack .../linux-headers-generic_4.4.0.103.108_armhf.deb ...
Unpacking linux-headers-generic (4.4.0.103.108) over (4.4.0.103.108) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up build-essential (12.1ubuntu2) ...
Setting up dkms (2.2.0.3-2ubuntu11.5) ...
Setting up git (1:2.7.4-0ubuntu1.3) ...
Setting up linux-headers-4.14.4-91 (20171206) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.14.4-91 /boot/vmlinuz-4.14.4-91
ERROR (dkms apport): binary package for 8192cu: 1.10 not found
Error! Bad return status for module build on kernel: 4.14.4-91 (armv7l)
Consult /var/lib/dkms/8192cu/1.10/build/make.log for more information.
Setting up linux-headers-generic (4.4.0.103.108) ...
root@odroid:~#

Code: Select all
root@odroid:~# dpkg -l linux-headers-generic
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version              Architecture         Description
+++-===============================-====================-====================-===================================================================
ii  linux-headers-generic           4.4.0.103.108        armhf                Generic Linux kernel headers


Which make the module build failure.
moon.linux
 
Posts: 1081
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Sun Dec 10, 2017 10:44 am

@moon.linux,
We can't use Canonical's header package since its Kernel version is still 4.4.
We have to use our own header package.

Can you use our full linux kernel source for building the driver?
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Sun Dec 10, 2017 10:48 am

moon.linux wrote:@mtdew365 @odroid.

Their seams to be an issue with include of some unwanted userspace header when building the module.
possible solution is to integrate this module in linux kernel tree.


Can you try to integrate the module source and build it for your testing?
If the test result is fine, let's integrate it.
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: kernel 4.14 does not compile for module3

Unread postby moon.linux » Sun Dec 10, 2017 7:45 pm

@odroid I have give this a try but it's failed to start with hostapd with rtl driver.
moon.linux
 
Posts: 1081
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Thu Dec 14, 2017 1:52 am

@moon.linux @odroid.

Is there an update? Do you need me to do something? I just tried to compile with ...
Code: Select all
Linux odroid.bergmann.c 4.14.5-92 #1 SMP PREEMPT Mon Dec 11 15:48:15 UTC 2017 armv7l armv7l armv7l GNU/Linux


but it failed.
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Thu Dec 14, 2017 9:35 am

Other WiFi modules #0, #4 and #5 are working in AP mode on Kernel 4.14.5.
Only WiFi module #3 seems to have a problem with Kernel 4.14

We will try to run 4.14 kernel on an x86 Linux PC for testing the RTL8188CUS AP mode.
It will narrow down root causes.
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Tue Dec 19, 2017 4:18 am

@odroid,

I don't know if this is an issue or not but....

linux-headers-generic is the following...

Code: Select all
linux-headers-generic/xenial-updates,xenial-security,now 4.4.0.104.109 armhf [installed]


The kernel I have installed is ...
Code: Select all
Linux odroid.bergmann.c 4.14.7-93 #1 SMP PREEMPT Sun Dec 17 18:46:35 UTC 2017 armv7l armv7l armv7l GNU/Linux


I see linux-headers-4.x.xx-xx-generic for 4.4, 4.8, 4.10, 4.11, and 4.13, but nothing for 4.14. It says that the latest generic headers is 4.4.0-104-generic.
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Tue Dec 19, 2017 10:09 am

I think Canonical doesn't support Kernel 4.14 yet. So there is no generic-header.
So we have to use our full kernel source code.

BTW, x86 PC(kernel 4.14) has the same AP mode issue with module 3 RTL8188CUS driver.
I have no idea how to solve the issue. :(
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Tue Dec 19, 2017 12:04 pm

I have kept that XU-4 (AP) on 4.9.x series until a solution is found :)

I have two on 4.9.x and one on 4.14.x
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby moon.linux » Tue Dec 19, 2017 5:23 pm

@mtdew365
Their is no need to compile any driver or hostapd source code we can create Access Point using wpa_supplicant utility.
This is general steps followed in android device to create hostspot.

Prerequisite to build wpa_supplicant
Code: Select all
# sudo apt-get install libnl-3-dev libnl-genl-3-dev libssl-dev iptables git-core pkg-config libnl-genl-3-dev

1 Download the latest wap_supplicant source code.
Code: Select all
#  wget https://w1.fi/releases/wpa_supplicant-2.6.tar.gz
# tar xvfz wpa_supplicant-2.6.tar.gz
# cd wpa_supplicant-2.6/wpa_supplicant/
# cp defconfig .config

Enable AP, P2P and WPS needed to configure wpa_supplicant in AP mode.
Code: Select all
# echo CONFIG_P2P=y >> .config
# echo CONFIG_AP=y >> .config
# echo CONFIG_WPS=y >> .config
# echo CFLAGS +=-I/usr/include/libnl3/ >> .config
# echo CONFIG_LIBNL32=y >> .config

Build the wpa_supplicant 2.6
Code: Select all
make

Note if you get compilation error it might be some library is missing

create wpa_supplicant config file needed in AP mode.
cat /root/wpa.conf
Code: Select all
network={
    ssid="odroid-AP-RTL8188CUS"
    mode=2
    key_mgmt=WPA-PSK
    psk="wpaRTL8188CUSap"
    frequency=2437
}


Note: mode setting configure AP mode.

Since their is Netowkor Manager service is bind or listening to connect to AP it need to be stopped.
Code: Select all
sudo service network-manager stop


Start wap_supplicant to start AP mode.
Code: Select all
wpa_supplicant# ./wpa_supplicant -Dnl80211 -iwlan0 -c /root/wap.conf
Successfully initialized wpa_supplicant
Using interface wlan0 with hwaddr 7c:dd:90:52:13:1e and ssid "odroid-AP-RTL8188CUS"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
wlan0: CTRL-EVENT-CONNECTED - Connection to 7c:dd:90:52:13:1e completed [id=0 id_str=]

Note : Rest of the configuration for dnsmasq and iptable are in general and common to all device which support AP feature.
moon.linux
 
Posts: 1081
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Wed Dec 27, 2017 9:32 am

AP mode with wpa_supplicant WiKi page has been generated.
https://wiki.odroid.com/accessory/conne ... plicant_ap
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: kernel 4.14 does not compile for module3

Unread postby mtdew365 » Wed Dec 27, 2017 10:44 am

odroid wrote:AP mode with wpa_supplicant WiKi page has been generated.
https://wiki.odroid.com/accessory/conne ... plicant_ap


@odroid,

Just to be sure.... all but modules 3 work with building the driver for 4.14.x kernel....with module 3 instead of building the driver you use wpa_supplicant? Right? I just want to make sure. And if this is correct.....is module 3 eventually going to work (being able to be built) like the rest are.

Thanks.
mtdew365
 
Posts: 99
Joined: Mon Apr 25, 2016 1:39 pm
languages_spoken: english
ODROIDs: ODROID-XU4 (Cloudshell configuration)
ODROID-XU4 (HOST AP)(5Ghz)
ODROID-XU4 (HOST AP)(Dual Band)

Re: kernel 4.14 does not compile for module3

Unread postby odroid » Wed Dec 27, 2017 10:51 am

Right. WiFi module 3 AP mode works with pre-installed driver via wpa_supplicant.

I hope Realtek or other people eventually fix their driver issue in upstream kernel in near future.
User avatar
odroid
Site Admin
 
Posts: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID


Return to Linux Kernel 4.14 Debugging Party

Who is online

Users browsing this forum: No registered users and 2 guests