please choosego to mobile | Continue to access the PC version
Author: y52

Missing linux-headers-3.4.39-01-lobo

[Copy link]

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-2-6 17:04:56 | Show all floors
Apparently 'CROSS_COMPILE=' argument gives the same error:

Why the '/usr/lib' is not in the $PATH by default?
root@OrangePi_kali:/usr/src/kernels/linux-3.4# export PATH=$PATH:/usr/lib
root@OrangePi_kali:/usr/src/kernels/linux-3.4# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib

root@OrangePi_kali:/usr/src/kernels/linux-3.4# make headers_install CROSS_COMPILE=  INSTALL_HDR_PATH=/usr
make: execvp: gcc: Permission denied
  CHK     include/linux/version.h
  HOSTCC  scripts/basic/fixdep
/bin/sh: 1: gcc: Permission denied
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 127
Makefile:412: recipe for target 'scripts_basic' failed
make: *** [scripts_basic] Error 2

What could be done more?

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-2-6 21:16:05 | Show all floors
I came back to the similar discussion previously with credits to Tafka at 2015-11-14 08:40 :
http://www.orangepi.org/orangepi ... &extra=page%3D1

updated/added the packages:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# apt-get update
root@OrangePi_kali:/usr/src/kernels/linux-3.4# apt-get dist-upgrade
root@OrangePi_kali:/usr/src/kernels/linux-3.4# apt-get install gcc build-essential

root@OrangePi_kali:/usr/src/kernels/linux-3.4# make oldconfig
doesn't work with the error:
scripts/kconfig/conf --oldconfig Kconfig
init/Kconfig:938: can't open file "usr/Kconfig"
/usr/src/kernels/linux-3.4/scripts/kconfig/Makefile:30: recipe for target 'oldconfig' failed
make[1]: *** [oldconfig] Error 1
Makefile:492: recipe for target 'oldconfig' failed
make: *** [oldconfig] Error 2

Anyway, the 'make headers_install' instruction was executed with success:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# make headers_install CROSS_COMPILE=  INSTALL_HDR_PATH=/usr
  CHK     include/linux/version.h
  WRAP    arch/arm/include/generated/asm/auxvec.h
...
HOSTCC  scripts/unifdef
  REMOVE  kvm_para.h
  INSTALL include/asm-generic (34 files)
  INSTALL include/drm (15 files)
...
root@OrangePi_kali:/usr/src/kernels/linux-3.4# ls -d include/asm-* | sed 's/.*-//'
generic

Anyway, the custom R8187 driver could not be built:

rm -rf /usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211/tmp
make -C /lib/modules/3.4.39/build M=/usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211 modules
make[1]: *** /lib/modules/3.4.39/build: No such file or directory.  Stop.

The '/lib/modules/3.4.39/build' points to an inexisting .../home/LoBo2_Razno/... :
root@OrangePi_kali:/lib/modules/3.4.39/kernel/drivers/net/wireless# ls -al /lib/modules/3.4.39/build
lrwxrwxrwx 1 root root 49 Oct 16 23:04 /lib/modules/3.4.39/build -> /home/LoBo2_Razno/OrangePI/kernel_3.4.9/linux-3.4

Additional fixing was necessary:
root@OrangePi_kali:/lib/modules/3.4.39# unlink /lib/modules/$(uname -r)/build
root@OrangePi_kali:/lib/modules/3.4.39# unlink /lib/modules/$(uname -r)/source

root@OrangePi_kali:/lib/modules/3.4.39# ln -s /usr/src/kernels//linux-3.4 /lib/modules/$(uname -r)/build
root@OrangePi_kali:/lib/modules/3.4.39# ln -s /usr/src/kernels/linux-3.4 /lib/modules/$(uname -r)/source

Now the custom driver building advances gradually, but still doesn't run :

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

  WARNING: Symbol version dump /usr/src/kernels/linux-3.4/Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /usr/src/rtl8187_linux_26.1010.0622.2006/beta-8187/r8187_core.o
gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together
scripts/Makefile.build:307: recipe for target '/usr/src/rtl8187_linux_26.1010.0622.2006/beta-8187/r8187_core.o' failed


