zoukankan      html  css  js  c++  java
  • Notes about compiling android kernel source on Mac OS Lion

    Simply following google's official online documentation can't build the android kernel source easily, here are some notes to build it succeed, all is from my own experiments and testing.

    1. "elf xxx" error as below:

    The solution is about adding a "elf.h" file, and some slight changes on another 2 files:

    Step1: add a file: "elf.h" to /kernel repository/scripts/mod/

    Step2: change #include <elf.h> to #include "elf.h" in the following files in /kernel repository/scripts/mod/: mk_elfconfig.c and modpost.h

    2. Toolchan issue, the google's doc says we should use "export PATH=$(pwd)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH" before building, but it doesn't say it is for linux:) Luckly, if you look into the source code folder structure "prebuilts", you'll find something about "darwin", that's about mac os!!!, so we should replace the "linux-x86" with "darwin-x86".

    Finally the compiler is happy, and we get the goldfish emulator work with my kernel:

  • 相关阅读:
    Codeforces Round #365 Div.2
    Codeforces Round #363 Div.2[111110]
    花花的礼物 (huahua)
    FOI2019算法冬令营D1
    树(tree)
    noip2018
    1972: 最短路(shortest)
    2462: 收集(collecting)
    1282: 排列计数 perm
    1425: 数列(seq)
  • 原文地址:https://www.cnblogs.com/swnuwangyun/p/3001791.html
Copyright © 2011-2022 走看看