Skip to content

docs: add macOS (Apple Silicon) quick start guide - #626

Open
onecer wants to merge 1 commit into
open-vela:dev-ai-contest-2026from
onecer:docs/macos-quick-start
Open

docs: add macOS (Apple Silicon) quick start guide#626
onecer wants to merge 1 commit into
open-vela:dev-ai-contest-2026from
onecer:docs/macos-quick-start

Conversation

@onecer

@onecer onecer commented Jul 13, 2026

Copy link
Copy Markdown

What

新增 macOS(Apple Silicon)快速上手文档,与现有《快速入门(Ubuntu)》对应,覆盖依赖安装、repo 同步、编译到运行 Vela Emulator 的完整流程。中英双语(zh-cn/en/)。

Why

openvela 的 build.sh/emulator.sh/envsetup.sh 已内置 Darwin 分支,manifest 也提供完整的 darwin-aarch64 预编译工具链,可在 macOS 上原生开发,但文档此前只覆盖 Ubuntu。

macOS 与 Ubuntu 的主要差异(文档均已说明)

  • repo init 需显式追加 -g default,platform-darwin,否则 darwin 预编译工具链不被同步。
  • 用 Homebrew 安装 GNU 版 bash(5.x)/grep/coreutils/gnu-sed 并前置 PATH(declare -A/grep -oP/realpath --relative-to/sed -i 等依赖)。
  • prebuilts/tools/cmake/bin 为 Linux ELF,需符号链接到 prebuilts/cmake/darwin-aarch64
  • jidl_gen_cpp 为 Linux 二进制,通过 Docker(linux/amd64)运行。
  • quickjs host 工具需一处 CMakeLists.txt 补丁(CMAKE_HOST_APPLE → clang 分支 + -include sys/types.h)。
  • -j$(nproc)-j$(sysctl -n hw.ncpu);ffmpeg 首次 out-of-tree 构建目录顺序由 build-macos.sh 自动重试覆盖。

附带 macos-env.shbuild-macos.sh 两个幂等辅助脚本。

验证

已在 macOS(Apple Silicon)端到端验证:repo sync → 编译 goldfish-arm64-v8a-ap(产出 nuttx/nuttx.bin)→ emulator.sh 引导至 goldfish-armv8a-ap> 提示符。

@onecer
onecer requested review from a team as code owners July 13, 2026 13:46
@github-actions

Copy link
Copy Markdown

❌ CLA Signature Required

@onecer Some contributors need to sign the CLA:

  • yinyongyou@tenclass.comNeeds to sign CLA

Please:

  1. Sign the CLA at: https://www.openvela.com/#/community/cla
  2. After signing, comment /check-cla to recheck

📋 View detailed check results: Action Run #29255109162


💡 Tip: All contributors must sign the CLA before the PR can be merged.

Mirror the Ubuntu quick start for macOS on Apple Silicon: repo init with
-g default,platform-darwin, GNU toolchain via Homebrew, cmake/jidl host
adaptations, and the quickjs host build patch. Includes zh-cn and en, with
macos-env.sh / build-macos.sh helper scripts. Verified end-to-end: build
goldfish-arm64-v8a-ap and boot the emulator to the goldfish-armv8a-ap> prompt.
@onecer
onecer force-pushed the docs/macos-quick-start branch from 730126c to 0164f72 Compare July 13, 2026 14:01
@github-actions

Copy link
Copy Markdown

❌ CLA Signature Required

@onecer Some contributors need to sign the CLA:

  • yinyongyou@gmail.comNeeds to sign CLA

Please:

  1. Sign the CLA at: https://www.openvela.com/#/community/cla
  2. After signing, comment /check-cla to recheck

📋 View detailed check results: Action Run #29256157820


💡 Tip: All contributors must sign the CLA before the PR can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant