Skip to content

pack: main reproduces the tested payload (pack_strip skips npu/kernels; lemond ships with no RUNPATH) - #3297

Merged
bong-water-water-bong merged 2 commits into
mainfrom
pack/strip-skips-npu-kernels
Nov 22, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
pack/strip-skips-npu-kernels

Conversation

@bong-water-water-bong

@bong-water-water-bong bong-water-water-bong commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #3287. Both found rebuilding the stick from main tonight; each is a step the tested v2026.47-fixes payload passed only through a hand edit.

1. pack_strip skips npu/kernels. #3281 kept NPU kernel sets out of pack_localize but not out of pack_strip. package-linux.sh on main over a build carrying the signed sets fails:

strip: Unable to recognise the architecture of the input file `.../npu/kernels/2560x9728x32x8/c36e/layer1.elf'
package-linux failed

Had host strip read it, it would have changed bytes the set's signed manifest covers. The c34 cut passed only because its cut tree carried a local edit of this loop. Same guard #3281 added to pack_localize.

2. build-lemonade.sh removes the RUNPATH from lemond and lemonade. Lemonade's CMake sets /usr/local/lib, a build-host directory, and the release check's payload-runpath row fails on it. The lemond that passed 38/38 on the hardware tonight had it removed by hand.

Checked: bash -n on both; with this branch, package-linux.sh packages the c34 build tree (engine 1bit byte-identical to the tested one, 7b534949), and patchelf --remove-rpath leaves both Lemonade binaries with no RUNPATH entry.

🤖 Generated with Claude Code

…ELF (engine#3287)

#3281 kept NPU kernel sets out of pack_localize but not out of pack_strip. On engine main, package-linux.sh over a
build with the signed sets fails: 'strip: Unable to recognise the architecture of the input file
.../npu/kernels/2560x9728x32x8/c36e/layer1.elf'. Had strip read it, it would have changed bytes the set's manifest
signs. The c34 cut passed only through a local edit of this loop in its cut tree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 62efa15)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

3287 - Fully compliant

Compliant requirements:

  • Pack strip skips npu/kernels to prevent strip from corrupting signed kernel sets
  • Build-lemonade removes RUNPATH from lemond and lemonade binaries to pass release checks
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Correctness

The fix correctly prevents strip from being applied to NPU kernel ELF files, which are not host ELF files and cannot be processed by the host's strip utility. This prevents potential corruption of signed kernel sets and aligns with the behavior already implemented in pack_localize.

case "$f" in */npu/kernels/*) continue ;; esac
Correctness

The fix correctly removes the RUNPATH from both lemond and lemonade binaries, ensuring they pass the release check's payload-runpath validation. This prevents issues with build-host-specific paths being embedded in the binaries.

for b in lemond lemonade; do
    if readelf -d "$prefix/bin/$b" 2>/dev/null | grep -qE 'R(UN)?PATH'; then patchelf --remove-rpath "$prefix/bin/$b"; fi
done

Lemonade's CMake sets RUNPATH /usr/local/lib on both binaries. That names a build-host directory, and the release
check's payload-runpath row fails on it. The lemond tested 38/38 on the AI MAX+ 395 tonight had it removed by hand;
main now does the same, so a payload built from main matches the one that was tested.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bong-water-water-bong bong-water-water-bong changed the title pack-elf: pack_strip skips npu/kernels (an AIE kernel is not a host ELF) pack: main reproduces the tested payload (pack_strip skips npu/kernels; lemond ships with no RUNPATH) Nov 22, 2026
@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 62efa15

@bong-water-water-bong
bong-water-water-bong merged commit d89673a into main Nov 22, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the pack/strip-skips-npu-kernels branch November 22, 2026 09:24
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