[yocto] Yocto compiles raspi kernel with 'bcm2709_defconfig' error.

马 磊 winsdenny at outlook.com
Tue Oct 11 19:21:35 PDT 2016


I want to use the 'KBUILD_DEFCONFIG' to build the kernel, but an compile error happens, here is the piece of the log:



NOTE: make -j 2 zImage CC=arm-poky-linux-gnueabi-gcc  -mno-thumb-interwork -marm -fuse-ld=bfd LD=arm-poky-linux-gnueabi-ld.bfd

................................

........

 CC      arch/arm/kernel/patch.o
  CC      arch/arm/mm/proc-syms.o
In file included from /home/max/project/yocto-build/tmp/work-shared/myrpi2/kernel-source/arch/arm/kernel/patch.c:8:0:
/home/max/project/yocto-build/tmp/work-shared/myrpi2/kernel-source/arch/arm/kernel/patch.c: In function 'patch_map':
/home/max/project/yocto-build/tmp/work-shared/myrpi2/kernel-source/arch/arm/include/asm/fixmap.h:25:29: error: 'L_PTE_YOUNG' undeclared (first use in this function)
 #define FIXMAP_PAGE_COMMON (L_PTE_YOUNG | L_PTE_PRESENT | L_PTE_XN | L_PTE_DIRTY)
                             ^
/home/max/project/yocto-build/tmp/work-shared/myrpi2/kernel-source/arch/arm/include/asm/fixmap.h:27:29: note: in expansion of macro 'FIXMAP_PAGE_COMMON'
 #define FIXMAP_PAGE_NORMAL (FIXMAP_PAGE_COMMON | L_PTE_MT_WRITEBACK)
                             ^

But when I compile the kernel manually with "bcm2709_defconfig" everything is ok.
I compare  "bcm2709_defconfig" file with ".config" output by yocto, there are some differences, e.g. :
"CONFIG_SMP=y" and "CONFIG_CMA=y" are gone in the ".config".
And I stick into yocto source code I found some related code here(in the function "do_kernel_configme" from the file "/meta/classes/kernel-yocto.bbclass"):

PATH=${PATH}:${S}/scripts/util
configme ${configmeflags} --reconfig --output ${B} ${LINUX_KERNEL_TYPE} ${KMACHINE}

(BTW, I'm new to mail list)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20161012/3415df9c/attachment.html>


More information about the yocto mailing list