尝试编译 Android 内核代码时出错?

发布于 2024-11-19 12:08:46 字数 1714 浏览 0 评论 0原文

我一直在关注此链接 Android 内核使用 Android 模拟器进行编译和测试 编译android源代码。

但是在尝试使用编译源代码时

make ARCH=arm CROSS_COMPILE=/home/lares/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-

出现此错误。

lares@lares-Inspiron-1545:~/android_kernel$ make ARCH=arm CROSS_COMPILE=/home/lares/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
    make: execvp: /home/lares/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gcc: Permission denied
    scripts/kconfig/conf -s arch/arm/Kconfig
    make[2]: execvp: scripts/kconfig/conf: Permission denied
    make[2]: *** [silentoldconfig] Error 127
    make[1]: *** [silentoldconfig] Error 2
      CHK     include/linux/version.h
    make[1]: `include/asm-arm/mach-types.h' is up to date.
    make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.

通过向适当的目录分配权限来解决此问题后,我得到了这个。

lares@lares-Inspiron-1545:~/android_kernel$ make ARCH=arm  CROSS_COMPILE=/home/lares/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
    scripts/kconfig/conf -s arch/arm/Kconfig
      CHK     include/linux/version.h
    make[1]: `include/asm-arm/mach-types.h' is up to date.
      CHK     include/linux/utsrelease.h
      UPD     include/linux/utsrelease.h
      SYMLINK include/asm -> include/asm-arm
      CC      kernel/bounds.s
    arm-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
    make[1]: *** [kernel/bounds.s] Error 1
    make: *** [prepare0] Error 2

有人可以帮我吗?

I have been following this link Android kernel compile and test with Android Emulator to compile the android source code.

But while trying to compile the source code using

make ARCH=arm CROSS_COMPILE=/home/lares/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-

I am getting this error.

lares@lares-Inspiron-1545:~/android_kernel$ make ARCH=arm CROSS_COMPILE=/home/lares/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
    make: execvp: /home/lares/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gcc: Permission denied
    scripts/kconfig/conf -s arch/arm/Kconfig
    make[2]: execvp: scripts/kconfig/conf: Permission denied
    make[2]: *** [silentoldconfig] Error 127
    make[1]: *** [silentoldconfig] Error 2
      CHK     include/linux/version.h
    make[1]: `include/asm-arm/mach-types.h' is up to date.
    make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.

After fixing this by allocating permissions to appropriate directories i am getting this.

lares@lares-Inspiron-1545:~/android_kernel$ make ARCH=arm  CROSS_COMPILE=/home/lares/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
    scripts/kconfig/conf -s arch/arm/Kconfig
      CHK     include/linux/version.h
    make[1]: `include/asm-arm/mach-types.h' is up to date.
      CHK     include/linux/utsrelease.h
      UPD     include/linux/utsrelease.h
      SYMLINK include/asm -> include/asm-arm
      CC      kernel/bounds.s
    arm-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
    make[1]: *** [kernel/bounds.s] Error 1
    make: *** [prepare0] Error 2

Can someone please help me out here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光暖心i 2024-11-26 12:08:46

未设置 /home/lares/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gcc 的部分(或全部)路径的权限用于读取和执行。

如果您具有 root 访问权限,请检查每个路径组件并进行适当调整。否则,请让您的系统管理员修复它。

以此作为最初的问题,其余交叉开发工具(包括头文件和库)存在其他权限问题的可能性相当高。

The permission for some (or all of) the path to /home/lares/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gcc is not set for read plus execute.

If you have root access, check each path component and adjust appropriately. Otherwise, get your sysadmin to fix it.

With that as the initial problem, the odds are rather high that there are other permission issues with the rest of the cross development tools, including the header files and libraries.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文