2017-11-01 11 views
0

これまで、カーネルモジュールをコンパイルすると、kernel-devel、kernel-headersがインストールされました。
その後、カーネルソースを含める必要がありました。
これで、カーネルモジュールをコンパイルするためにインストールするパッケージは、kernel-devel、kernel-headers、およびkernel.src.rpm(カーネルソース)です。
利用可能な最新のカーネルを確認し、必要なパッケージをダウンロードし、そのカーネル用のカーネルモジュールをコンパイルする "ビルドマシン"を作成中です。
パッケージをダウンロードしてその場所にファイルをコピーしたくない(kernel.src.rpm、rpm2cpio、cpioをダウンロードし、/ lib/modules/kernel-XY /にコピー) 私は気づいたカーネルsrcがインストールされていれば、カーネルヘッダーは必要ないということです。カーネルモジュールのコンパイル - 必要なパッケージ

カーネル-develのが??必要とされ、私は次の例外を取得し、カーネルのdevelせずにインストールしようとすると、それは、あることを確認していない:

make[2]: Entering directory `/usr/src/kernels/3.10.0-693.el7.x86_64' 

    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 ./Module.symvers 
      is missing; modules will have no dependencies and modversions. 

私は何をしないのですか?もし私がkernel-develをインストールしたら、この例外は出ません。kernel-develをインストールしたくありません。

+0

利用可能な最新のカーネルをチェックするビルドマシン 『「作成の過程でイム』、必要なパッケージをダウンロードし、そのカーネル用のカーネルモジュールをコンパイルしてください。 - あなたはソースをダウンロードせず、単にメイクをしていますか?ビルドツリーを設定する必要があります。 –

+0

yumのインストールにカーネルまたはkernel-develを使用するときは、ビルドツリーをコンパイルしますか? – ilansch

+1

あなたは実際にエラーメッセージを読んでいますか?それは何が間違っているかを伝えます。 –

答えて

3

makeを実行してカーネルをコンパイルする前に、make oldconfigを実行するか、.configファイルをビルドツリーにコピーする必要があります。 make oldconfigは.configを使用し、それを新しいカーネルに更新します。

カーネルソースディレクトリに簡単なmake help | grep -i configを示しています:

あなたはまた、他のオプションを持っている

Configuration targets: 
    config  - Update current config utilising a line-oriented program 
    nconfig   - Update current config utilising a ncurses menu based 
    menuconfig  - Update current config utilising a menu based program 
    xconfig  - Update current config utilising a Qt based front-end 
    gconfig  - Update current config utilising a GTK+ based front-end 
    oldconfig - Update current config utilising a provided .config as base 
    localmodconfig - Update current config disabling modules not loaded 
    localyesconfig - Update current config converting local mods to core 
    silentoldconfig - Same as oldconfig, but quietly, additionally update deps 
    defconfig - New config with default from ARCH supplied defconfig 
    savedefconfig - Save current config as ./defconfig (minimal config) 
    allnoconfig  - New config where all options are answered with no 
    allyesconfig - New config where all options are accepted with yes 
    allmodconfig - New config selecting modules when possible 
    alldefconfig - New config with all symbols set to default 
    randconfig  - New config with random answer to all options 
    listnewconfig - List new options 
    olddefconfig - Same as silentoldconfig but sets new symbols to their 
    kvmconfig - Enable additional options for kvm guest kernel support 
    xenconfig  - Enable additional options for xen dom0 and guest kernel support 
    tinyconfig  - Configure the tiniest possible kernel 
    kselftest-merge - Merge all the config dependencies of kselftest to existing 
        .config. 
    configuration. This is e.g. useful to build with nit-picking config. 
    i386_defconfig   - Build for i386 
    x86_64_defconfig   - Build for x86_64 
    make O=dir [targets] Locate all output files in "dir", including .config 
関連する問題