zoukankan      html  css  js  c++  java
  • 使用 qemu 模拟器运行 aosp(基于 x86-64 Linux 内核)

    环境准备

    • curlwgetgit命令可用
    • repo命令可用

    android emulator

    下载

    mkdir emu-2.5-release
    cd emu-2.5-release
    repo init -u https://android.googlesource.com/platform/manifest -b emu-2.5-release
    repo sync -j 4 # 4为并行线程数,根据机器自行调整
    

    编译

    cd external/qemu
    ./android/rebuild.sh --no-tests
    

    android kernel

    下载

    git clone https://android.googlesource.com/kernel/goldfish
    cd goldfish
    git checkout android-goldfish-4.4-dev
    

    编译

    make O=build x86_64_ranchu_defconfig
    make O=build bzImage -j 4 # 4为并行线程数,根据机器自行调整
    

    aosp

    下载

    mkdir aosp
    cd aosp
    repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r42
    repo sync -j 4 # 4为并行线程数,根据机器自行调整
    

    编译

    source build/envsetup.sh
    lunch aosp_x86_64-eng
    m -j 4 # 4为并行线程数,根据机器自行调整
    

    启动

    sudo chown $USER /dev/kvm
    /path/to/emu-2.5-release/external/qemu/objs/emulator -cores 8 -show-kernel -no-snapshot -memory 8192 -kernel /path/to/goldfish/build/arch/x86/boot/bzImage
    

    本文来自博客园,作者:Legend_Lone,转载请注明原文链接:https://www.cnblogs.com/sun-ye/p/14992194.html

  • 相关阅读:
    English trip V1
    English trip V1
    第一类斯特林数
    bzoj 3601 一个人的数论
    bzoj 4407 于神之怒加强版
    bzoj 2693 jzptab
    bzoj 4184 shallot
    luogu P3920 [WC2014]紫荆花之恋
    bzoj 4269 再见Xor
    luogu P2183 [国家集训队]礼物
  • 原文地址:https://www.cnblogs.com/sun-ye/p/14992194.html
Copyright © 2011-2022 走看看