linux-signed-4.15.0

linux-signed-4.15.0

我最终试图取代xhci_hcdehci_hcd因为我认为这可能会导致启动问题。为此,我显然需要重新编译内核。所以我尝试查看维基百科弄清楚该做什么。

运行后sudo apt-get build-dep linux-image-$(uname -r),我尝试执行“修改配置”指令命令editconfigs,以下是输出:

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

所有其他命令似乎都有效。最后,我尝试了这里有建议建议这样做

apt-get source linux-source

正如 OP 所说,它给出了一个“不理想的”linux-meta文件夹。果然它失败了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.

OP 反而建议这个命令让他“走上正轨”:

sudo apt install linux-source

linux-source-4.15.0在 中给出源文件/usr/src/。然而,这在cleaneditconfig命令上都失败了:

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

这是我的 Ubuntu 版本:

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

还有其他想法吗?

答案1

我正在使用 18.10,从 sudo fakeroot debian/rules clean (ubuntu-retpoline-extract-one': No such file or directory) 开始遇到了类似的问题。

为了让它工作,我必须做什么:

  • 运行 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
    
  • 构建之前(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.
    

之后,我可以成功运行:

    sudo fakeroot debian/rules clean
    sudo fakeroot debian/rules binary-headers binary-generic binary-perarch

答案2

仅供参考,自 20.10 起,构建前要安装的软件包列表已更改。请注意,pciutils-dev已被 替换libpci-dev。此外,安装要求libiberty-dev

因此需要这样做:

sudo 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 libpci-dev libiberty-dev 

相关内容