为Android构建Linux源代码后出错 [英] error after building Linux source code for android

查看:17
本文介绍了为Android构建Linux源代码后出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编译了Android的Linux内核源程序。生成源代码后,我收到错误,

之后
$ARCH=arm CROSS_COMPILE=/path/to/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make

我收到:

  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
 Kernel: arch/x86/boot/bzImage is ready  (#1)
  Building modules, stage 2.
  MODPOST 2283 modules
WARNING: modpost: Found 1 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'

所以我做了以下操作:

root@ubuntu:~/common# make CONFIG_DEBUG_SECTION_MISMATCH=y
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h

即使在此之后,我也得到了同样的输出

root@ubuntu:~/common# make
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
Kernel: arch/x86/boot/bzImage is ready  (#3)
  Building modules, stage 2.
  MODPOST 2283 modules
WARNING: modpost: Found 1 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'

实际输出应为

 Kernel: arch/arm/boot/Image is ready
 Kernel: arch/arm/boot/zImage is ready

我还多次执行"make"命令,现在Arch/arm/Boot/目录中没有"Image"。我尝试使用Arch/x86/Boot中的映像运行模拟器,但不起作用。它给了我一个错误。 实际命令为

./emulator -avd my_avd -kernel ~/common/arch/arm/boot/zImage -show-kernel -verbose

现在,因为我在/Arch/Arm/Boot中没有任何映像,所以我这样做了:

root@ubuntu:~/android-sdk-linux_x86/tools# ./emulator -avd avd1.5 -kernel ~/common/arch/x86/boot/bzImage -show-kernel -verbose

我收到以下错误:

emulator: control console listening on port 5554, ADB on port 5555
emulator: can't connect to ADB server: Connection refused
emulator: ping program: /home/preetam/android-sdk-linux_x86/tools/ddms
emulator: ping command: /home/preetam/android-sdk-linux_x86/tools/ddms ping emulator 10.0
Unknown cp14 write op1:6 crn:0 crm:8 op2:6
qemu: fatal: Trying to execute code outside RAM or ROM at 0xff91c756

R00=00000000 R01=000005a1 R02=00000100 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=00000000 R14=00010010 R15=ff91c756
PSR=400001f3 -Z-- T svc32
Aborted
root@ubuntu:~/android-sdk-linux_x86/tools# 

我不知道我做错了什么,我做了一些愚蠢的事情,请谁告诉我如何解决这个问题。? 谢谢!

推荐答案

您可以尝试运行:

ARCH=arm CROSS_COMPILE=/path/to/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make CONFIG_DEBUG_SECTION_MISMATCH=y

使Make使用ARM设置运行

另外,您正在编译哪个内核版本?你从哪里弄到这个内核的?为什么不能直接使用Android项目中的内核?

这篇关于为Android构建Linux源代码后出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