Notes about compiling Android kernel source on Mac OS lion

Source: Internet
Author: User

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:

Step 1: Add a file: "elf. H" to/kernel repository/scripts/MoD/

Step 2: 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 shocould 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 shoshould Replace the "linux-x86" with "darwin-x86 ".

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.