# Compilation de kernel-header

**URL:** <https://www.debian-fr.org/t/compilation-de-kernel-header/79040>\
**Category:** Support Debian\
**Created:** [Avril 11, 2019, 3:50 UTC](https://www.debian-fr.org/t/compilation-de-kernel-header/79040 "2019-04-11T15:50:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joffrey575](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@joffrey575](https://www.debian-fr.org/u/joffrey575)\
**Post date:** [Avril 11, 2019, 3:50 UTC](https://www.debian-fr.org/t/compilation-de-kernel-header/79040/1 "2019-04-11T15:50:15Z")

</div>

Bonsoir,

Je souhaite utiliser mon noyau pour compiler des drivers NI qui seront compatible avec mon système.

/usr/src/linux-headers-4.19.0-0.bpo.2-amd64

Je dois effectuer les opérations suivante :  
1-Configure the sources for the currently running kernel.  
2-Prepare the headers for compilation.

Pour cela, ils disent en :  
1-make cloneconfig  
2-make modules\_prepare

Sauf qu’à la base ces remarques sont pour OpenSuse plutôt que pour debian !

Est-ce que c’est correcte ou il y a une autre manière de s’y prendre pour Debian Stretch ?

Merci

---

<div class="post-metadata">

**Author:** ![joffrey575](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@joffrey575](https://www.debian-fr.org/u/joffrey575)\
**Post date:** [Avril 11, 2019, 4:31 UTC](https://www.debian-fr.org/t/compilation-de-kernel-header/79040/2 "2019-04-11T16:31:41Z")

</div>

J’essaie de répondre à cette problématique.

```auto
:/usr/src/linux-headers-4.19.0-0.bpo.2-amd64# make cloneconfig
/usr/src/linux-headers-4.19.0-0.bpo.2-common/scripts/Makefile.build:45: /usr/src/linux-headers-4.19.0-0.bpo.2-common/scripts/basic/Makefile: Aucun fichier ou dossier de ce type
make[3]: *** Aucune règle pour fabriquer la cible « /usr/src/linux-headers-4.19.0-0.bpo.2-common/scripts/basic/Makefile ». Arrêt.
make[2]: *** [/usr/src/linux-headers-4.19.0-0.bpo.2-common/Makefile:465: scripts_basic] Error 2
make[1]: *** [Makefile:146: sub-make] Error 2
make: *** [Makefile:8: all] Error 2

```

Voici le problème rencontré en question 6 ci-dessous, linux-source v4.19 a été installé. La version du noyau est linux-headers-4.19.0-0.bpo.2-amd64.

* * *

Q6. During installation, I get a message similar to the following one:  
“Kernel source does not appear to be configured for the running kernel.  
Configuration of kernel source is required to continue installation.”  
I do have kernel sources installed. Is there anything else I need to do?

A6. This problem is known to affect SUSE Linux, but it is possible that other  
distributions require similar steps to resolve this problem.

On openSUSE, complete the following steps:

1. Ensure you have installed kernel-source and kernel-syms packages  
corresponding to the version of the currently running kernel. You  
can determine the currently running kernel version by issuing the  
command “uname -r”.

2. Change the directory to the /usr/src/linux- directory,  
where corresponds to the currently running kernel version.

3. Run “zcat /boot/symvers-.gz \> Module.symvers” as root to  
prepare modversion support.

4. Run “make cloneconfig” as root to configure the sources for the  
currently running kernel.

5. Run “make modules\_prepare” as root to prepare the headers for  
compilation.

6. Run the NI-488.2 for Linux INSTALL script.

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Avril 11, 2019, 5:09 UTC](https://www.debian-fr.org/t/compilation-de-kernel-header/79040/3 "2019-04-11T17:09:53Z")

</div>

Les headers et image d’un noyau sont toujours fourni par Debian pour toutes les architectures

```auto
 apt list | grep 4.19.0-4

linux-headers-4.19.0-4-686-pae/testing,unstable 4.19.28-2 i386
linux-headers-4.19.0-4-686/testing,unstable 4.19.28-2 i386
linux-headers-4.19.0-4-all-amd64/testing,unstable 4.19.28-2 amd64
linux-headers-4.19.0-4-all-i386/testing,unstable 4.19.28-2 i386
linux-headers-4.19.0-4-all/testing,unstable 4.19.28-2 amd64
linux-headers-4.19.0-4-all/testing,unstable 4.19.28-2 i386
linux-headers-4.19.0-4-amd64/testing,unstable 4.19.28-2 amd64
linux-headers-4.19.0-4-cloud-amd64/testing,unstable 4.19.28-2 amd64
linux-headers-4.19.0-4-common-rt/testing,testing,unstable,unstable 4.19.28-2 all
linux-headers-4.19.0-4-common/testing,testing,unstable,unstable 4.19.28-2 all
linux-headers-4.19.0-4-rt-686-pae/testing,unstable 4.19.28-2 i386
linux-headers-4.19.0-4-rt-amd64/testing,unstable 4.19.28-2 amd64
linux-image-4.19.0-4-686-dbg/testing,unstable 4.19.28-2 i386
linux-image-4.19.0-4-686-pae-dbg/testing,unstable 4.19.28-2 i386
linux-image-4.19.0-4-686-pae-unsigned/testing,unstable 4.19.28-2 i386
linux-image-4.19.0-4-686-pae/testing,unstable 4.19.28-2 i386
linux-image-4.19.0-4-686-unsigned/testing,unstable 4.19.28-2 i386
linux-image-4.19.0-4-686/testing,unstable 4.19.28-2 i386
linux-image-4.19.0-4-amd64-dbg/testing,unstable 4.19.28-2 amd64
linux-image-4.19.0-4-amd64-unsigned/testing,unstable 4.19.28-2 amd64
linux-image-4.19.0-4-amd64/testing,unstable,now 4.19.28-2 amd64 [installé, automatique]
linux-image-4.19.0-4-cloud-amd64-dbg/testing,unstable 4.19.28-2 amd64
linux-image-4.19.0-4-cloud-amd64-unsigned/testing,unstable 4.19.28-2 amd64
linux-image-4.19.0-4-cloud-amd64/testing,unstable 4.19.28-2 amd64
linux-image-4.19.0-4-rt-686-pae-dbg/testing,unstable 4.19.28-2 i386
linux-image-4.19.0-4-rt-686-pae-unsigned/testing,unstable 4.19.28-2 i386
linux-image-4.19.0-4-rt-686-pae/testing,unstable 4.19.28-2 i386
linux-image-4.19.0-4-rt-amd64-dbg/testing,unstable 4.19.28-2 amd64
linux-image-4.19.0-4-rt-amd64-unsigned/testing,unstable 4.19.28-2 amd64
linux-image-4.19.0-4-rt-amd64/testing,unstable 4.19.28-2 amd64
linux-support-4.19.0-4/testing,testing,unstable,unstable 4.19.28-2 all

```

On s’en sert pour compiler un autre logiciel, comme un driver si on est certain qu’il n’est pas fourni par Debian  
[http://www.aboutdebian.com/compile.htm](http://www.aboutdebian.com/compile.htm)

---

<div class="post-metadata">

**Author:** ![mattotop](https://www.debian-fr.org/user_avatar/www.debian-fr.org/mattotop/32/3942_2.png) [@mattotop](https://www.debian-fr.org/u/mattotop)\
**Post date:** [Avril 11, 2019, 5:20 UTC](https://www.debian-fr.org/t/compilation-de-kernel-header/79040/4 "2019-04-11T17:20:30Z")

</div>

> [@joffrey575](#):
>
> Pour cela, ils disent en :  
> 1-make cloneconfig  
> 2-make modules\_prepare

La réponse de @grandtoubab n’est pas forcément claire, mais en fait, les headers ne sont que les .h du noyau, ce n’est pas le code source, juste les définitions des fonctions utilisables quand on compile un module.  
Les instructions que tu indiques, indépendament du fait qu’elles soient pour suse, ne s’appliquent donc pas à ce qu’il y a dans /usr/src/linux-headers-4.19.0-0.bpo.2-amd64

> [@joffrey575](#):
>
> compiler des drivers NI

Si tu nous dit ce que c’est que ces pilotes, on pourra te dire comment les compiler, mais ce que tu tentes de faire avec les headers, ne cherche plus, ça ne mène à rien.
