Skip to content

Remove two compile-time switches that no build sets (-20) - #367

Closed
RyanTheTide wants to merge 1 commit into
mainfrom
deadweight/unset-build-switches
Closed

RyanTheTide wants to merge 1 commit into
mainfrom
deadweight/unset-build-switches

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

Two preprocessor switches are never defined by any build:

  • ESP_BOOT_HOST in src/sptm_virt_esp.c (62f365b) swaps the includes for esp_boot_host.h, a host harness under tests/esp_boot_host that was never committed on any branch. Setting it can only break the build.
  • AFK_TRACE in src/afk.c and src/dcp_iboot.c (841cbef) wraps four message hexdumps. No Makefile option, CI job, doc, test, kit or release build defines it.

Change

Remove both switches and the code under them. Net: -20 lines.

Testing

  • Clean builds of main 5c70a29 and this branch in the same five configurations as the rest of this series (dev, Stage 1 release, ESP Stage 2 release, secure flavour with enforce, SPTM-virt ESP). All link, sizes are unchanged, and the warning lists match main's exactly.
  • pytest tests/python: 746 passed, 2 failed, 27 skipped, the same as main (the 2 failures are test_loadobjs.py, where the buildbox's nm lists two symbols that share an address in the other order).

Still to run

No hardware row: the removed code was compiled out of every image.

Evidence
$ git log --all --oneline -S esp_boot_host
62f365b8 sptm_virt: boot macOS from the ESP on T6050, with no host (SPTM_VIRT_ESP)   # the only commit; no esp_boot_host.h anywhere
$ git grep -n 'AFK_TRACE'
src/afk.c:767,920,1080  src/dcp_iboot.c:216   (only the #ifdefs)
$ git log --all --oneline -S AFK_TRACE
841cbef6 display: Add guarded T8152 USB-C DisplayPort bring-up

None of the open aura PRs references either switch. Logs: traces/boot/20261120-deadweight-boot/ on the lab S500.

Assisted-by: LLM (Claude:Opus 5.5)

- ESP_BOOT_HOST (sptm_virt_esp.c, from 62f365b) swaps in
  "esp_boot_host.h" for a host test harness under tests/esp_boot_host.
  That harness was never committed on any branch, so the switch can
  only break the build.
- AFK_TRACE (afk.c, dcp_iboot.c, from 841cbef) wraps four AFK and
  DCP iBoot message hexdumps. No Makefile option, CI job, doc, test or
  release build defines it.

The images built without either switch are unchanged in behaviour.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Folded into #371 together with the other removals, one commit per set.

@RyanTheTide
RyanTheTide deleted the deadweight/unset-build-switches branch November 19, 2026 16:40
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