1

我正在尝试构建和安装 Raspberry Pi RT Preempt Linux Kernel。

这些是我遵循的步骤:

  1. 我安装了预编译的内核kernel-4.4.9-rt17.tgz

  2. 我下载了 Raspberry Pi 内核源代码并应用了 Real Time patch-4.4.9-rt17.patch.gz

  3. 我使用以下命令为 Raspberry Pi3,B 型配置了我的内核:

    export KERNEL=kernel7
    make bcm2709_defconfig
    
  4. 我将内核配置为支持完全可抢占内核(RT),使用

    make -j$(nproc) menuconfig
    
  5. 我使用构建内核

    make -j$(nproc) zImage 
    

    但我收到了错误:

    In file included from arch/arm/kernel/asm-offsets.c:14:0:
    ./include/linux/sched.h:2040:32: error: expected identifier or ‘(’ before ‘&’ token
    #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
                                    ^
    ./include/linux/sched.h:3679:37: note: in expansion of macro ‘tsk_cpus_allowed’
    static inline const struct cpumask *tsk_cpus_allowed(struct task_struct *p)
                                         ^
    In file included from arch/arm/kernel/asm-offsets.c:14:0:
    ./include/linux/sched.h:3687:19: error: redefinition of ‘tsk_nr_cpus_allowed’
     static inline int tsk_nr_cpus_allowed(struct task_struct *p)
                       ^
    In file included from arch/arm/kernel/asm-offsets.c:14:0:
    ./include/linux/sched.h:2042:19: note: previous definition of ‘tsk_nr_cpus_allowed’ was here
    

这是内核构建输出

你有什么想法来解决这个问题吗?我不知道我做错了什么。我已经坚持了一段时间了,非常感谢任何帮助。

4

0 回答 0