Custom Android Emulator kernel

Take Android9 x86-64 kernel compilation as an example

Download Source code

1
2
3
$ repo init --depth 1 -u https://mirrors.bfsu.edu.cn/git/AOSP/kernel/manifest \
-b p-goldfish-android-goldfish-4.4-dev
$ repo sync -c --no-tags

Custom config

1
$ BUILD_CONFIG=goldfish/build.config.goldfish.x86_64 LTO=thin build/config.sh

After executing config.sh, the goldfish/arch/x86/configs/x86_64_ranchu_defconfig file will be modified.

Build

1
$ BUILD_CONFIG=goldfish/build.config.goldfish.x86_64 LTO=thin build/build.sh -j20

gen the kernel file: ./out/x86_64/dist/bzImage

Run

Run as previous post: Install Android SDK and run emulator in linux

1
$ emulator ... -qemu -kernel ./out/x86_64/dist/bzImage ...

Custom Android Emulator kernel
https://hqw700.github.io/2024/04/08/2024-04-08-custom-android-emulator-kernel/
发布于
2024年4月8日
许可协议