please choosego to mobile | Continue to access the PC version
View: 19024|Reply: 21

Missing linux-headers-3.4.39-01-lobo

[Copy link]

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
Published in 2016-2-3 19:51:41 | Show all floors |Read mode
I tried compiling a custom module from the sources.
The classic "make" procedure failed as follows:

make -C /lib/modules/3.4.39/build
M=/home/orangepi/RTL8187/rtl8187_linux_26.1010.0622.2006/ieee80211 modules
make[1]: Entering directory '/usr/lib/modules/3.4.39/build'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/usr/lib/modules/3.4.39/build'
Makefile:28: recipe for target 'modules' failed

In fact, the necessary kernel-headers are absent from the system:

[root@OrangePi ~]# uname -r
3.4.39-01-lobo

[root@OrangePi ~]# yum list installed | grep kernel-
kernel-devel.armv7hl                    4.3.4-200.fc22                  @updates
kernel-headers.armv7hl                  4.3.4-200.fc22                  @updates
kernel-tools-libs.armv7hl               4.1.10-200.fc22                 @System

Naturally, no headers from the Fedora repo :
[root@OrangePi ~]# yum install linux-headers-`uname -r`
Last metadata expiration check performed 1:26:52 ago on Wed Feb  3 11:21:08 2016.
No package linux-headers-3.4.39-01-lobo available.
Error: Unable to find a match.

What is it possible to do from that stage ?
Could somebody complete the images repository with the respective linux-headers-`uname -r` or suggest some other solution?

Thanks

4

threads

1119

posts

8727

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
8727
Published in 2016-2-4 05:23:59 | Show all floors
You can extract kernel headers from here: https://github.com/loboris/OrangePI-Kernel

Check this document: https://www.kernel.org/doc/Docum ... headers_install.txt

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-2-4 06:50:06 | Show all floors
Thanks. This is a valuable remark.
Do you know how to extract the headers from the GIT repo?

4

threads

1119

posts

8727

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
8727
Published in 2016-2-5 00:50:53 | Show all floors
That's why I gave you the second link. Clone the repository, copy configuration file to .config in linux kernel source folder, cd to it and execute the command mentioned in the second link.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-2-5 05:01:56 | Show all floors
Thanks for the prompt, but the difficulties are persisting :
The kernel was extracted :

[root@OrangePi kernels]# pwd
/usr/src/kernels
ls -al
drwxr-xr-x 23 root root 4096 Feb  4 20:45 4.3.4-200.fc22.armv7hl

[root@OrangePi kernels]# svn export^Cttps://github.com/loboris/OrangePI-Kernel/trunk/linux-3.4

I haven't found any config file except the one brought but yum update. So i reused it:
[root@OrangePi linux-3.4]# cd /usr/src/kernels/linux-3.4/
[root@OrangePi linux-3.4]# cp /usr/src/kernels/4.3.4-200.fc22.armv7hl/.config .

[root@OrangePi kernels]# ls -d linux-3.4/include/asm-* | sed 's/.*-//'
generic

Attempting to rebuild the headers:
[root@OrangePi linux-3.4]# make headers_install_all INSTALL_HDR_PATH=/usr
  INSTALL include (0 file)
  INSTALL include/asm-arm (32 files)

So far so good.

Now trying to build the custom's driver again:

[root@OrangePi rtl8187_linux_26.1010.0622.2006]# make
rm -f ieee80211/Module.symvers 2>/dev/null
rm -f ieee80211/Modules.symvers 2>/dev/null
make -C ieee80211 all
make[1]: Entering directory '/home/orangepi/RTL8187/rtl8187_linux_26.1010.0622.2006/ieee80211'
make -C /lib/modules/3.4.39-01-lobo/build M=/home/orangepi/RTL8187/rtl8187_linux_26.1010.0622.2006 modules
make[2]: Entering directory '/usr/lib/modules/3.4.39-01-lobo/build'
make[2]: *** No rule to make target 'modules'.  Stop.

So still no luck. Are there new ideas?

Apparently a similar issue was raised here:
http://www.orangepi.org/orangepi ... &extra=page%3D1

