How to compile android goldfish 3.4 kernel and run on emulator

后端 未结 1 1353
情话喂你
情话喂你 2020-12-28 10:14

First let me tell you that I am working on MAC with OS X 10.7.5. I am trying to compile Goldfish 3.4 kernel and run it on emulator. It compiles alright but when I run it the

相关标签:
1条回答
  • 2020-12-28 10:52

    The target "goldfish_defconfig" configures the kernel for an ARM 926 but the now the emulator is configured to run on cortex A8 which is a armv7 architecture. You should use "goldfish_armv7_defconfig" instead.

    Follow these steps to build a 3.4 kernel for emulator

    git clone https://android.googlesource.com/kernel/goldfish.git
    git checkout -t origin/android-goldfish-3.4 -b goldfish3.4
    
    make ARCH=arm goldfish_armv7_defconfig
    make ARCH=arm SUBARCH=arm CROSS_COMPILE=/Volumes/androidSpace/android_work/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.6/bin/arm-eabi-
    

    This should build a 3.4 kernel which you can then run like this (I am assuming your directory structure has default sdk ramdisk.img)

    ./emulator -debug init -kernel /Volumes/androidSpace/goldfish/goldfish/arch/arm/boot/zImage -system /Volumes/androidSpace/android_work/out/target/product/generic/system.img -ramdisk /Volumes/androidSpace/android_work/out/target/product/generic/ramdisk.img -avd firstAvd -wipe-data
    

    Try this out and let us know

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题