Add preflight automation for Tab5 builds#170
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| echo "[preflight] Using repo installer to setup ESP-IDF..." | ||
| bash tools/install_idf.sh | ||
|
|
||
| echo "[preflight] Fetching external components..." | ||
| python ./fetch_repos.py | ||
|
|
||
| echo "[preflight] Building Tab5 app (esp32p4)..." | ||
| pushd platforms/tab5 >/dev/null | ||
| idf.py set-target esp32p4 | ||
| idf.py build |
There was a problem hiding this comment.
[P1] Source IDF installer so subsequent idf.py invocations work
The preflight script runs bash tools/install_idf.sh and then immediately calls idf.py to build. Because the installer is executed in a subshell, any environment variables or PATH changes made inside it (via export.sh) are discarded when the command returns. On a fresh machine where ESP‑IDF is not already on PATH, the later idf.py set-target/idf.py build calls will fail with idf.py: command not found. The install script needs to be sourced (e.g. . tools/install_idf.sh) or refactored to emit environment variables so that idf.py is usable in the remainder of the preflight run.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Summary
- Sourced the ESP-IDF installer within the preflight script so environment setup persists for the subsequent
idf.pycommands. scripts/preflight.shL7-L9
Testing
- ✅
bash -n scripts/preflight.sh
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68cf23f8f4ac832496701d6f07d02687