Raspberry Pi RT 搶佔 Linux 核心建置錯誤

Raspberry Pi RT 搶佔 Linux 核心建置錯誤

我正在嘗試建置並安裝 Raspberry Pi RT Preempt Linux 核心。

這些是我遵循的步驟:

  1. 我安裝了預編譯的內核kernel-4.4.9-rt17.tgz

  2. 我下載了Raspberry Pi內核原始碼並應用了實時補丁-4.4.9-rt17.patch.gz。這個連結用於安裝)

  3. 我使用以下命令為 Raspberry Pi3、Model 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
    

這是內核建置輸出

你有什麼辦法可以解決這個問題嗎?我不知道我做錯了什麼。我真的很感激任何幫助。

相關內容