Unfortunately, OLDCONFIG didn't run and doesn't run now either:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# make oldconfig && make prepare
  HOSTCC  scripts/basic/fixdep
In file included from scripts/basic/fixdep.c:106:0:
/usr/include/arm-linux-gnueabihf/sys/types.h:25:22: fatal error: features.h: No such file or directory
#include <features.h>
                      ^
compilation terminated.
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 1
Makefile:412: recipe for target 'scripts_basic' failed
make: *** [scripts_basic] Error 2

The types.h points to <features.h>, which doesn't exist in the headers :
root@OrangePi_kali:/usr/src/kernels/linux-3.4# ls -la /usr/include/arm-linux-gnueabihf/sys/types.h
-rw-r--r-- 1 root root 6705 Apr 15  2015 /usr/include/arm-linux-gnueabihf/sys/types.h
root@OrangePi_kali:/usr/src/kernels/linux-3.4# ls -la /usr/include/arm-linux-gnueabihf/sys/features.h
ls: cannot access /usr/include/arm-linux-gnueabihf/sys/features.h: No such file or directory

Why is the <features.h> missing?
There are some instances for other architectures :
root@OrangePi_kali:/usr/src/kernels/linux-3.4# find / -name features.h
/usr/src/kernels/linux-3.4/kernel/sched/features.h
/usr/src/kernels/linux-3.4/include/xen/features.h
/usr/src/kernels/linux-3.4/include/xen/interface/features.h
/usr/include/c++/4.9/parallel/features.h

Could this setback be overcome as well?

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-2-7 06:53:11 | Show all floors
I posted my new trials today, but they have disappeared. I have to rewrite them again.

Here are the essentials.

I burnt a new fresh Kali 2 loboris image to an SD Card.
Next:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# apt-get dist-upgrade
root@OrangePi_kali:/usr/src/kernels/linux-3.4# apt-get install gcc build-essential

Oldconfig doesn't work:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# make oldconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
init/Kconfig:938: can't open file "usr/Kconfig"
/usr/src/kernels/linux-3.4/scripts/kconfig/Makefile:30: recipe for target 'oldconfig' failed
make[1]: *** [oldconfig] Error 1
Makefile:492: recipe for target 'oldconfig' failed
make: *** [oldconfig] Error 2

Nevertheless, the make headers_install ran without errors:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# make headers_install CROSS_COMPILE=  INSTALL_HDR_PATH=/usr
  CHK     include/linux/version.h
  WRAP    arch/arm/include/generated/asm/auxvec.h
....
  HOSTCC  scripts/unifdef
  REMOVE  kvm_para.h
  INSTALL include/asm-generic (34 files)
  INSTALL include/drm (15 files)
...


A bit of a cleaning:
root@OrangePi_kali:/lib/modules/3.4.39# unlink /lib/modules/$(uname -r)/build
root@OrangePi_kali:/lib/modules/3.4.39# unlink /lib/modules/$(uname -r)/source
root@OrangePi_kali:/lib/modules/3.4.39# ln -s /usr/src/kernels//linux-3.4 /lib/modules/$(uname -r)/build
root@OrangePi_kali:/lib/modules/3.4.39# ln -s /usr/src/kernels/linux-3.4 /lib/modules/$(uname -r)/source

root@OrangePi_kali:/usr/src/kernels/linux-3.4# ls -d include/asm-* | sed 's/.*-//'
generic

Despite the apparent advancement, the custom module doesn't compile:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# cd ../../rtl8187_linux_26.1010.0622.2006/

make -C /lib/modules/3.4.39/build M=/usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211 modules
make[1]: Entering directory '/usr/src/kernels/linux-3.4'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

  WARNING: Symbol version dump /usr/src/kernels/linux-3.4/Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_softmac.o
In file included from <command-line>:0:0:
/usr/src/kernels/linux-3.4/include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h: No such file or directory
#include <generated/autoconf.h>
                                ^
compilation terminated.
scripts/Makefile.build:307: recipe for target '/usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_softmac.o' failed
make[2]: *** [/usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_softmac.o] Error 1
Makefile:1365: recipe for target '_module_/usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211' failed


Banck to 'make oldconfig' failed again:

