我正在尝试构建并安装Raspberry Pi RT Preempt Linux内核。
这些是我遵循的步骤:
1)我安装了预编译的内核kernel-4.4.9-rt17.tgz
2)我下载了Raspberry Pi内核源代码并应用了Real Time patch-4.4.9-rt17.patch.gz。(我按照此链接进行安装:http://www.frank-durr.de/?p=203)
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
Here is the kernel build output
你有什么想法解决这个问题吗?我不知道自己做错了什么。我已经坚持了一段时间了,非常感谢任何帮助。