web-dev-qa-db-fra.com

Impossible de suivre "Kernel / BuildYourOwnKernel"

En fin de compte, j'essaie de remplacer xhci_hcd_ PAR _ehci_hcd car je pense que cela peut être à l'origine d'un problème de démarrage. Pour ce faire, je dois apparemment pouvoir recompiler le noyau. J'ai donc essayé de regarder le wiki pour savoir quoi faire.

Après avoir exécuté Sudo apt-get build-dep linux-image-$(uname -r), j'ai essayé d'exécuter la commande "Modification de la configuration" editconfigs, voici le résultat:

_linux-signed-4.15.0_

_➜  linux-signed-4.15.0 Sudo fakeroot debian/rules editconfigs
dh editconfigs
dh: Unknown sequence editconfigs (choose from: binary binary-Arch binary-indep build build-Arch build-indep clean install install-Arch install-indep)
debian/rules:35: recipe for target 'editconfigs' failed
make: *** [editconfigs] Error 2
_

Toutes les autres commandes semblaient fonctionner. Enfin, j'ai essayé le conseil ici qui suggérait de faire

_apt-get source linux-source
_

qui, comme le dit le PO, donne un dossier "indésirable" _linux-meta_. Et bien sûr, il a échoué sur _edit-configs_:

_linux-meta-4.15.0.36.38_

_    ➜  linux-meta-4.15.0.36.38 Sudo fakeroot debian/rules editconfigs
    make: *** No rule to make target 'editconfigs'.  Stop.
_

L'OP suggère à la place que cette commande le place "sur la bonne voie":

_Sudo apt install linux-source
_

donner un fichier source _linux-source-4.15.0_ in _/usr/src/_. Cependant, cela échoue sur les commandes clean et editconfig:

clean

_➜  linux-source-4.15.0 Sudo fakeroot debian/rules clean 
sed: can't read Makefile: No such file or directory
sed: can't read Makefile: No such file or directory
sed: can't read Makefile: No such file or directory
for i in debian.master/control.stub.in; do                                      \
  new=`echo $i | sed 's/\.in$//'`;                                      \
  cat $i | sed -e 's/PKGVER/4.15.0/g'                              \
        -e 's/ABINUM/36/g'                                       \
        -e 's/SRCPKGNAME/linux/g'                             \
        -e 's/=HUMAN=/64 bit x86/g'                                    \
  > $new;                                                               \
done
flavours="debian.master/control.d/vars.generic debian.master/control.d/vars.generic-lpae debian.master/control.d/vars.lowlatency debian.master/control.d/vars.snapdragon";\
for i in $flavours; do                                                  \
  /bin/bash -e debian/scripts/control-create $i "true" |        \
        sed -e 's/PKGVER/4.15.0/g'                                  \
        -e 's/ABINUM/36/g'                                       \
        -e 's/SRCPKGNAME/linux/g'                             \
        -e 's/=HUMAN=/64 bit x86/g'                                    \
        >> debian.master/control.stub;                                          \
done
echo "# placebo control.stub for kernel-wedge flow change" >debian/control.stub
cp debian.master/control.stub debian/control
export KW_DEFCONFIG_DIR=debian.master/d-i && \
export KW_CONFIG_DIR=debian.master/d-i && \
LANG=C kernel-wedge gen-control 4.15.0-36 | \
        Perl -f debian/scripts/misc/kernel-wedge-Arch.pl AMD64 \
        >>/usr/src/linux-source-4.15.0/debian/control
dh_testdir
dh_testroot
dh_clean
# d-i stuff
rm -rf debian.master/d-i-AMD64
# Generated on the fly.
rm -f debian.master/d-i/firmware/AMD64/kernel-image
# normal build junk
rm -rf debian.master/abi/4.15.0-36.39
rm -rf /usr/src/linux-source-4.15.0/debian/build
rm -f /usr/src/linux-source-4.15.0/debian/stamps/stamp-*
rm -rf debian.master/linux-*
# This gets rid of the d-i packages in control
cp -f debian.master/control.stub debian/control
cp debian.master/changelog debian/changelog
# Install the copyright information.
cp debian.master/copyright debian/copyright
# Install the retpoline extractor.
cp debian/scripts/retpoline-extract-one scripts/ubuntu-retpoline-extract-one
cp: cannot create regular file 'scripts/ubuntu-retpoline-extract-one': No such file or directory
debian/rules:110: recipe for target 'clean' failed
make: *** [clean] Error 1
_

editconfigs

_➜  linux-source-4.15.0 Sudo fakeroot debian/rules editconfigs
sed: can't read Makefile: No such file or directory
sed: can't read Makefile: No such file or directory
sed: can't read Makefile: No such file or directory
dh_testdir;
/bin/bash -e debian/scripts/misc/kernelconfig editconfigs
This does not appear to be the kernel source directory.
debian/rules.d/1-maintainer.mk:43: recipe for target 'editconfigs' failed
make: *** [editconfigs] Error 1
_

Voici ma version d'Ubuntu:

_No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic
_

Des idées supplémentaires?

3
Dair

J'utilise 18.10 et j'ai rencontré des problèmes similaires, à commencer par Sudo fakeroot debian/rules clean (ubuntu-retpoline-extract-one ': aucun fichier ou répertoire de ce type).

Ce que je devais faire pour que cela fonctionne:

  • Après avoir utilisé apt-get source linux-image - $ (uname -r):

    cd /usr/src/linux-source
    bunzip2 linux-source-4.18.0.tar.bz2
    tar xf linux-source-4.18.0.tar 
    mv linux-source-4.18.0/* . # if you don't do this you will get the "ubuntu-retpoline-extract-one no such file" error
    mkdir debian/stamps # otherwise build failure because touch command fails
    
  • Avant de construire (fakeroot debian/rules binary-headers ...):

    apt install bison flex libelf-dev fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev libudev-dev pciutils-dev # some of these may have already been installed, and some may not even be needed.
    

Après cela, je pourrais exécuter avec succès:

    Sudo fakeroot debian/rules clean
    Sudo fakeroot debian/rules binary-headers binary-generic binary-perarch
1
Poo Bah