zcat /proc/config.gz > .config
Where a config file could be sourced from ?

4

threads

1119

posts

8727

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
8727
Published in 2016-2-5 05:17:42 | Show all floors
I don't know which configuration file was used exactly, but this one: https://github.com/loboris/Orang ... 1smp_lobo_defconfig is pretty safe bet. Try to use this.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-2-5 06:04:39 | Show all floors
I've just tried it with even worse results:
[root@OrangePi linux-3.4]# make headers_install_all INSTALL_HDR_PATH=/usr
Ignoring arch: alpha
  CHK     include/linux/version.h
  HOSTCC  scripts/basic/fixdep
In file included from scripts/basic/fixdep.c:106:0:
/usr/include/sys/types.h:25:22: fatal error: features.h: No such file or directory
compilation terminated.
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[2]: *** [scripts/basic/fixdep] Error 1
Makefile:412: recipe for target 'scripts_basic' failed
make[1]: *** [scripts_basic] Error 2
Makefile:1061: recipe for target 'headers_install_all' failed
make: *** [headers_install_all] Error 2
[root@OrangePi linux-3.4]#

4

threads

1119

posts

8727

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
8727
Published in 2016-2-6 04:52:08 | Show all floors
y52 replied at 2016-2-4 23:04
I've just tried it with even worse results:
[root@OrangePi linux-3.4]# make headers_install_all INST ...

Based on your output:
[root@OrangePi linux-3.4]# cd /usr/src/kernels/linux-3.4/
[root@OrangePi linux-3.4]# cp /usr/src/kernels/4.3.4-200.fc22.armv7hl/.config .


I would say that you are mixing 3.4 loboris kernel sources and official fedora 4.3 arm kernel sources. config files and headers are naturally not interchangable. You should not use any other kernel source other than that from loboris, because those were used for building your kernel in the first place.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-2-6 06:56:46 | Show all floors
To avoid all types of confusion, I've written a new Kali 2 image on SD Card,

Extracted the sources
root@OrangePi_kali:/usr/src/kernels/linux-3.4# svn export https://github.com/loboris/OrangePI-Kernel/trunk/linux-3.4

Renamed the config file to .config
root@OrangePi_kali:/usr/src/kernels/linux-3.4# cp -a /usr/src/kernels/linux-3.4/arch/arm/configs/sun8iw7p1smp_lobo_defconfig .config
It looks the one, which the kernel was built with :

root@OrangePi_kali:/usr/src/kernels/linux-3.4# vi .config
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.4.39-01-lobo Kernel Configuration
#
CONFIG_ARM=y
CONFIG_ARM_HAS_SG_CHAIN=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y



root@OrangePi_kali:/usr/src/kernels/linux-3.4# make headers_install_all INSTALL_HDR_PATH=/usr
make: gcc: Command not found
Ignoring arch: alpha
make[1]: gcc: Command not found
make[1]: gcc: Command not found
  CHK     include/linux/version.h
  UPD     include/linux/version.h
make[1]: gcc: Command not found
  HOSTCC  scripts/basic/fixdep
/bin/sh: 1: gcc: not found
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[2]: *** [scripts/basic/fixdep] Error 127
Makefile:412: recipe for target 'scripts_basic' failed
make[1]: *** [scripts_basic] Error 2
Makefile:1061: recipe for target 'headers_install_all' failed
make: *** [headers_install_all] Error 2
root@OrangePi_kali:/usr/src/kernels/linux-3.4#

root@OrangePi_kali:/usr/src/kernels/linux-3.4# whereis gcc
gcc: /usr/lib/gcc

root@OrangePi_kali:/usr/src/kernels/linux-3.4# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

A new error afterwards:
root@OrangePi_kali:/usr/src/kernels/linux-3.4# make headers_install ARCH=arm 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
root@OrangePi_kali:/usr/src/kernels/linux-3.4#

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

What really happens this time ? What the kernel-headers could not be restored on a fresh installation?

4

threads

1119

posts

8727

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
8727
Published in 2016-2-6 07:11:02 | Show all floors
Try to add CROSS_COMPILE= (as in empty)
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list