Skip to content

aarch64: integrate M1 Air Wi-Fi and complete debug/production kernel build milestone - #172

Open
medvednikov wants to merge 3 commits into
masterfrom
wifi/m1-air-build
Open

aarch64: integrate M1 Air Wi-Fi and complete debug/production kernel build milestone#172
medvednikov wants to merge 3 commits into
masterfrom
wifi/m1-air-build

Conversation

@medvednikov

Copy link
Copy Markdown
Member

Scope

Complete the integrated ARM64 build milestone, not a claim of working Wi-Fi or Internet access. Based on current master d87e6fea15759f943072611ef357c2170e97f21b; the new head is 1610868315cf6ef040ff6a732ec3f340ed1e93bf.

The experimental BCM4378 transport, J313 PCIe/DART adapter and /dev/wlan0 control/raw-Ethernet interface are now included in the real kernel build. Console initialization and polling are connected without removing UART, VirtIO or SPI-keyboard handling. Probing remains opt-in with vinix.apple_wifi=1; no proprietary firmware is included.

Fixes include typed user-copy addresses, unavailable freestanding C dependencies and host-test header search paths. A separate prerequisite commit contains four minimal V compatibility fixes in the existing ANS wrappers exposed by building current master; no storage features were removed or stubbed.

Validation completed locally

  • Clean debug AND production ARM64 kernel V-to-C generation, C/assembly compilation and final ld.lld link succeed.
  • Both results are static AArch64 ET_EXEC images with no undefined symbols; all 18 required Wi-Fi symbols survive linker garbage collection, and real initialization/polling call sites are verified.
  • 24 protocol test groups plus 7 simulated-platform policy groups pass with Clang ASan/UBSan and optimized GCC, including 100,000 parser mutations.
  • All 10 positive/negative build-verifier tests pass against the actual linked production image.
  • All 17 SPI-keyboard regression groups pass.
  • Both production driver C components compile against kernel freestanding headers using -Wall -Wextra -Werror; the control utility host build also passes.
  • The complete uploaded kernel subtree 82d45547b734ea3672875494a6b3030b19c778fd, test subtree and tool subtree match the tested local sources. Existing unrelated master content is preserved.

Local kernel SHA-256:

3e133fae22de589178c5bf4f781478022f2d6434501d997bf8c4e5d7276787ea  vinix-aarch64-debug.elf
de592ff17569ccbf47cece6a52e85e3136aa67edb37134820884d21c6c59c7a6  vinix-aarch64-production.elf

Toolchain: pinned V1 71437d263bfc57f99e27588781f34bfc91746910, bootstrap VC 99e94ae6099edabce1c6d621eca4c4904e3c2324; local Clang/LLD 17. Existing kernel/V notices and third-party warnings remain. Debug hashes may differ across toolchain versions or absolute build paths.

Reproduce

In a disposable Linux checkout with Clang, LLD, GCC, make, git, curl and Python 3:

sh tools/m1-wifi/get-v.sh /tmp/vinix-wifi-v
(cd kernel && ./get-deps)
CC=clang SANITIZE=1 sh tests/m1-wifi/run.sh
CC=gcc SANITIZE=0 sh tests/m1-wifi/run.sh
CC=clang sh tests/apple-spi-keyboard/run.sh
V=/tmp/vinix-wifi-v/v JOBS=2 sh tests/m1-wifi/build.sh

The build script saves full logs, verification output, both ELF images and checksums under tests/m1-wifi/out/. The added GitHub Actions workflow runs these checks and uploads artifacts; its result is separate from the completed local validation.

Still unverified / not implemented

Physical M1 boot, firmware startup, WPA2 authentication and packet transfer remain untested. There is no IPv4/IPv6 stack, DHCP/DNS integration or AF_INET socket implementation. Target userspace execution of wifi-ctl is also unverified. These are kernel-only build artifacts, not a completed boot image or hardware qualification. Keep a known-working boot entry. Full limitations and bring-up instructions are in tests/m1-wifi/README.md.

Use the errno API's u64 type, preserve the guarded/locked pointer-map
lookup, pass dynamic buffer data directly to C, and give tos a byte
pointer. These four compatibility fixes preserve storage behavior and
allow the current master kernel to compile with the pinned V1 compiler.
No subsystem is stubbed or compiled out to obtain the build result.
…d milestone

Add the BCM4378 FullMAC transport, J313 PCIe/DART platform adapter, checked
/dev/wlan0 UAPI, firmware packager and control utility. Wire initialization
and polling into the ARM64 console without removing UART, VirtIO or SPI
keyboard handling. Hardware access remains opt-in: vinix.apple_wifi=1.
No proprietary firmware is included.

Resolve V user-copy pointer types and freestanding C dependencies found by
real integrated builds. Add pinned V1 bootstrap, clean debug/production
build acceptance, ELF/symbol/call-site verification, negative verifier tests
and a dedicated CI workflow. Host tests use quote-only kernel include paths.

Validation completed locally against the exact current-master kernel tree:
- clean debug AND production ARM64 kernels fully compile and link;
- static AArch64 executables, no unresolved symbols, 18 retained Wi-Fi
  symbols and actual initialization/polling hooks verified;
- 24 protocol plus 7 platform-policy groups pass with Clang ASan/UBSan and
  optimized GCC, including 100000 parser mutations;
- 10 build-verifier tests and all 17 SPI keyboard regression groups pass;
- both production driver C files compile with freestanding headers/Werror;
- host control utility compiles with Werror.
Uploaded kernel/tests/tools subtrees match the tested local sources.

This completes the BUILD milestone, not end-to-end networking. Physical M1
boot, firmware startup, WPA2 authentication and packet transfer are untested.
IPv4/IPv6, DHCP/DNS and AF_INET sockets remain separate unfinished work.
Keep the existing working boot entry; these are kernel-only build artifacts.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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