我正在尝试构建和安装 Raspberry Pi RT Preempt Linux Kernel。
这些是我遵循的步骤:
我安装了预编译的内核
kernel-4.4.9-rt17.tgz
我下载了 Raspberry Pi 内核源代码并应用了 Real Time
patch-4.4.9-rt17.patch.gz
。我使用以下命令为 Raspberry Pi3,B 型配置了我的内核:
export KERNEL=kernel7 make bcm2709_defconfig
我将内核配置为支持完全可抢占内核(RT),使用
make -j$(nproc) menuconfig
我使用构建内核
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
你有什么想法来解决这个问题吗?我不知道我做错了什么。我已经坚持了一段时间了,非常感谢任何帮助。