Skip to content

examples/elf: extend nxpkg validation coverage#3531

Draft
aviralgarg05 wants to merge 1 commit into
apache:masterfrom
aviralgarg05:gsoc/elf-validation-fixtures-pr4
Draft

examples/elf: extend nxpkg validation coverage#3531
aviralgarg05 wants to merge 1 commit into
apache:masterfrom
aviralgarg05:gsoc/elf-validation-fixtures-pr4

Conversation

@aviralgarg05
Copy link
Copy Markdown

Summary

This patch is another smaller upstream slice being extracted from the ongoing GSoC 2026 Dynamic ELF loading and nxpkg work for NuttX.

An earlier draft PR (#3474) carries the initial nxpkg package lifecycle helper. This PR is the examples/elf validation-fixture follow-up from the same broader effort.

Series order for this PR:

The change extends the examples/elf ROMFS path so nxpkg validation can use generated package fixtures instead of hand-managed metadata.

Concretely, it:

  • generates index.json, bad-index.json, pkgtest.nsh, and pkgfail.nsh from the built hello ELF
  • records the correct target arch / compat metadata and SHA-256 digest for the valid fixture
  • keeps mismatched-target and missing-artifact cases alongside the valid fixture so nxpkg target selection and failure handling can be exercised from the same example tree
  • groups the paired fixture outputs in one make step so parallel builds do not re-enter the generator independently

Impact

This makes the examples/elf side of the Dynamic ELF / nxpkg series easier to validate and reproduce.

It keeps the fixture metadata tied to the actual built hello artifact, instead of relying on manually maintained hashes or ad hoc shell setup. That should make follow-up review and later test reruns more predictable.

There is no intended loader or board-behavior change in this patch. It is limited to fixture generation inside examples/elf.

Testing

Host:

  • macOS 26.5
  • Apple Silicon (arm64)
  • xtensa-esp-elf-gcc (crosstool-NG esp-14.2.0_20241119) 14.2.0
  • esptool.py v4.11.0

Focused stacked verification for this PR:

  • clean detached apps worktree at the current #3474 head, with this two-file patch applied
  • clean detached companion apache/nuttx worktree at local 294d6d2763 (boards/xtensa/esp32s3/xiao:sotest: enable nxpkg fixtures), which carries the matching esp32s3-xiao:elf configuration used for the series
  • target: xtensa
  • config: esp32s3-xiao:elf

Build steps:

./tools/configure.sh -E -a ../apps esp32s3-xiao:elf
make olddefconfig
make -j8

Generated fixture artifacts:

bin/index.json
bin/bad-index.json
bin/pkgtest.nsh
bin/pkgfail.nsh

Build result:

LD: nuttx
CP: nuttx.hex
MKIMAGE: ESP32-S3 binary
Generated: nuttx.bin

Branch sanity build:

  • the same companion apache/nuttx worktree was also paired directly with this PR branch to confirm the slice still builds cleanly outside the stacked #3474 setup

Sanity-build result:

LD: nuttx
CP: nuttx.hex
MKIMAGE: ESP32-S3 binary
Generated: nuttx.bin

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant