我使用谷歌ndk工具链交叉编译我的三星Note 3 SM-N900P型号的图像。我下载了Kitkat版本的Samsung Source代码,并且相信我已经按照内核自述文件中的说明进行操作。它声称使用4.7工具链,我在NDK版本8d中找到它。但是我收到以下错误:
ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
/home/sansari/android/kernel/scripts/Makefile.modpost:98: recipe for target 'vmlinux.o' failed
make[1]: *** [vmlinux.o] Error 1
Makefile:935: recipe for target 'vmlinux.o' failed
make: *** [vmlinux.o] Error
在网上搜索后,我看到两个不同的帖子here和here。一个人似乎暗示我无法解决这个问题,而另一个则暗示相反。这是基于我对make文件的有限知识。我基本上已经阅读了用户指南的前三章。我知道接收是什么,以及它的基本结构是什么。我确实看了我的Makefile第935行,这里是:
modpost-init := $(filter-out init/built-in.o, $(vmlinux-init))
vmlinux.o: $(modpost-init) $(vmlinux-main) FORCE
$(call if_changed_rule,vmlinux-modpost)
我发布此帖以了解我是否可以修复此错误,以及我应该如何解决此问题。任何人都可以提供有关此问题涉及的建议吗?这是我能解决的问题吗?
启用make debug选项时出现以下错误:
WARNING: vmlinux.o(.data+0x8434): Section mismatch in reference from the variable msm_mpm_debug_mask to the function .init.text:mpm_irq_domain_linear_size()
The variable msm_mpm_debug_mask references
the function __init mpm_irq_domain_linear_size()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: vmlinux.o(.data+0x844c): Section mismatch in reference from the variable msm_mpm_debug_mask to the function .init.text:mpm_irq_domain_legacy_size()
The variable msm_mpm_debug_mask references
the function __init mpm_irq_domain_legacy_size()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
/home/sansari/android/kernel/scripts/Makefile.modpost:98: recipe for target 'vmlinux.o' failed
make[1]: *** [vmlinux.o] Error 1
Makefile:935: recipe for target 'vmlinux.o' failed
make: *** [vmlinux.o] Error 2
@ user4838781 - 谢谢
答案 0 :(得分:3)
使用4.7,或者如果4.8尝试使用此开始make:
make -j$NUMBEROFCPUS CONFIG_NO_ERROR_ON_MISMATCH=y
例如在我使用
构建的Nexus 5上make -j$NUMBEROFCPUS CONFIG_NO_ERROR_ON_MISMATCH=y zImage-dtb