[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M787RKC1K2A690WSZJFF1MRF":3,"skill-same:01M787RKC1K2A690WSZJFF1MRF":94},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":14,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M787RKC1K2A690WSZJFF1MRF","jetson-build-source",null,"Use when you need to rebuild the BSP overlay — DT, OOT modules, or kernel — from changes under bsp_sources\u002F. Triggers: build bsp, rebuild dtb, rebuild kernel.","Solizardking\u002Ftrain2earn","Solizardking","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F108096810?v=4","01M786KDB10AYV042N0F9BD5B5","Clawd","01M786KDC5C3NPE4W44C5641EZ",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: jetson-build-source\ndescription: >-\n  Use when you need to rebuild the BSP overlay — DT, OOT modules,\n  or kernel — from changes under bsp_sources\u002F. Triggers: build\n  bsp, rebuild dtb, rebuild kernel.\nversion: 0.0.1\nlicense: \"Apache-2.0\"\nargument-hint: \"dt | oot | kernel | full\"\nmetadata:\n  data-classification: public\n  author: \"Jetson Team\"\n  team: pts\n  tags:\n    - bsp\n    - build\n  domain: meta\n---\n\n# Build BSP Source\n\n## Purpose\n\nRebuild the kernel-side artifacts (DTBs, OOT modules, in-tree\nmodules, kernel `Image`) implied by changes under\n`\u003Csource.root_path>\u002Fbsp_sources\u002F`, and write a manifest that\n`\u002Fjetson-promote-image` reads to stage those outputs into the BSP\nimage. The skill never writes into `\u003Cbsp_image.root_path>` itself.\n\n## Prerequisites\n\n- Active target-platform profile with `bsp_image:` and\n  `source.toolchain:` resolved (run `\u002Fjetson-init-image` and\n  `\u002Fjetson-init-source` first).\n- `\u003Csource.root_path>\u002Fbsp_sources\u002F` populated with the kernel-side\n  checkout layout `\u002Fjetson-init-source` materializes.\n- `\u003Cbsp_image.root_path>\u002FLinux_for_Tegra\u002Fsource\u002Fkernel_src_build_env.sh`\n  present (extracted from `public_sources.tbz2`).\n- Host packages: `flex`, `bison`, `libssl-dev` (hard); `git`,\n  `build-essential`, `bc`, `zstd` (warn-only).\n- Cross-toolchain at `${source.toolchain}gcc` resolvable on disk.\n\n## Overview\n\nThis skill is the **Build** stage of the workflow — see\n[`..\u002F..\u002Fcontext\u002Fbsp-customization-workflow.md`](..\u002F..\u002Fcontext\u002Fbsp-customization-workflow.md)\nfor where it sits in the Setup → Customize → Build → Deploy pipeline\nand what triggers it. The skill takes source-side customization\ncommits, rebuilds the implied artifacts, and records which were\nrebuilt in a manifest. Outputs stay in-tree under\n`\u003Csource.root_path>\u002Fbsp_sources\u002F`;\n[`jetson-promote-image`](..\u002Fjetson-promote-image\u002FSKILL.md) reads the\nmanifest at Deploy to copy each rebuilt artifact into the matching\npath under `\u003Cbsp_image.root_path>\u002FLinux_for_Tegra\u002F`.\n\nOverlay-only edits (`nvpmodel.conf`, `nvfancontrol.conf`, BPMP DTB)\nskip Build — `customize-*` stages them directly to the overlay\ntracker; BPMP DTB uses the `dtc` decompile → edit → recompile loop in\n[`..\u002F..\u002Freferences\u002Fbsp-customization-bpmp-dtb.md`](..\u002F..\u002Freferences\u002Fbsp-customization-bpmp-dtb.md).\n\n**Custom-overlay slot ownership.** Kernel-DT customizations from\nevery customize-* skill collect into a single composite\n`tegra\u003Csoc>-\u003Ccarrier-id-sku>+\u003Cmodule-id>-xxxx-custom.dts` per\nactive target — see\n[`..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md`](..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md)\nfor the filename \u002F location \u002F append protocol. This skill is the\n**sole owner** of the composite's per-dir Makefile registration\n(`dtbo-y += \u003Cname>.dtbo`) and the carrier flash conf's\n`OVERLAY_DTB_FILE+=` line (the \"Register composite custom overlay\" step).\n\n**Four build modes** matched to the dirty-repo profile:\n\n| Mode | What's built | Auto-picks when |\n|---|---|---|\n| **dt** | NVIDIA DTBs only | only `hardware\u002Fnvidia\u002F*` or `kernel-devicetree` dirty |\n| **oot** | OOT modules (six repos) | only OOT repos dirty |\n| **kernel** | Kernel `Image` + full in-tree `.ko` set + kernel-side dtbs | only `kernel\u002F$KERNEL_SRC_DIR` dirty |\n| **full** | Everything above + optional install consolidation | mixed dirty set |\n\nMode selection: **auto** (default — invoke `\u002Fjetson-build-source`\nwith no argument) walks the dirty-repo set; force a specific mode\nby passing it as the skill argument.\n\n**Design principle: delegate to upstream.** Every build primitive\nalready exists in `\u003Cbsp_image.root_path>\u002FLinux_for_Tegra\u002Fsource\u002F`\n— the env file, top-level Makefile (`nvidia-dtbs` \u002F `modules` \u002F\n`modules_install`), kernel Makefile (`kernel` \u002F `install`). The\nskill drives those primitives against\n`\u003Csource.root_path>\u002Fbsp_sources\u002F` — never duplicates their\nlogic in shell.\n\n## When to invoke\n\n- **Auto-chained** at the end of a Customize `customize-*` invocation\n  whenever Customize committed to a kernel-side source repo.\n- **Manual re-run** via `\u002Fjetson-build-source [\u003Cmode>]` when:\n  - the auto-chained build was interrupted,\n  - source commits arrived via `git pull` from other users,\n  - the user wants to force a rebuild without a fresh edit,\n  - the user wants a specific mode (e.g. install consolidation for\n    a manual scp deploy to a DUT).\n\n## Instructions\n\n### Resolve active target + paths + upstream env\n\nResolve the active profile per\n[`..\u002F..\u002Fcontext\u002Ftarget-platform-contract.md`](..\u002F..\u002Fcontext\u002Ftarget-platform-contract.md).\nRefuse and route in these cases:\n\n| Condition | Route to |\n|---|---|\n| No active profile, or `active: NA` | `\u002Fjetson-set-target` or `\u002Fjetson-init-target` |\n| Profile lacks `bsp_image:` | `\u002Fjetson-init-image` |\n| Profile lacks `source.toolchain:` | `\u002Fjetson-init-source` |\n| `\u003Csource.root_path>\u002Fbsp_sources\u002F` missing or empty | `\u002Fjetson-init-source` |\n| `\u003Cbsp_image.root_path>\u002FLinux_for_Tegra\u002Fsource\u002Fkernel_src_build_env.sh` missing | `\u002Fjetson-init-image` (BSP not properly extracted) |\n\nBind:\n\n```bash\nWORKSPACE=\u003Cparent of target-platform\u002F>\nBSP_SRC=\u003Cbsp_image.root_path>\u002FLinux_for_Tegra\u002Fsource   # NVIDIA's build primitives\nKS=\u003Csource.root_path>\u002Fbsp_sources                      # our kernel-side checkout\nKOUT=\u003Csource.root_path>\u002F.build\u002Fkernel-out              # DT-mode out-of-tree build dir\nSTAGE=\u003Csource.root_path>\u002F.build\u002Finstall-stage          # install consolidation (full mode \u002F opt-in)\nSTATE=\u003Csource.root_path>\u002F.build-state.yaml             # per-repo watermark\nMANIFEST=\u003Csource.root_path>\u002F.build-manifest.yaml       # rebuilt-artifact list for jetson-promote-image\n```\n\n**Source the NVIDIA build env** to inherit canonical names — never\nhardcode `kernel-noble`, the OOT module list, or `KERNEL_DEF_CONFIG`:\n\n```bash\nsource \"$BSP_SRC\u002Fkernel_src_build_env.sh\"\n# Now in scope: KERNEL_SRC_DIR (e.g. kernel-noble), KERNEL_DEF_CONFIG,\n# OOT_SOURCE_LIST, kernel_name (e.g. noble), KERNEL_MODULAR_BUILD\n```\n\nRefuse if `$KS\u002Fkernel\u002F$KERNEL_SRC_DIR\u002F` is missing or if any name\nin `$OOT_SOURCE_LIST` is missing under `$KS\u002F`. Route to\n`\u002Fjetson-init-source`.\n\n### Resolve toolchain (read-only)\n\nRead `source.toolchain` from the active profile (authored by\n`jetson-init-source`). Validate:\n\n```bash\nexport ARCH=arm64\nexport CROSS_COMPILE=\u003Csource.toolchain>   # trailing dash mandatory\n[ -f \"${CROSS_COMPILE}gcc\" ] || refuse \\\n  \"source.toolchain points at ${CROSS_COMPILE}gcc which does not exist. Re-run \u002Fjetson-init-source.\"\n```\n\nA trailing dash on `CROSS_COMPILE` is mandatory — kbuild treats it\nas a prefix (`${CROSS_COMPILE}gcc`); a missing dash breaks with\n`command not found`. The `[ -f ]` check catches it before any\n`make` runs.\n\nThis skill **never** prompts for the toolchain or attempts to\nresolve a missing one — that's `jetson-init-source`'s exclusive\nresponsibility. A missing field is a Setup gap; route there.\n\nVerify build-host prerequisites once:\n\n```bash\nfor p in flex bison libssl-dev; do\n  dpkg -s \"$p\" >\u002Fdev\u002Fnull 2>&1 || refuse \"host package missing: $p\"\ndone\nfor p in git build-essential bc zstd; do\n  dpkg -s \"$p\" >\u002Fdev\u002Fnull 2>&1 || warn \"host package missing: $p\"\ndone\n```\n\n### Detect dirty source repos\n\nThe watermark file `$STATE` records the last successfully built\ncommit per kernel-side repo. The repo list is derived at runtime\nfrom `OOT_SOURCE_LIST` + `kernel\u002F$KERNEL_SRC_DIR`. For each repo:\nHEAD ≠ watermark → dirty; uncommitted edits (`git diff --quiet`\nnon-zero) → also dirty.\n\n**Branch-A note**: when `bsp_sources\u002F` is one mono-repo with a\nsingle `.git`, every canonical sub-path shares the same HEAD —\nthe watermark schema still keys per-sub-path and the dirty set\nstill works (any change anywhere flips every sub-path's HEAD).\n\nIf `STATE` is absent (first build), treat all repos as clean\nunless the auto-chain context says \"Customize just committed\". If\n`DIRTY` is empty and no mode argument was passed: report\n\"nothing to build\" and return.\n\n### Pick build mode\n\nMap the dirty set to a mode (auto), or honor the mode argument:\n\n| Dirty repos (auto) | Mode |\n|---|---|\n| Only `hardware\u002Fnvidia\u002F*` or `kernel-devicetree` | `dt` |\n| Only OOT subset of `$OOT_SOURCE_LIST` | `oot` |\n| Only `kernel\u002F$KERNEL_SRC_DIR` | `kernel` |\n| Any mix spanning the above | `full` |\n\nModes are union-able: `full` runs `kernel` → `oot` → `dt` in that\norder (kernel produces headers OOT needs; `nvidia-dtbs` uses the\nsame generated headers). A manually passed mode argument skips\nauto-detection.\n\n### Execute build\n\n#### Common setup + per-mode build snippets\n\nCommon setup (validate orchestrator Makefiles, `cd $KS`) and the\nexact `make` invocations for each mode (`dt`, `oot`, `kernel`,\n`full`) plus the optional install consolidation pass live in\n[`references\u002Fbuild-modes.md`](references\u002Fbuild-modes.md). Drive\nthe relevant mode's snippet against the bindings from the\n\"Resolve active target + paths + upstream env\" step.\n\n#### Register composite custom overlay (dt + full only)\n\nSkip unless the selected mode is `dt` or `full`. The composite\noverlay slot is documented in\n[`..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md`](..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md);\nthis sub-step owns the build \u002F Makefile \u002F flash-conf side of it.\n\nResolve the composite path for the active target (`$COMPOSITE_BASE`,\n`$COMPOSITE_DTS`, `$COMPOSITE_MK`) using the active profile's\nchip family, carrier ID\u002FSKU, and module ID — full snippet in\n[`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md#path-resolution).\n\n**Gate (symmetric).** `$COMPOSITE_DTS` drives both directions:\npresent → apply the two idempotent patches below; absent → run the\n[cleanup pass](references\u002Fcomposite-registration.md#cleanup-pass-on-composite-removal)\nto strip any stale `dtbo-y +=` \u002F `OVERLAY_DTB_FILE+=` line from a\nprior run. Either path keeps `OVERLAY_DTB_FILE+=` from referencing\nan unbuilt `.dtbo` — the build-time enforcement of the\n[no-direct-in-tree-DT-edits rule](..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md#hard-rule-no-direct-in-tree-dts--dtsi-edits).\n\n1. **Per-dir Makefile** — append `dtbo-y += \u003Cname>.dtbo` after the\n   last *literal-named* `dtbo-y +=` entry. Inserting after the\n   `$(old-dtbo)` merge-back line skips the `$(addprefix\n   makefile-path\u002F,…)` prefix pass and the build silently drops\n   the composite. Commit to the `bsp_sources\u002F` mono-repo. Full\n   snippet + rationale:\n   [`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md#makefile-patch-idempotent-position-sensitive).\n2. **Carrier flash conf** — append `OVERLAY_DTB_FILE+=\",\u003Cname>.dtbo\"`\n   with first-touch pristine import on the overlay tracker. On a\n   fresh workspace the tracker is empty git-init; import the\n   conf from `bsp_image` and commit as `pristine:` *before* the\n   customization commit (workflow contract). Full snippet:\n   [`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md#flash-conf-patch-idempotent-with-first-touch-pristine-import).\n\nThe composite's parent sub-repo flipping HEAD during a customize-*\nappend is what the \"Detect dirty source repos\" step's dirty detection consumes — no extra\nbookkeeping needed here.\n\n**Self-check** before invoking `nvidia-dtbs`:\n\n```bash\ngrep -qxF \"dtbo-y += ${COMPOSITE_BASE}.dtbo\" \"$COMPOSITE_MK\" \\\n  || refuse \"Composite Makefile registration missing after patch.\"\ngrep -qxF \"$line\" \"$FLASH_CONF\" \\\n  || refuse \"Composite flash-conf registration missing after patch.\"\n```\n\n### Write the build manifest\n\nWalk the `DIRTY` set and emit a manifest entry per implied artifact,\nfollowing the **trace-to-dirty policy** — only artifacts traceable\nto a dirty source repo. Promoting baseline-divergence noise would\nattribute it to a customization's audit trail (forbidden).\n\nThe full source → kbuild → destination mapping, YAML schema, and\nfilter rules live in\n[`references\u002Fmanifest-schema.md`](references\u002Fmanifest-schema.md).\n\nAtomic write: stage to `${MANIFEST}.tmp`, then `mv -f`.\n\n### Update watermark + summary\n\nOn success, rewrite `$STATE` with the new per-repo HEADs, toolchain,\n`bsp_image.version`, and last-run mode (schema in\n[`references\u002Fmanifest-schema.md`](references\u002Fmanifest-schema.md)).\n\nReport:\n\n- Toolchain (from `source.toolchain`).\n- Build mode: `\u003Cdt|oot|kernel|full>` (auto-picked or forced by skill argument).\n- Dirty repos and their new HEADs.\n- Artifacts built: counts per kind (`.dtb`, in-tree `.ko`, OOT `.ko`, `Image`).\n- Manifest path + entry count.\n- Consolidated install stage path (if the \"Install consolidation\" step ran).\n- Next step: `\u002Fjetson-promote-image`.\n\nIf a Customize skill triggered this run, prompt the user to re-issue\ntheir original request.\n\n## Limitations\n\nThe top tier — failure modes that block a build or silently\nproduce wrong artifacts. See\n[`references\u002Flong-tail-gotchas.md`](references\u002Flong-tail-gotchas.md)\nfor invariants, deploy patterns, and performance hints.\n\n- **Toolchain resolution is `jetson-init-source`'s job.** This\n  skill only reads `source.toolchain` and exports `CROSS_COMPILE`.\n  Missing field → refuse and route, never resolve in-skill.\n- **R36.x Branch-A `$KS\u002FMakefile` collision.** R36.x's\n  `public_sources.tbz2` can leave the dGPU\u002FOpenRM proprietary\n  Makefile at `$KS\u002FMakefile` instead of the Tegra orchestrator;\n  its `modules` target recurses into `kernel-open\u002F` + `src\u002Fnvidia\u002F`,\n  pulls host `\u002Flib\u002Fmodules` headers, and breaks arm64 cross-builds\n  with `'-mlittle-endian' unrecognized`. R38+ extractions are\n  unaffected. `\u002Fjetson-init-source`'s step 3a is the primary defense\n  (extract-time); the \"Common setup\" check here is the safety net.\n  Don't relax the regex.\n- **Kernel-DT changes: composite-overlay-only, split ownership.**\n  Direct edits to in-tree `.dts` \u002F `.dtsi` files under `bsp_sources\u002F`\n  are forbidden for customize-\\* skills — every kernel-DT change\n  lands as a fragment in the composite overlay slot\n  ([rule + rationale](..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md#hard-rule-no-direct-in-tree-dts--dtsi-edits)).\n  The composite `.dts` *content* is owned by each customize-\\*\n  skill; the **build \u002F Makefile \u002F flash-conf registration** is\n  owned by this skill (gated on the composite `.dts` existing — so\n  `OVERLAY_DTB_FILE+=` can't reference an unbuilt `.dtbo`).\n- **the \"Register composite custom overlay\" step Makefile insertion point matters.** Insert after\n  the last *literal-named* `dtbo-y +=` entry; inserting after\n  `$(old-dtbo)` skips the `$(addprefix makefile-path\u002F,…)` prefix\n  pass and the build silently drops your `.dtbo`. The regex\n  `^dtbo-y *+= *[a-zA-Z0-9]` filters correctly; do not relax it.\n- **the \"Register composite custom overlay\" step first-touch needs pristine import.** On a fresh\n  workspace the overlay tracker is empty git-init — the carrier\n  flash conf is imported from `bsp_image` and committed as\n  `pristine:` *before* the customization commit. Both commits go\n  through the workflow acceptance gate.\n- **Avoid bare `$0` in shell snippets inside this SKILL.md.** When\n  invoked with an argument, the harness expands skill-body `$0`\n  against the caller's `$0` before handing the rendered prompt to\n  the model. Use sed-based line splicing or\n  `awk -v ROW=\"$0\"`. See\n  [`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md#why-sed-based-splicing-not-awk).\n- **No overlay staging.** Build outputs stay where the build put\n  them; the manifest is the contract to `jetson-promote-image`.\n  Deliberate divergence from the original overlay→promote\n  indirection — keeps the full build output set out of the\n  overlay tracker's git history.\n- **`KERNEL_HEADERS` vs `KERNEL_OUTPUT` in DT mode.** Different\n  semantics (srctree vs objtree); do not collapse. the \"DT-only\" step's\n  snippet is correct as written.\n- **OOT mode prereq: previously-built kernel headers.** A manual\n  `oot` invocation against a never-built tree refuses with \"run\n  `kernel` (or `full`) first\" rather than producing a confusing\n  build error.\n\n## Examples\n\nAuto-detect mode from the dirty source tree (typical invocation):\n\n```\n\u002Fjetson-build-source\n```\n\nForce a single mode (skips auto-detect):\n\n```\n\u002Fjetson-build-source dt       # rebuild NVIDIA DTBs only\n\u002Fjetson-build-source oot      # rebuild OOT modules only\n\u002Fjetson-build-source kernel   # rebuild kernel Image + in-tree modules\n\u002Fjetson-build-source full     # rebuild everything + install consolidation\n```\n\nTypical chain after a customize-* skill commits to a kernel-side\nrepo (the customize-* skill calls this automatically):\n\n```\n\u002Fjetson-customize-pcie ...   # commits to hardware\u002Fnvidia\u002F...\u002Fnv-public\n   ↓\n\u002Fjetson-build-source         # auto-picks `dt` from the dirty set\n   ↓\n\u002Fjetson-promote-image        # reads .build-manifest.yaml, stages into bsp_image\n   ↓\n\u002Fjetson-flash-image          # flashes\n```\n\n## Troubleshooting\n\n| Error | Cause | Solution |\n|---|---|---|\n| `source.toolchain points at \u003C...>gcc which does not exist` | Toolchain field stale (path moved, install missing) | Re-run `\u002Fjetson-init-source` to re-resolve. This skill never resolves toolchain itself. |\n| `No rule to make target '$KOUT\u002Fscripts\u002FMakefile.compiler'` | `KERNEL_HEADERS` set to `$KOUT` instead of `$KS\u002Fkernel\u002F$KERNEL_SRC_DIR` | Use the DT-mode snippet in [`references\u002Fbuild-modes.md`](references\u002Fbuild-modes.md) verbatim — srctree vs objtree must not collapse. |\n| `'-mlittle-endian' unrecognized` during `make modules` | R36.x Branch-A `$KS\u002FMakefile` collision — dGPU\u002FOpenRM Makefile in place of Tegra orchestrator | The Common-setup safety net normally repairs it; if not, `git checkout HEAD -- Makefile` then re-run `\u002Fjetson-init-source` step 3a. |\n| `run kernel (or full) first` on manual `oot` invocation | Kernel source tree never prepared | Run `\u002Fjetson-build-source kernel` (or `full`) once, then `oot`. |\n| `nothing to build` and dirty edits exist | Edits uncommitted in a sub-repo but `.build-state.yaml` watermark already matches HEAD | Commit the edits, or re-run with an explicit mode argument (`\u002Fjetson-build-source dt` etc.). |\n| Composite `.dtbo` silently missing from the output set | Per-dir Makefile insertion landed after `$(old-dtbo)` merge-back line | See [`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md#makefile-patch-idempotent-position-sensitive) — insert after the last *literal-named* `dtbo-y +=` entry. |\n| Promote step copies stale baseline artifacts | Trace-to-dirty filter skipped after a manual `cp` into `$KS` | Only edit via a customize-* skill or `git`; the dirty detector keys on git HEAD, not file mtime. |\n| `host package missing: \u003Cpkg>` | `flex`\u002F`bison`\u002F`libssl-dev` refuse; others warn. | `sudo apt install \u003Cpkg>` per [`references\u002Fupstream-recipe.md`](references\u002Fupstream-recipe.md). |\n\n## See also\n\n- [`references\u002Fbuild-modes.md`](references\u002Fbuild-modes.md) — per-mode `make` snippets + install consolidation.\n- [`references\u002Fmanifest-schema.md`](references\u002Fmanifest-schema.md) — `.build-manifest.yaml` + `.build-state.yaml` schemas.\n- [`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md) — the \"Register composite custom overlay\" step full snippets + rationale.\n- [`references\u002Flong-tail-gotchas.md`](references\u002Flong-tail-gotchas.md) — invariants, deploy patterns, performance hints.\n- [`references\u002Fupstream-recipe.md`](references\u002Fupstream-recipe.md) — verbatim NVIDIA recipe, divergences, spec status.\n- [`..\u002F..\u002Fcontext\u002Fbsp-customization-workflow.md`](..\u002F..\u002Fcontext\u002Fbsp-customization-workflow.md#workflow-invariants) — workspace edit protocol.\n- [`..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md`](..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md) — composite custom-overlay contract.\n- [`..\u002F..\u002Freferences\u002Fbsp-customization-bpmp-dtb.md`](..\u002F..\u002Freferences\u002Fbsp-customization-bpmp-dtb.md) — BPMP-DTB edit contract (routed around this skill).\n- [`..\u002Fjetson-init-source\u002FSKILL.md`](..\u002Fjetson-init-source\u002FSKILL.md) — Setup; authors `source.toolchain`.\n- [`..\u002Fjetson-promote-image\u002FSKILL.md`](..\u002Fjetson-promote-image\u002FSKILL.md) — Deploy promoter; reads this skill's manifest.\n","# Build BSP Source\n\n## Purpose\n\nRebuild the kernel-side artifacts (DTBs, OOT modules, in-tree\nmodules, kernel `Image`) implied by changes under\n`\u003Csource.root_path>\u002Fbsp_sources\u002F`, and write a manifest that\n`\u002Fjetson-promote-image` reads to stage those outputs into the BSP\nimage. The skill never writes into `\u003Cbsp_image.root_path>` itself.\n\n## Prerequisites\n\n- Active target-platform profile with `bsp_image:` and\n  `source.toolchain:` resolved (run `\u002Fjetson-init-image` and\n  `\u002Fjetson-init-source` first).\n- `\u003Csource.root_path>\u002Fbsp_sources\u002F` populated with the kernel-side\n  checkout layout `\u002Fjetson-init-source` materializes.\n- `\u003Cbsp_image.root_path>\u002FLinux_for_Tegra\u002Fsource\u002Fkernel_src_build_env.sh`\n  present (extracted from `public_sources.tbz2`).\n- Host packages: `flex`, `bison`, `libssl-dev` (hard); `git`,\n  `build-essential`, `bc`, `zstd` (warn-only).\n- Cross-toolchain at `${source.toolchain}gcc` resolvable on disk.\n\n## Overview\n\nThis skill is the **Build** stage of the workflow — see\n[`..\u002F..\u002Fcontext\u002Fbsp-customization-workflow.md`](..\u002F..\u002Fcontext\u002Fbsp-customization-workflow.md)\nfor where it sits in the Setup → Customize → Build → Deploy pipeline\nand what triggers it. The skill takes source-side customization\ncommits, rebuilds the implied artifacts, and records which were\nrebuilt in a manifest. Outputs stay in-tree under\n`\u003Csource.root_path>\u002Fbsp_sources\u002F`;\n[`jetson-promote-image`](..\u002Fjetson-promote-image\u002FSKILL.md) reads the\nmanifest at Deploy to copy each rebuilt artifact into the matching\npath under `\u003Cbsp_image.root_path>\u002FLinux_for_Tegra\u002F`.\n\nOverlay-only edits (`nvpmodel.conf`, `nvfancontrol.conf`, BPMP DTB)\nskip Build — `customize-*` stages them directly to the overlay\ntracker; BPMP DTB uses the `dtc` decompile → edit → recompile loop in\n[`..\u002F..\u002Freferences\u002Fbsp-customization-bpmp-dtb.md`](..\u002F..\u002Freferences\u002Fbsp-customization-bpmp-dtb.md).\n\n**Custom-overlay slot ownership.** Kernel-DT customizations from\nevery customize-* skill collect into a single composite\n`tegra\u003Csoc>-\u003Ccarrier-id-sku>+\u003Cmodule-id>-xxxx-custom.dts` per\nactive target — see\n[`..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md`](..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md)\nfor the filename \u002F location \u002F append protocol. This skill is the\n**sole owner** of the composite's per-dir Makefile registration\n(`dtbo-y += \u003Cname>.dtbo`) and the carrier flash conf's\n`OVERLAY_DTB_FILE+=` line (the \"Register composite custom overlay\" step).\n\n**Four build modes** matched to the dirty-repo profile:\n\n| Mode | What's built | Auto-picks when |\n|---|---|---|\n| **dt** | NVIDIA DTBs only | only `hardware\u002Fnvidia\u002F*` or `kernel-devicetree` dirty |\n| **oot** | OOT modules (six repos) | only OOT repos dirty |\n| **kernel** | Kernel `Image` + full in-tree `.ko` set + kernel-side dtbs | only `kernel\u002F$KERNEL_SRC_DIR` dirty |\n| **full** | Everything above + optional install consolidation | mixed dirty set |\n\nMode selection: **auto** (default — invoke `\u002Fjetson-build-source`\nwith no argument) walks the dirty-repo set; force a specific mode\nby passing it as the skill argument.\n\n**Design principle: delegate to upstream.** Every build primitive\nalready exists in `\u003Cbsp_image.root_path>\u002FLinux_for_Tegra\u002Fsource\u002F`\n— the env file, top-level Makefile (`nvidia-dtbs` \u002F `modules` \u002F\n`modules_install`), kernel Makefile (`kernel` \u002F `install`). The\nskill drives those primitives against\n`\u003Csource.root_path>\u002Fbsp_sources\u002F` — never duplicates their\nlogic in shell.\n\n## When to invoke\n\n- **Auto-chained** at the end of a Customize `customize-*` invocation\n  whenever Customize committed to a kernel-side source repo.\n- **Manual re-run** via `\u002Fjetson-build-source [\u003Cmode>]` when:\n  - the auto-chained build was interrupted,\n  - source commits arrived via `git pull` from other users,\n  - the user wants to force a rebuild without a fresh edit,\n  - the user wants a specific mode (e.g. install consolidation for\n    a manual scp deploy to a DUT).\n\n## Instructions\n\n### Resolve active target + paths + upstream env\n\nResolve the active profile per\n[`..\u002F..\u002Fcontext\u002Ftarget-platform-contract.md`](..\u002F..\u002Fcontext\u002Ftarget-platform-contract.md).\nRefuse and route in these cases:\n\n| Condition | Route to |\n|---|---|\n| No active profile, or `active: NA` | `\u002Fjetson-set-target` or `\u002Fjetson-init-target` |\n| Profile lacks `bsp_image:` | `\u002Fjetson-init-image` |\n| Profile lacks `source.toolchain:` | `\u002Fjetson-init-source` |\n| `\u003Csource.root_path>\u002Fbsp_sources\u002F` missing or empty | `\u002Fjetson-init-source` |\n| `\u003Cbsp_image.root_path>\u002FLinux_for_Tegra\u002Fsource\u002Fkernel_src_build_env.sh` missing | `\u002Fjetson-init-image` (BSP not properly extracted) |\n\nBind:\n\n```bash\nWORKSPACE=\u003Cparent of target-platform\u002F>\nBSP_SRC=\u003Cbsp_image.root_path>\u002FLinux_for_Tegra\u002Fsource   # NVIDIA's build primitives\nKS=\u003Csource.root_path>\u002Fbsp_sources                      # our kernel-side checkout\nKOUT=\u003Csource.root_path>\u002F.build\u002Fkernel-out              # DT-mode out-of-tree build dir\nSTAGE=\u003Csource.root_path>\u002F.build\u002Finstall-stage          # install consolidation (full mode \u002F opt-in)\nSTATE=\u003Csource.root_path>\u002F.build-state.yaml             # per-repo watermark\nMANIFEST=\u003Csource.root_path>\u002F.build-manifest.yaml       # rebuilt-artifact list for jetson-promote-image\n```\n\n**Source the NVIDIA build env** to inherit canonical names — never\nhardcode `kernel-noble`, the OOT module list, or `KERNEL_DEF_CONFIG`:\n\n```bash\nsource \"$BSP_SRC\u002Fkernel_src_build_env.sh\"\n# Now in scope: KERNEL_SRC_DIR (e.g. kernel-noble), KERNEL_DEF_CONFIG,\n# OOT_SOURCE_LIST, kernel_name (e.g. noble), KERNEL_MODULAR_BUILD\n```\n\nRefuse if `$KS\u002Fkernel\u002F$KERNEL_SRC_DIR\u002F` is missing or if any name\nin `$OOT_SOURCE_LIST` is missing under `$KS\u002F`. Route to\n`\u002Fjetson-init-source`.\n\n### Resolve toolchain (read-only)\n\nRead `source.toolchain` from the active profile (authored by\n`jetson-init-source`). Validate:\n\n```bash\nexport ARCH=arm64\nexport CROSS_COMPILE=\u003Csource.toolchain>   # trailing dash mandatory\n[ -f \"${CROSS_COMPILE}gcc\" ] || refuse \\\n  \"source.toolchain points at ${CROSS_COMPILE}gcc which does not exist. Re-run \u002Fjetson-init-source.\"\n```\n\nA trailing dash on `CROSS_COMPILE` is mandatory — kbuild treats it\nas a prefix (`${CROSS_COMPILE}gcc`); a missing dash breaks with\n`command not found`. The `[ -f ]` check catches it before any\n`make` runs.\n\nThis skill **never** prompts for the toolchain or attempts to\nresolve a missing one — that's `jetson-init-source`'s exclusive\nresponsibility. A missing field is a Setup gap; route there.\n\nVerify build-host prerequisites once:\n\n```bash\nfor p in flex bison libssl-dev; do\n  dpkg -s \"$p\" >\u002Fdev\u002Fnull 2>&1 || refuse \"host package missing: $p\"\ndone\nfor p in git build-essential bc zstd; do\n  dpkg -s \"$p\" >\u002Fdev\u002Fnull 2>&1 || warn \"host package missing: $p\"\ndone\n```\n\n### Detect dirty source repos\n\nThe watermark file `$STATE` records the last successfully built\ncommit per kernel-side repo. The repo list is derived at runtime\nfrom `OOT_SOURCE_LIST` + `kernel\u002F$KERNEL_SRC_DIR`. For each repo:\nHEAD ≠ watermark → dirty; uncommitted edits (`git diff --quiet`\nnon-zero) → also dirty.\n\n**Branch-A note**: when `bsp_sources\u002F` is one mono-repo with a\nsingle `.git`, every canonical sub-path shares the same HEAD —\nthe watermark schema still keys per-sub-path and the dirty set\nstill works (any change anywhere flips every sub-path's HEAD).\n\nIf `STATE` is absent (first build), treat all repos as clean\nunless the auto-chain context says \"Customize just committed\". If\n`DIRTY` is empty and no mode argument was passed: report\n\"nothing to build\" and return.\n\n### Pick build mode\n\nMap the dirty set to a mode (auto), or honor the mode argument:\n\n| Dirty repos (auto) | Mode |\n|---|---|\n| Only `hardware\u002Fnvidia\u002F*` or `kernel-devicetree` | `dt` |\n| Only OOT subset of `$OOT_SOURCE_LIST` | `oot` |\n| Only `kernel\u002F$KERNEL_SRC_DIR` | `kernel` |\n| Any mix spanning the above | `full` |\n\nModes are union-able: `full` runs `kernel` → `oot` → `dt` in that\norder (kernel produces headers OOT needs; `nvidia-dtbs` uses the\nsame generated headers). A manually passed mode argument skips\nauto-detection.\n\n### Execute build\n\n#### Common setup + per-mode build snippets\n\nCommon setup (validate orchestrator Makefiles, `cd $KS`) and the\nexact `make` invocations for each mode (`dt`, `oot`, `kernel`,\n`full`) plus the optional install consolidation pass live in\n[`references\u002Fbuild-modes.md`](references\u002Fbuild-modes.md). Drive\nthe relevant mode's snippet against the bindings from the\n\"Resolve active target + paths + upstream env\" step.\n\n#### Register composite custom overlay (dt + full only)\n\nSkip unless the selected mode is `dt` or `full`. The composite\noverlay slot is documented in\n[`..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md`](..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md);\nthis sub-step owns the build \u002F Makefile \u002F flash-conf side of it.\n\nResolve the composite path for the active target (`$COMPOSITE_BASE`,\n`$COMPOSITE_DTS`, `$COMPOSITE_MK`) using the active profile's\nchip family, carrier ID\u002FSKU, and module ID — full snippet in\n[`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md#path-resolution).\n\n**Gate (symmetric).** `$COMPOSITE_DTS` drives both directions:\npresent → apply the two idempotent patches below; absent → run the\n[cleanup pass](references\u002Fcomposite-registration.md#cleanup-pass-on-composite-removal)\nto strip any stale `dtbo-y +=` \u002F `OVERLAY_DTB_FILE+=` line from a\nprior run. Either path keeps `OVERLAY_DTB_FILE+=` from referencing\nan unbuilt `.dtbo` — the build-time enforcement of the\n[no-direct-in-tree-DT-edits rule](..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md#hard-rule-no-direct-in-tree-dts--dtsi-edits).\n\n1. **Per-dir Makefile** — append `dtbo-y += \u003Cname>.dtbo` after the\n   last *literal-named* `dtbo-y +=` entry. Inserting after the\n   `$(old-dtbo)` merge-back line skips the `$(addprefix\n   makefile-path\u002F,…)` prefix pass and the build silently drops\n   the composite. Commit to the `bsp_sources\u002F` mono-repo. Full\n   snippet + rationale:\n   [`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md#makefile-patch-idempotent-position-sensitive).\n2. **Carrier flash conf** — append `OVERLAY_DTB_FILE+=\",\u003Cname>.dtbo\"`\n   with first-touch pristine import on the overlay tracker. On a\n   fresh workspace the tracker is empty git-init; import the\n   conf from `bsp_image` and commit as `pristine:` *before* the\n   customization commit (workflow contract). Full snippet:\n   [`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md#flash-conf-patch-idempotent-with-first-touch-pristine-import).\n\nThe composite's parent sub-repo flipping HEAD during a customize-*\nappend is what the \"Detect dirty source repos\" step's dirty detection consumes — no extra\nbookkeeping needed here.\n\n**Self-check** before invoking `nvidia-dtbs`:\n\n```bash\ngrep -qxF \"dtbo-y += ${COMPOSITE_BASE}.dtbo\" \"$COMPOSITE_MK\" \\\n  || refuse \"Composite Makefile registration missing after patch.\"\ngrep -qxF \"$line\" \"$FLASH_CONF\" \\\n  || refuse \"Composite flash-conf registration missing after patch.\"\n```\n\n### Write the build manifest\n\nWalk the `DIRTY` set and emit a manifest entry per implied artifact,\nfollowing the **trace-to-dirty policy** — only artifacts traceable\nto a dirty source repo. Promoting baseline-divergence noise would\nattribute it to a customization's audit trail (forbidden).\n\nThe full source → kbuild → destination mapping, YAML schema, and\nfilter rules live in\n[`references\u002Fmanifest-schema.md`](references\u002Fmanifest-schema.md).\n\nAtomic write: stage to `${MANIFEST}.tmp`, then `mv -f`.\n\n### Update watermark + summary\n\nOn success, rewrite `$STATE` with the new per-repo HEADs, toolchain,\n`bsp_image.version`, and last-run mode (schema in\n[`references\u002Fmanifest-schema.md`](references\u002Fmanifest-schema.md)).\n\nReport:\n\n- Toolchain (from `source.toolchain`).\n- Build mode: `\u003Cdt|oot|kernel|full>` (auto-picked or forced by skill argument).\n- Dirty repos and their new HEADs.\n- Artifacts built: counts per kind (`.dtb`, in-tree `.ko`, OOT `.ko`, `Image`).\n- Manifest path + entry count.\n- Consolidated install stage path (if the \"Install consolidation\" step ran).\n- Next step: `\u002Fjetson-promote-image`.\n\nIf a Customize skill triggered this run, prompt the user to re-issue\ntheir original request.\n\n## Limitations\n\nThe top tier — failure modes that block a build or silently\nproduce wrong artifacts. See\n[`references\u002Flong-tail-gotchas.md`](references\u002Flong-tail-gotchas.md)\nfor invariants, deploy patterns, and performance hints.\n\n- **Toolchain resolution is `jetson-init-source`'s job.** This\n  skill only reads `source.toolchain` and exports `CROSS_COMPILE`.\n  Missing field → refuse and route, never resolve in-skill.\n- **R36.x Branch-A `$KS\u002FMakefile` collision.** R36.x's\n  `public_sources.tbz2` can leave the dGPU\u002FOpenRM proprietary\n  Makefile at `$KS\u002FMakefile` instead of the Tegra orchestrator;\n  its `modules` target recurses into `kernel-open\u002F` + `src\u002Fnvidia\u002F`,\n  pulls host `\u002Flib\u002Fmodules` headers, and breaks arm64 cross-builds\n  with `'-mlittle-endian' unrecognized`. R38+ extractions are\n  unaffected. `\u002Fjetson-init-source`'s step 3a is the primary defense\n  (extract-time); the \"Common setup\" check here is the safety net.\n  Don't relax the regex.\n- **Kernel-DT changes: composite-overlay-only, split ownership.**\n  Direct edits to in-tree `.dts` \u002F `.dtsi` files under `bsp_sources\u002F`\n  are forbidden for customize-\\* skills — every kernel-DT change\n  lands as a fragment in the composite overlay slot\n  ([rule + rationale](..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md#hard-rule-no-direct-in-tree-dts--dtsi-edits)).\n  The composite `.dts` *content* is owned by each customize-\\*\n  skill; the **build \u002F Makefile \u002F flash-conf registration** is\n  owned by this skill (gated on the composite `.dts` existing — so\n  `OVERLAY_DTB_FILE+=` can't reference an unbuilt `.dtbo`).\n- **the \"Register composite custom overlay\" step Makefile insertion point matters.** Insert after\n  the last *literal-named* `dtbo-y +=` entry; inserting after\n  `$(old-dtbo)` skips the `$(addprefix makefile-path\u002F,…)` prefix\n  pass and the build silently drops your `.dtbo`. The regex\n  `^dtbo-y *+= *[a-zA-Z0-9]` filters correctly; do not relax it.\n- **the \"Register composite custom overlay\" step first-touch needs pristine import.** On a fresh\n  workspace the overlay tracker is empty git-init — the carrier\n  flash conf is imported from `bsp_image` and committed as\n  `pristine:` *before* the customization commit. Both commits go\n  through the workflow acceptance gate.\n- **Avoid bare `$0` in shell snippets inside this SKILL.md.** When\n  invoked with an argument, the harness expands skill-body `$0`\n  against the caller's `$0` before handing the rendered prompt to\n  the model. Use sed-based line splicing or\n  `awk -v ROW=\"$0\"`. See\n  [`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md#why-sed-based-splicing-not-awk).\n- **No overlay staging.** Build outputs stay where the build put\n  them; the manifest is the contract to `jetson-promote-image`.\n  Deliberate divergence from the original overlay→promote\n  indirection — keeps the full build output set out of the\n  overlay tracker's git history.\n- **`KERNEL_HEADERS` vs `KERNEL_OUTPUT` in DT mode.** Different\n  semantics (srctree vs objtree); do not collapse. the \"DT-only\" step's\n  snippet is correct as written.\n- **OOT mode prereq: previously-built kernel headers.** A manual\n  `oot` invocation against a never-built tree refuses with \"run\n  `kernel` (or `full`) first\" rather than producing a confusing\n  build error.\n\n## Examples\n\nAuto-detect mode from the dirty source tree (typical invocation):\n\n```\n\u002Fjetson-build-source\n```\n\nForce a single mode (skips auto-detect):\n\n```\n\u002Fjetson-build-source dt       # rebuild NVIDIA DTBs only\n\u002Fjetson-build-source oot      # rebuild OOT modules only\n\u002Fjetson-build-source kernel   # rebuild kernel Image + in-tree modules\n\u002Fjetson-build-source full     # rebuild everything + install consolidation\n```\n\nTypical chain after a customize-* skill commits to a kernel-side\nrepo (the customize-* skill calls this automatically):\n\n```\n\u002Fjetson-customize-pcie ...   # commits to hardware\u002Fnvidia\u002F...\u002Fnv-public\n   ↓\n\u002Fjetson-build-source         # auto-picks `dt` from the dirty set\n   ↓\n\u002Fjetson-promote-image        # reads .build-manifest.yaml, stages into bsp_image\n   ↓\n\u002Fjetson-flash-image          # flashes\n```\n\n## Troubleshooting\n\n| Error | Cause | Solution |\n|---|---|---|\n| `source.toolchain points at \u003C...>gcc which does not exist` | Toolchain field stale (path moved, install missing) | Re-run `\u002Fjetson-init-source` to re-resolve. This skill never resolves toolchain itself. |\n| `No rule to make target '$KOUT\u002Fscripts\u002FMakefile.compiler'` | `KERNEL_HEADERS` set to `$KOUT` instead of `$KS\u002Fkernel\u002F$KERNEL_SRC_DIR` | Use the DT-mode snippet in [`references\u002Fbuild-modes.md`](references\u002Fbuild-modes.md) verbatim — srctree vs objtree must not collapse. |\n| `'-mlittle-endian' unrecognized` during `make modules` | R36.x Branch-A `$KS\u002FMakefile` collision — dGPU\u002FOpenRM Makefile in place of Tegra orchestrator | The Common-setup safety net normally repairs it; if not, `git checkout HEAD -- Makefile` then re-run `\u002Fjetson-init-source` step 3a. |\n| `run kernel (or full) first` on manual `oot` invocation | Kernel source tree never prepared | Run `\u002Fjetson-build-source kernel` (or `full`) once, then `oot`. |\n| `nothing to build` and dirty edits exist | Edits uncommitted in a sub-repo but `.build-state.yaml` watermark already matches HEAD | Commit the edits, or re-run with an explicit mode argument (`\u002Fjetson-build-source dt` etc.). |\n| Composite `.dtbo` silently missing from the output set | Per-dir Makefile insertion landed after `$(old-dtbo)` merge-back line | See [`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md#makefile-patch-idempotent-position-sensitive) — insert after the last *literal-named* `dtbo-y +=` entry. |\n| Promote step copies stale baseline artifacts | Trace-to-dirty filter skipped after a manual `cp` into `$KS` | Only edit via a customize-* skill or `git`; the dirty detector keys on git HEAD, not file mtime. |\n| `host package missing: \u003Cpkg>` | `flex`\u002F`bison`\u002F`libssl-dev` refuse; others warn. | `sudo apt install \u003Cpkg>` per [`references\u002Fupstream-recipe.md`](references\u002Fupstream-recipe.md). |\n\n## See also\n\n- [`references\u002Fbuild-modes.md`](references\u002Fbuild-modes.md) — per-mode `make` snippets + install consolidation.\n- [`references\u002Fmanifest-schema.md`](references\u002Fmanifest-schema.md) — `.build-manifest.yaml` + `.build-state.yaml` schemas.\n- [`references\u002Fcomposite-registration.md`](references\u002Fcomposite-registration.md) — the \"Register composite custom overlay\" step full snippets + rationale.\n- [`references\u002Flong-tail-gotchas.md`](references\u002Flong-tail-gotchas.md) — invariants, deploy patterns, performance hints.\n- [`references\u002Fupstream-recipe.md`](references\u002Fupstream-recipe.md) — verbatim NVIDIA recipe, divergences, spec status.\n- [`..\u002F..\u002Fcontext\u002Fbsp-customization-workflow.md`](..\u002F..\u002Fcontext\u002Fbsp-customization-workflow.md#workflow-invariants) — workspace edit protocol.\n- [`..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md`](..\u002F..\u002Freferences\u002Fbsp-customization-kernel-dtb.md) — composite custom-overlay contract.\n- [`..\u002F..\u002Freferences\u002Fbsp-customization-bpmp-dtb.md`](..\u002F..\u002Freferences\u002Fbsp-customization-bpmp-dtb.md) — BPMP-DTB edit contract (routed around this skill).\n- [`..\u002Fjetson-init-source\u002FSKILL.md`](..\u002Fjetson-init-source\u002FSKILL.md) — Setup; authors `source.toolchain`.\n- [`..\u002Fjetson-promote-image\u002FSKILL.md`](..\u002Fjetson-promote-image\u002FSKILL.md) — Deploy promoter; reads this skill's manifest.\n",{"name":5,"license":15,"version":24,"metadata":25,"description":7,"argument-hint":33},"0.0.1",{"tags":26,"team":29,"author":30,"domain":31,"data-classification":32},[27,28],"bsp","build","pts","Jetson Team","meta","public","dt | oot | kernel | full","main","86cc27ffd16af6cb85948f1155578e6f3f61cc4c","skillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn","https:\u002F\u002Fgithub.com\u002FSolizardking","https:\u002F\u002Fmusebook.trade","Got a mile high and never came down","2026-10-08 11:52:53",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add Solizardking\u002Ftrain2earn --skill jetson-build-source",{"tool":48,"command":49},"bunx","bunx skills add Solizardking\u002Ftrain2earn --skill jetson-build-source",{"tool":51,"command":52},"pnpm","pnpm dlx skills add Solizardking\u002Ftrain2earn --skill jetson-build-source","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002FSKILL.md",true,[56,62,66,70,74,78,82,86,90],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"BENCHMARK.md","REFERENCE","参考文档",3729,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002FBENCHMARK.md",{"path":63,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":64,"sourceHtmlUrl":65},"metadata.json",369,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002Fmetadata.json",{"path":67,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fbuild-modes.md",4947,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002Freferences\u002Fbuild-modes.md",{"path":71,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fcomposite-registration.md",8915,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002Freferences\u002Fcomposite-registration.md",{"path":75,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Flong-tail-gotchas.md",5337,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002Freferences\u002Flong-tail-gotchas.md",{"path":79,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fmanifest-schema.md",3418,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002Freferences\u002Fmanifest-schema.md",{"path":83,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fupstream-recipe.md",3423,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002Freferences\u002Fupstream-recipe.md",{"path":87,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":88,"sourceHtmlUrl":89},"skill-card.md",3846,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002Fskill-card.md",{"path":91,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":92,"sourceHtmlUrl":93},"verification.json",2217,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fjetson-build-source\u002Fverification.json",[95,103,111,119,126,134],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":99,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M78B94RSCAKMH1QS79VE6DG9","testing","For testing with Light Protocol programs and clients on localnet, devnet, and mainnet validation.","MIT","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Ftesting\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":99,"licenseFileUrl":107,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M78B81BKY8RX12HETPG8YKWK","qedgen","Formally verify programs by writing Lean 4 proofs. Trigger this skill whenever the user wants to formally verify code, generate Lean 4 proofs, prove properties about algorithms or smart contracts, verify invariants, convert program logic into formal specifications, or anything involving Lean 4 and formal verification. Also trigger when the user mentions \"qedgen\", \"lean proof\", \"formal proof\", \"verify my code\", \"prove correctness\", \"formal verification\", or wants mathematical guarantees about their implementation.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fsolana-formal-verification\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fsolana-formal-verification\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":99,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M78B7Q7C5K54E01DN83A60KG","solana-dev","Use when user asks to \"build a Solana dapp\", \"write an Anchor program\", \"create a token\", \"debug Solana errors\", \"set up wallet connection\", \"test my Solana program\", \"deploy to devnet\", or \"explain Solana concepts\" (rent, accounts, PDAs, CPIs, etc.). Also use for quick on-chain lookups via public RPC + curl — \"what's the balance of \u003Cwallet>\", \"look up transaction \u003Csig>\", \"token balance for \u003Caccount>\", \"check this address on mainnet\u002Fdevnet\". End-to-end Solana development playbook covering wallet connection, Anchor\u002FPinocchio programs, Codama client generation, LiteSVM\u002FMollusk\u002FSurfpool testing, security checklists, and JSON-RPC curl lookups against public clusters. Integrates with the Solana MCP server for live documentation search. Prefers framework-kit (@solana\u002Fclient + @solana\u002Freact-hooks) for UI, wallet-standard-first connection (incl. ConnectorKit), @solana\u002Fkit for client\u002FRPC code, and @solana\u002Fweb3-compat for legacy boundaries.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fsolana-dev\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fsolana-dev\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":99,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M78B7HXD6N6GWKSVRQ8F6Q31","solana-common-errors","Diagnose and fix common Solana development errors — GLIBC mismatches, Anchor version conflicts, cargo build-sbf \u002F platform-tools failures, LiteSVM issues, edition2024 crate pins, RPC airdrops, and Anchor 0.29→0.32 migrations. Use when builds fail, Anchor CLI won't install, or CI breaks on Debian\u002FUbuntu.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fsolana-common-errors\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":130,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":19},"01M78B6T7YSYWQ0N4DP40QDXEZ","skill-creator","Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fskill-creator\u002Flicense.txt","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fskill-creator\u002FSKILL.md",[],[],{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":99,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":19},"01M78B1VFT9X5AND7AE1HZPZGF","phantom-wallet-mcp","Execute wallet operations through the Phantom MCP server. Use when the user wants to interact with their Phantom wallet directly — get addresses, transfer SOL or SPL tokens, buy\u002Fswap tokens, sign transactions, and sign messages across Solana, Ethereum, Bitcoin, and Sui. Requires the @phantom\u002Fmcp-server to be configured as an MCP server.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fphantom-wallet-mcp\u002FSKILL.md",[],[]]