3
回答
编译小米2s 的kernel源码出错,求问大神诊断一下
开发十年,就只剩下这套Java开发体系了   
ubuntu@ubuntu:~/miui/mi2_kernel-master$ make
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      arch/arm/kernel/asm-offsets.s
In file included from include/linux/scatterlist.h:10,
                 from include/linux/dma-mapping.h:9,
                 from arch/arm/kernel/asm-offsets.c:15:
/home/ubuntu/miui/mi2_kernel-master/arch/arm/include/asm/io.h:30:26: error: mach/msm_rtb.h: No such file or directory
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2



其中 arch 和cross_compile 都已经设置好了
export CROSS_COMPILE=/home/ubuntu/WORKING_DIRECTORY/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- 
export ARCH=arm 

官方源码不应该代码有问题,所以应该是相关配置或者环境出问题的,重要的是,我google也没找到解决方法

如题,求问,给个解决方案呗,或者思路,谢了!


<无标签>
举报
wangxigui
发帖于5年前 3回/1K+阅
共有3个答案 最后回答: 3年前
提示没有找到“ mach/msm_rtb.h”文件呀~
--- 共有 2 条评论 ---
MrZQ回复 @wangxigui : 修改#inlcude<mach/msm_rtb.h> 为#inlcude</绝对路径/arch/arm/mach-msm/include/mach/msm_rtb.h> 5年前 回复
wangxigui是的,可是官方源码不应该代码有问题,所以应该是相关配置或者环境出问题的,重要的是,我google也没找到解决方法 5年前 回复

@MyKings 大牛,新问题

arch/arm/kernel/io.c: In function '_memcpy_fromio':
arch/arm/kernel/io.c:14: error: implicit declaration of function 'nop'
make[1]: *** [arch/arm/kernel/io.o] Error 1
make: *** [arch/arm/kernel] Error 2


--- 共有 1 条评论 ---
MrZQ参考这个:http://blog.csdn.net/fpmystar/article/details/4168073 5年前 回复

这个问题已经解决,不过又出来一个问题。

[aixiao@linux android_kernel_xiaomi_cancro-cm-12.1]$ vim /home/aixiao/android_kernel_xiaomi_cancro-cm-12.1/arch/arm/include/asm/io.h

#include <linux/types.h>
#include <asm/byteorder.h>
#include <asm/memory.h>
#include <asm-generic/pci_iomap.h>
/*
#include <mach/msm_rtb.h>
*/
#include </home/aixiao/android_kernel_xiaomi_cancro-cm-12.1/arch/arm/mach-msm/include/mach/msm_rtb.h>


  CC      arch/arm/mach-pxa/cm-x300.o
In file included from arch/arm/mach-pxa/cm-x300.c:37:0:
include/linux/power_supply.h: In function 'register_power_supply_notifier':
include/linux/power_supply.h:290:50: error: parameter name omitted
 extern int register_power_supply_notifier(struct notifier_block*)
                                                  ^
include/linux/power_supply.h: In function 'unregister_power_supply_notifier':
include/linux/power_supply.h:292:52: error: parameter name omitted
 extern int unregister_power_supply_notifier(struct notifier_block*)
                                                    ^
make[1]: *** [arch/arm/mach-pxa/cm-x300.o] 错误 1
make: *** [arch/arm/mach-pxa] 错误 2

顶部