root@OrangePi_kali:/usr/src/kernels/linux-3.4# make oldconfig && make prepare
  HOSTCC  scripts/basic/fixdep
In file included from scripts/basic/fixdep.c:106:0:
/usr/include/arm-linux-gnueabihf/sys/types.h:25:22: fatal error: features.h: No such file or directory
#include <features.h>
compilation terminated.
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 1
Makefile:412: recipe for target 'scripts_basic' failed
make: *** [scripts_basic] Error 2

The types.h points to 'features.h', which is missing.
root@OrangePi_kali:/usr/src/kernels/linux-3.4# ls -la /usr/include/arm-linux-gnueabihf/sys/types.h
-rw-r--r-- 1 root root 6705 Apr 15  2015 /usr/include/arm-linux-gnueabihf/sys/types.h
root@OrangePi_kali:/usr/src/kernels/linux-3.4# ls -la /usr/include/arm-linux-gnueabihf/sys/features.h
ls: cannot access /usr/include/arm-linux-gnueabihf/sys/features.h: No such file or directory


Other attempts have failed pointing to the missing features.h
However, other instances exist in different other architectures:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# find / -name features.h
/usr/src/kernels/linux-3.4/kernel/sched/features.h
/usr/src/kernels/linux-3.4/include/xen/features.h
/usr/src/kernels/linux-3.4/include/xen/interface/features.h
/usr/include/c++/4.9/parallel/features.h

So I am still stuck with that inability to restore the kernel header, thus allowing to build custom drivers.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-2-7 06:59:30 | Show all floors
I posted my new trials today, but they have disappeared. I have to rewrite them again.

Here are the essentials.

I burnt a new fresh Kali 2 loboris image to an SD Card.
Next:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# apt-get dist-upgrade
root@OrangePi_kali:/usr/src/kernels/linux-3.4# apt-get install gcc build-essential

Oldconfig doesn't work:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# make oldconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
init/Kconfig:938: can't open file "usr/Kconfig"
/usr/src/kernels/linux-3.4/scripts/kconfig/Makefile:30: recipe for target 'oldconfig' failed
make[1]: *** [oldconfig] Error 1
Makefile:492: recipe for target 'oldconfig' failed
make: *** [oldconfig] Error 2

Nevertheless, the make headers_install ran without errors:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# make headers_install CROSS_COMPILE=  INSTALL_HDR_PATH=/usr
  CHK     include/linux/version.h
  WRAP    arch/arm/include/generated/asm/auxvec.h
....
  HOSTCC  scripts/unifdef
  REMOVE  kvm_para.h
  INSTALL include/asm-generic (34 files)
  INSTALL include/drm (15 files)
...


A bit of a cleaning:
root@OrangePi_kali:/lib/modules/3.4.39# unlink /lib/modules/$(uname -r)/build
root@OrangePi_kali:/lib/modules/3.4.39# unlink /lib/modules/$(uname -r)/source
root@OrangePi_kali:/lib/modules/3.4.39# ln -s /usr/src/kernels//linux-3.4 /lib/modules/$(uname -r)/build
root@OrangePi_kali:/lib/modules/3.4.39# ln -s /usr/src/kernels/linux-3.4 /lib/modules/$(uname -r)/source

root@OrangePi_kali:/usr/src/kernels/linux-3.4# ls -d include/asm-* | sed 's/.*-//'
generic

Despite the apparent advancement, the custom module doesn't compile:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# cd ../../rtl8187_linux_26.1010.0622.2006/

make -C /lib/modules/3.4.39/build M=/usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211 modules
make[1]: Entering directory '/usr/src/kernels/linux-3.4'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

  WARNING: Symbol version dump /usr/src/kernels/linux-3.4/Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_softmac.o
In file included from <command-line>:0:0:
/usr/src/kernels/linux-3.4/include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h: No such file or directory
#include <generated/autoconf.h>
                                ^
compilation terminated.
scripts/Makefile.build:307: recipe for target '/usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_softmac.o' failed
make[2]: *** [/usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211/ieee80211_softmac.o] Error 1
Makefile:1365: recipe for target '_module_/usr/src/rtl8187_linux_26.1010.0622.2006/ieee80211' failed


Banck to 'make oldconfig' failed again:

