I am trying to install the Atheros CSI tool (provided installation instructions here), running Ubuntu 18.04.2 LTS on a Dell Inspiron 5570 laptop with a QCA9377 wireless adapter.
I am able to do everything successfully that is listed under the "Prepare" section of "Compile the kernel" in the installation instructions. (There are some things not specified in the instructions that I was able to figure out to do, like installing make
and gcc
.) However, I am confused about the make menuconfig
step and onwards. When I type make menuconfig
in the Atheros-CSI-Tool folder, I press "Save" immediately, saving a file named .config
, then "Exit" the menu.
When I type make -j16
(I have 8 CPU-cores), this is the output:
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CC scripts/mod/empty.o
CC scripts/mod/devicetable-offsets.s
cc1: error: code model kernel does not support PIC mode
cc1: error: code model kernel does not support PIC mode
scripts/Makefile.build:258: recipe for target 'scripts/mod/empty.o' failed
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
scripts/Makefile.build:153: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
scripts/Makefile.build:403: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
Makefile:555: recipe for target 'scripts' failed
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.
When I then type make modules
, this is the output:
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CC arch/x86/purgatory/purgatory.o
In file included from include/linux/compiler.h:54:0,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from arch/x86/purgatory/sha256.h:14,
from arch/x86/purgatory/purgatory.c:13:
include/linux/compiler-gcc.h:121:1: fatal error: linux/compiler-gcc7.h: No such file or directory
#include gcc_header(__GNUC__)
^~~~
compilation terminated.
scripts/Makefile.build:258: recipe for target 'arch/x86/purgatory/purgatory.o' failed
make[1]: *** [arch/x86/purgatory/purgatory.o] Error 1
arch/x86/Makefile:185: recipe for target 'archprepare' failed
make: *** [archprepare] Error 2
I tried to fix these errors I encountered by installing an old version of Ubuntu (14.04) from the archives, but Wi-Fi didn't work on my laptop under that OS (which is important since I am collecting data about Wi-Fi connections with the tool I'm trying to install). I also installed an old Linux kernel (4.1.10) from an online archive, but I encountered the same errors as shown above.
make -j16
in the terminal, I getwarning: pointer targets in passing argument 4 of ‘skb_do_copy_data_nocache’ differ in signedness [-Wpointer-sign]
andnote: expected ‘const char *’ but argument is of type ‘const unsigned char *’
alternating in what seems like an infinite loop. (I had to close the terminal and kill the processes.) Any idea on what could be causing this? – asdf60367134 Jul 09 '19 at 23:14sysfs.h
andkernfs.h
which has been used many places. A trick to monitor if the compilation is progressing is to check for lines likeCC/LD [M] xxx/xxx/xxx.o
or so. Since we are compiling a kernel, it takes longer than usual, as long as no error pops up. – Quar Jul 10 '19 at 00:06make -j16
run and this was the output. If you can't see in the image,undefined reference to \
__stack_chk_fail'was printed a few times, along with
Makefile:936: recipe for target 'vmlinux' failed`. – asdf60367134 Jul 10 '19 at 02:31--enable-default-pie
configured). I am still looking into solutions on 18.04 with gcc-5.6 ... – Quar Jul 10 '19 at 04:44no-pie
flag to Assembler as well. AddKBUILD_AFLAGS += $(call cc-option, -no-pie)
in Makefile as updated above. – Quar Jul 10 '19 at 16:12