官术网_书友最值得收藏!

Preparing kernel headers

There will occasionally be times where we'll face the need to compile code which requires kernel headers. Kernel headers are the source code of the Linux kernel. In this first recipe, we'll explain the steps required to prepare kernel headers for later use.

Getting ready

An Internet connection is required to complete this recipe.

How to do it...

Let's begin the process of preparing kernel headers:

  1. We begin first by updating our distribution by executing the following command:
    apt-get update
    
  2. Next, we must use apt-get again to prepare the kernel headers. Execute the following command:
    apt-get install linux-headers - `uname –r`
    
  3. Copy the following directory and its entire contents:
    cd /usr/src/linux
    cp -rf include/generated/* include/linux/
    
  4. We're now ready to compile code that requires kernel headers.
主站蜘蛛池模板: 怀仁县| 商河县| 体育| 临洮县| 广宁县| 丹寨县| 永定县| 米脂县| 邵武市| 资兴市| 瑞昌市| 米泉市| 文化| 抚顺市| 高陵县| 嫩江县| 娱乐| 柘荣县| 景德镇市| 高阳县| 闸北区| 盐边县| 都安| 安远县| 宣恩县| 延边| 遂昌县| 广水市| 景泰县| 鄂温| 寿宁县| 元江| 嘉禾县| 沈阳市| 封开县| 黄浦区| 昌平区| 洛隆县| 沁水县| 松潘县| 当阳市|