root@OrangePi_kali:/usr/src/kernels/linux-3.4# make oldconfig && make prepare
  HOSTCC  scripts/basic/fixdep
In file included from scripts/basic/fixdep.c:106:0:
/usr/include/arm-linux-gnueabihf/sys/types.h:25:22: fatal error: features.h: No such file or directory
#include <features.h>
compilation terminated.
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 1
Makefile:412: recipe for target 'scripts_basic' failed
make: *** [scripts_basic] Error 2

The types.h points to 'features.h', which is missing.
root@OrangePi_kali:/usr/src/kernels/linux-3.4# ls -la /usr/include/arm-linux-gnueabihf/sys/types.h
-rw-r--r-- 1 root root 6705 Apr 15  2015 /usr/include/arm-linux-gnueabihf/sys/types.h
root@OrangePi_kali:/usr/src/kernels/linux-3.4# ls -la /usr/include/arm-linux-gnueabihf/sys/features.h
ls: cannot access /usr/include/arm-linux-gnueabihf/sys/features.h: No such file or directory


Other attempts have failed pointing to the missing features.h
However, other instances exist in different other architectures:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# find / -name features.h
/usr/src/kernels/linux-3.4/kernel/sched/features.h
/usr/src/kernels/linux-3.4/include/xen/features.h
/usr/src/kernels/linux-3.4/include/xen/interface/features.h
/usr/include/c++/4.9/parallel/features.h

So I am still stuck with that inability to restore the kernel header, thus allowing to build custom drivers.

0

threads

1

posts

14

credits

Novice

Rank: 1

credits
14
Published in 2016-2-12 18:31:46 | Show all floors
Stuck with the EXACT same problem, is a shame as small things like this make it incredibly difficult for novice users (like myself) to build custom drivers/modules etc.
I attempted this on Ubuntu Vivid Mate OPI-PC

May be worth messaging Loboris for suggestions even though I imagine he is incredibly busy anyway.

2

threads

14

posts

70

credits

Registered member

Rank: 2

credits
70
Published in 2016-2-12 18:49:26 | Show all floors
I have made a linux-headers package from loboris source code for my Debian: http://home.mikelab.kiev.ua/SHAR ... 02-lobo-5_armhf.deb
I not competent in the rpm-based distros, but may be helps simple tarball unpacked to /usr/src: http://home.mikelab.kiev.ua/SHAR ... 4.39-02-lobo.tar.gz

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-2-15 01:21:12 | Show all floors
This was a valuable job allowing other people to sort out their bottlenecks.
Could you complete your kernel-headers with the procedure on how you built them. Some tasks require reproducing the rebuild and install for system customization.

2

threads

14

posts

70

credits

Registered member

Rank: 2

credits
70
Published in 2016-2-15 20:12:16 | Show all floors
As soon as I could compile the kernel by build_linux_kernel.sh, I just executed following batch file:
  1. #!/bin/bash

  2. export PATH="$PWD/brandy/gcc-linaro/bin":"$PATH"
  3. cross_comp="arm-linux-gnueabi"

  4. cd linux-3.4

  5. echo "Building kernel packages ..."
  6. make ARCH=arm KBUILD_DEBARCH=armhf CROSS_COMPILE=${cross_comp}- deb-pkg >> ../pbuild.log 2>&1
  7. if [ $? -ne 0 ]; then
  8.     echo "  Error: PACKAGES NOT BUILT."
  9.     exit 1
  10. fi
  11. echo "***OK***"
Copy code


As I understand, to get RPM there is only needed to replace "deb-pkg" by "rpm-pkg" in the make command line.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-2-16 04:09:17 | Show all floors
Great! I would like to try it as well. There is an important obstacle nevertheless: I was unable to execute the
build_linux_kernel.sh script:
root@OrangePi_kali:/usr/src/trunk# ./build_linux_kernel.sh plus clean
Building kernel for OPI-plus (clean) ...
  Configuring ...
  Error: KERNEL NOT BUILT.

Any suggestions?

2

threads

14

posts

70

credits

Registered member

Rank: 2

credits
70
Published in 2016-2-16 17:26:46 | Show all floors
As I already written, please show your build log file (kbuild_plus_clean.log)
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list