android-source - 在 MacOS M1 上构建 AOSP

标签 android-source macos-big-sur apple-m1

我想在装有 Big Sur 的 MacOS M1 (ARM64) 上尝试一下 AOSP,但看起来该主机没有配置构建。

当我查看 build/soong/cc/config 时,我只看到一个 Darwin 相关文件,即 x86_darwin_host.go

使用最新的 aosp 版本,即 android-11.0.0_r35,我可以构建通用的 arm64 目标,但生成的模拟器无法启动。配置显示主机被检测为 x86_64,实际上生成的二进制文件是 x86_64 格式。

total 0
drwxr-xr-x  3 salvatorebenedetto  staff  102 Apr 10 15:21 common
drwxr-xr-x  9 salvatorebenedetto  staff  374 Apr 10 15:21 darwin-x86
➜  aosp file out/host/darwin-x86/lib64/libc++.dylib 
out/host/darwin-x86/lib64/libc++.dylib: Mach-O 64-bit dynamically linked shared library x86_64
➜  aosp 

这是我从内核启动模拟器时得到的结果

RAMDISK: lz4 image found at block 0
RAMDISK: lz4 decompressor not configured!
Invalid ramdisk decompression routine.  Select appropriate config option.
Kernel panic - not syncing: Could not decompress initial ramdisk image.
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.94+ #1
Hardware name: ranchu (DT)
Call trace:
[<ffffffc00008a590>] dump_backtrace+0x0/0x128
[<ffffffc00008a6cc>] show_stack+0x14/0x1c
[<ffffffc0005ca064>] dump_stack+0x80/0xa4
[<ffffffc0005c95a0>] panic+0xe8/0x228
[<ffffffc00074ba34>] rd_load_image+0x2fc/0x5e0
[<ffffffc00074be30>] initrd_load+0x50/0x2cc
[<ffffffc00074b47c>] prepare_namespace+0xd8/0x1ac
[<ffffffc00074ad04>] kernel_init_freeable+0x1bc/0x1dc
[<ffffffc0005c8150>] kernel_init+0x10/0xf4
Rebooting in 5 seconds..Reboot failed -- System halted

知道如何调试 initrd 镜像的问题吗?

最佳答案

我认为this应该有帮助,它有一个专门用于设置缺少的 sdk 10.15 的和平协议(protocol)。

祝你好运,请告诉我们它是否对你有用!

关于android-source - 在 MacOS M1 上构建 AOSP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66721487/

相关文章:

numpy - opencv-python 在苹果 m1 芯片中编译失败

android - AOSCompiler出现错误-CM10-Galaxy Nexus/maguro

android - 如何像 git-archive 一样归档 AOSP 存储库?

android - Android 中 com.android.internal.telephony.Call 类的 OEM/Google 实现

android - AOSP构建错误

vagrant - 在 MacOs Big Sur 升级时遇到 Vagrant Up 错误

Python/pip 进程在 virtualenv(Apple M1 芯片)中被杀死

Matplotlib 段错误 Mac OS 11(Big Sur)

macos-big-sur - 我无法在 macOS Big Sur 上运行 `git gui`

python - 如何在 Apple M1 芯片上导入 Pandas