opção
LarLar Skill Documentação jetson-generate-kb

jetson-generate-kb

NVIDIA/skills NVIDIA/skills

Gera um arquivo Markdown da base de conhecimento específico para cada destino, percorrendo a raiz do BSP e a árvore de código-fonte, documentando o layout da imagem, a estrutura da árvore de código-fonte e as referências aos documentos.

...Expandir tudo
23
Tempo atualizado 23 de Setembro de 2026

Gerar a Base de Conhecimento de Destino

Visão geral

Esta habilidade gera uma referência em Markdown por perfil em target-platform/.md (no mesmo nível do arquivo YAML do perfil). Ela agrupa três elementos em um único arquivo para que uma futura sessão do Claude — ou o usuário — possa visualizar a estrutura do destino ativo sem precisar percorrer novamente o sistema de arquivos:

  1. Layout da imagem BSP — diretórios de nível superior sob bsp_image.root_path, presença de subárvores canônicas (rootfs/, bootloader/, source/, …) e as variantes do nvpmodel correspondentes ao SKU do módulo ativo.
  2. Layout da árvore de código-fonte — subárvores de nível superior em source.root_path (kernel-jammy-src/, hardware/nvidia/, nvidia-oot/, etc.) e arquivos de árvore de dispositivos correspondentes à família de chips.
  3. Documentos — as documents.* referências registradas no perfil, com verificações de existência do caminho local e descrições de uma linha.

A KB é um instantâneo, com data indicada no cabeçalho. Execute novamente esta skill sempre que os dados subjacentes forem alterados — ela é intencionalmente reexecutável e sobrescreve a KB anterior a cada execução.

Quando invocar

  • Após jetson-init-image prepara o BSP para um perfil recém-criado .
  • Após reextrair um arquivo BSP ou aplicar patches sob bsp_image.root_path.
  • Após atualizar a árvore de código-fonte em source.root_path.
  • Após a edição bsp_image.* ou documents.* no arquivo YAML do perfil.
  • Quando uma skill a jusante pergunta “onde está X neste BSP?” e você prefere consultar a Base de Conhecimento em vez de percorrer a árvore novamente.

Procedimento

Resolva o alvo ativo

Resolva o perfil ativo de acordo com o contrato em ../../context/target-platform-contract.md; armazene-o em cache na memória — o restante da skill utiliza apenas esse perfil. Registre (o nome do arquivo sem extensão, sem .yaml) como a raiz do nome do arquivo de saída do KB.

Validar entradas

Campo Obrigatório para a KB? Se estiver em falta
bsp_image.root_path sim Recusar. Uma KB sem raiz BSP para ser verificada é apenas uma reformulação do YAML; informe ao usuário para executar jetson-init-image ou editar manualmente o perfil.
source.root_path não Pule a seção da árvore de código-fonte; anote “source_root não registrado” no KB.
documents.* não Exiba uma tabela “Documentos” vazia com a observação “nenhum documento registrado”.

Se bsp_image.root_path estiver definido, mas o diretório não existir no disco, recuse com uma mensagem clara — não crie um layout para um caminho que não existe.

Descoberta de BSP (em bsp_image.root_path)

Execute apenas as seguintes operações simples — sem varreduras recursivas, sem leituras de conteúdo de arquivos além das listagens de diretórios:

  1. ls -1 de bsp_image.root_path (um nível de profundidade). Registre quais diretórios estão presentes.
  2. Para cada subárvore canônica abaixo, marque como presente/ausente: rootfs/, bootloader/, kernel/, source/, tools/, nv_tegra/.
  3. Verifique se o flash_config existe em /. Registre seu caminho ou (missing).
  4. Liste rootfs/etc/nvpmodel/ e filtre os nomes de arquivos que correspondam a nvpmodel__*.conf. Registre cada correspondência. Use o ID do módulo em letras minúsculas (por exemplo, p3767) e a string de SKU entre aspas de YAML (por exemplo, 0001).

Descoberta da árvore de origem (em source.root_path)

Pule esta etapa completamente se source.root_path estiver NA ou estiver ausente. Caso contrário, execute apenas:

  1. ls -1 de source.root_path (um nível de profundidade).
  2. Para cada subárvore canônica abaixo, marque como presente/ausente: kernel-jammy-src/, hardware/nvidia/, nvidia-oot/, nvgpu/, nvethernetrm/, nvdisplay/, hwpm/, kernel-devicetree/.
  3. Se kernel-devicetree/generic-dts/dts/ existir, liste os nomes de arquivos que correspondam tegra* onde é o prefixo numérico da família de chips (consulte o mapa de famílias de chips abaixo). Registre até 30 ocorrências; se houver mais, registre a contagem e uma nota informando “exibindo as primeiras 30”.

Mapa de famílias de chips (usado nas etapas “Descoberta de BSP” e “Descoberta da árvore de código-fonte”)

Derivar a partir de module.id:

module.id Família de chips prefixo
p3701, p3767 T234 — Orin 234
p3834 T264 — Thor 264

Se module.id não estiver nesta tabela, registre o chip como unknown (module.id=) e pule o filtro da árvore de dispositivos com prefixo de chip .

Os documentos passam

Para cada campo em documents.* do perfil carregado:

  1. Classifique o valor como URL (começa com http://, https://, ou ftp://) ou caminho local (qualquer outra coisa).
  2. Para URLs: registre literalmente. Não busque a URL — a geração da base de conhecimento deve permanecer offline. (Uma funcionalidade futura poderá permitir a indexação profunda .)
  3. Para caminhos locais: verifique os.path.exists. Registre o caminho; se estiver ausente no disco, acrescente (missing).

A descrição de uma linha para cada campo vem do marcador em ../../references/platform_template.yaml — remova o invólucro e use o texto interno.

Se o perfil não tiver documents: bloco, renderize a seção com uma única linha: _No documents recorded — run jetson-link-docs or hand-edit the profile to add references._

Renderize e grave o KB

Renderize o Markdown usando a estrutura abaixo. Use a data de hoje (AAAA-MM-DD) no cabeçalho. Sempre sobrescreva qualquer arquivo KB existente no destino — não solicite confirmação antes de sobrescrever; a reexecução é o uso pretendido.

Destino: target-platform/.md.

Estrutura renderizada

# Target knowledge base — 

> Generated  from `` (BSP version ``).
> Re-run `jetson-generate-kb` after extracting a new BSP, applying
> patches, or editing profile fields. This file is a regenerated
> snapshot — do not hand-edit.

## Profile facts

- **Reference devkit:** ``
- **Module:** `-` (``)
- **Reference carrier:** `-`
- **Custom carrier:** `` (`-`)  _← omit this row if Case 1_
- **Active flash conf:** ``
- **BSP path:** ``
- **BSP version:** ``
- **Source root:** ``  _← or "_not recorded_" if NA_

## BSP image layout

Top-level directories under ``:

| Directory | Present | Purpose |
|---|---|---|
| `rootfs/`     | ✓ / ✗ | userspace rootfs (nvpmodel, nvfan, systemd units, etc.) |
| `bootloader/` | ✓ / ✗ | firmware blobs, BCT, MB1/MB2 dts |
| `kernel/`     | ✓ / ✗ | prebuilt kernel + modules |
| `source/`     | ✓ / ✗ | BSP source tree (kernel, OOT drivers, DT) |
| `tools/`      | ✓ / ✗ | flashing helpers, jetson-io, kernel_flash |
| `nv_tegra/`   | ✓ / ✗ | nvidia firmware tarballs, kernel-supplements |

Active flash conf ``: present at
`/` _or_ `(missing — verify before flashing)`.

### nvpmodel files matching the active SKU

Filtered from `rootfs/etc/nvpmodel/` by `nvpmodel__*.conf`:

- ``

The active variant at boot is selected by `nvpower.sh` from
`/proc/device-tree/compatible` plus super / safety state — see
`jetson-customize-nvpmodel` for the resolution rules.

## Source tree layout

(omit this whole section if `source.root_path` is `NA`/missing)

Top-level subtrees under ``:

| Subtree | Present | Purpose |
|---|---|---|
| `kernel-jammy-src/`   | ✓ / ✗ | mainline 5.x kernel sources |
| `hardware/nvidia/`    | ✓ / ✗ | NVIDIA platform DTs (per chip family) |
| `nvidia-oot/`         | ✓ / ✗ | NVIDIA out-of-tree kernel modules |
| `nvgpu/`              | ✓ / ✗ | GPU driver |
| `nvethernetrm/`       | ✓ / ✗ | ethernet driver |
| `nvdisplay/`          | ✓ / ✗ | display driver |
| `hwpm/`               | ✓ / ✗ | hardware performance monitor |
| `kernel-devicetree/`  | ✓ / ✗ | devicetree sources |

### Devicetree files for chip family ``

(omit if `kernel-devicetree/generic-dts/dts/` is absent)

Files matching `tegra*` under `kernel-devicetree/generic-dts/dts/`:

- ``

## Documents

| Field | Reference |
|---|---|
| Documents root folder                    | ``                    _or_ _not recorded_ |
| BSP / Jetson Linux developer guide       | ``         _or_ _not recorded_ |
| Tegra SoC Technical Reference Manual     | ``         _or_ _not recorded_ |
| Jetson module data sheet                 | ``           _or_ _not recorded_ |
| Jetson module design guide (PDG)         | ``         _or_ _not recorded_ |
| Jetson module thermal design guide (TDG) | `` _or_ _not recorded_ |
| Jetson module schematic                  | ``            _or_ _not recorded_ |
| Reference carrier board specification    | ``          _or_ _not recorded_ |
| Reference carrier schematic              | ``           _or_ _not recorded_ |
| Custom carrier schematic                 | ``    _or_ _not recorded / N/A (no custom carrier)_ |
| Reference-devkit pinmux spreadsheet      | ``       _or_ _not recorded_ |
| Custom-carrier pinmux spreadsheet        | ``   _or_ _not recorded / N/A (no custom carrier)_ |

(Local paths are tagged ` (missing)` if absent on disk. URLs are
recorded verbatim and not fetched. If `doc_root` is set, also tag
` (missing)` on it if the directory itself is gone — that signals
auto-mapping in `jetson-link-docs` won't work on a re-run.)

## How to refresh this file

Re-run `jetson-generate-kb` whenever any of the following changes:

- the BSP at `` is re-extracted, patched, or upgraded,
- the source tree at `` changes,
- the active profile's `bsp_image.*` or `documents.*` fields are edited.

This file is overwritten on every run. Do not hand-edit it — edit the
source data (profile YAML or the BSP tree) and re-run instead.

Confirmar

Imprimir um breve resumo:

  • Caminho de saída: target-platform/.md.
  • Contagem de diretórios de nível superior do BSP e quais subárvores canônicas estavam presentes/ausentes.
  • Contagem de correspondências do nvpmodel para o SKU ativo.
  • Seção da árvore de origem: renderizada ou ignorada (e por quê).
  • Documentos: contagem de campos registrados, contagem de caminhos locais sinalizados (missing).

Se uma skill a jusante acionou esta execução, informe ao usuário para reenviar sua solicitação original.

Pontos a serem observados

  • A KB é um instantâneo, não uma visualização em tempo real. O cabeçalho com data é referencial — se não corresponder à data de hoje, o BSP/fonte/documentos podem ter sofrido alterações no fundo. Reexecute sob demanda.
  • Sempre sobrescreve. Não há aviso antes de substituir a KB anterior em target-platform/.md. Isso é intencional — a possibilidade de reexecução é o objetivo principal. Informe ao usuário para não editar manualmente o arquivo; edite o YAML do perfil ou o BSP e gere novamente.
  • Recusa em bsp_image.root_path = NA. Um perfil sem caminho para o BSP produz um KB sem conteúdo. Não crie um — em vez disso, indique ao usuário o YAML do perfil para que ele preencha.
  • Sem busca de URLs. As URLs dos documentos são registradas literalmente. A implementação de indexação profunda (HTTP HEAD, análise de PDF) está fora do escopo da v0.1.
  • Sem varreduras recursivas. A descoberta ocorre em um nível de profundidade por diretório, com no máximo um padrão glob direcionado (nvpmodel + devicetree). Nunca percorra o BSP inteiro — ele é enorme e lento.
  • Limite as listagens da árvore de dispositivos a 30 entradas para manter a base de conhecimento legível. Mostre “primeiras 30 de N” ao truncar.
  • Não execute automaticamente a partir de habilidades de configuração. A configuração pode sugerir a execução desta habilidade em seu resumo, mas o usuário deve optar por isso. A execução automática oculta a etapa de E/S e surpreende os usuários cujos caminhos de BSP/doc estão incompletos.
  • Risco de conflito de nomes de arquivos. A Base de Conhecimento fica em target-platform/.md ao lado de .yaml. Não leia .md arquivos na lógica de listagem de perfis de jetson-set-target (ela já filtra para *.yaml, mas verifique antes de adicionar novos tipos de arquivo).
  • O mapa da família de chips é curto. Se um futuro SKU de módulo for adicionado e não estiver no mapa, a etapa de filtragem da árvore de dispositivos será ignorada — a base de conhecimento informará chip: unknown em vez de inventar um prefixo. Atualize a tabela de famílias de chips desta skill quando um novo chip for lançado.

Pré-requisitos

  • Perfil de destino ativo resolvido conforme ../../context/target-platform-contract.md.
  • bsp_image: registrado por /jetson-init-image; esta é a única árvore em disco necessária. Se source.root_path estiver faltando, renderize o KB sem a seção da árvore-fonte.
  • Opcional: /jetson-init-source já resolvido source: quando o usuário deseja que a descoberta da árvore-fonte seja incluída.
  • Opcional, mas recomendado: /jetson-link-docs já escreveu o documents: bloco.

Limitações

  • Somente leitura das árvores BSP e de código-fonte; nunca edita o perfil YAML nem reescreve arquivos de código-fonte.
  • A enumeração do arquivo devicetree depende da tabela de famílias de chips dentro desta habilidade; um SKU de módulo desconhecido é registrado no KB como chip: unknown em vez de um prefixo fabricado.
  • O formato do nome do arquivo é fixo em target-platform/.md para permanecer ao lado do YAML do perfil; renomear o YAML invalida o link.

Solução de problemas

  • bsp_image.root_path não encontrado — execute novamente /jetson-init-image para que o BSP seja extraído e o caminho seja registrado antes de regenerar o KB.
  • A varredura na árvore de código-fonte seleciona subárvores erradas — source.root_path a substituição está desatualizada; reexecute /jetson-init-source ou corrija o campo de perfil.
  • documents: bloco ausente do KB — /jetson-link-docs nunca foi executado; o KB recorre à opção “nenhum documento vinculado” em vez de adivinhar caminhos.
  • Seção da árvore de dispositivos incompleta/vazia — a tabela de famílias de chips não abrange o SoC ativo; atualize a tabela e execute novamente.

Referências

  • ../../context/target-platform-contract.md — contrato de ordem de leitura seguido por esta habilidade.
  • ../../context/bsp-customization-workflow.md — origem da lista canônica de subárvores de BSP/fonte.
  • ../../references/platform_template.yaml — fonte das descrições de uma linha do campo “documentos”.
  • ../jetson-init-target/SKILL.md — habilidade irmã que cria a identidade do destino ativo.
  • ../jetson-init-image/SKILL.md — habilidade irmã que cria os metadados da imagem BSP que esta habilidade analisa.
  • ../jetson-set-target/SKILL.md — habilidade irmã que alterna o ponteiro ativo que esta habilidade resolve.
Ver no GitHub
---
name: jetson-generate-kb
description: Generates a per-target knowledge-base markdown file by walking the BSP root and source tree, documenting image layout, source tree structure, and document references.
license: Apache-2.0
---

# Generate Target Knowledge Base

## Overview

This skill produces a **per-profile** markdown reference at
`target-platform/<profile-stem>.md` (sibling to the profile YAML). It
bundles three things into one file so a future Claude session — or the
user — can see the shape of the active target without re-walking the
filesystem:

1. **BSP image layout** — top-level directories under
   `bsp_image.root_path`, presence of canonical subtrees (`rootfs/`,
   `bootloader/`, `source/`, …), and the nvpmodel variants matching
   the active module SKU.
2. **Source tree layout** — top-level subtrees under
   `source.root_path` (`kernel-jammy-src/`, `hardware/nvidia/`,
   `nvidia-oot/`, etc.) and devicetree files matching the chip family.
3. **Documents** — the `documents.*` references recorded in the
   profile, with local-path existence checks and one-line descriptions.

The KB is a **snapshot**, dated in its header. Re-run this skill
whenever the underlying data changes — it is intentionally
re-runnable and overwrites the previous KB on each run.

## When to invoke

- After `jetson-init-image` prepares the BSP for a freshly authored
  profile.
- After re-extracting a BSP archive or applying patches under
  `bsp_image.root_path`.
- After updating the source tree at `source.root_path`.
- After editing `bsp_image.*` or `documents.*` in the profile YAML.
- When a downstream skill asks "where is X in this BSP?" and you'd
  rather check the KB than re-walk the tree.

## Procedure

### Resolve the active target

Resolve the active profile per the contract in
[`../../context/target-platform-contract.md`](../../context/target-platform-contract.md);
cache it in memory — the rest of the skill consumes only this
profile. Record `<profile-stem>` (the bare filename minus `.yaml`)
as the KB output filename stem.

### Validate inputs

| Field | Required for KB? | If missing |
|---|---|---|
| `bsp_image.root_path` | **yes** | Refuse. A KB with no BSP root to scan is just a YAML restatement; tell the user to run `jetson-init-image` or hand-edit the profile. |
| `source.root_path` | no | Skip the source-tree section; note "source_root not recorded" in the KB. |
| `documents.*` | no | Render an empty Documents table with a "no documents recorded" note. |

If `bsp_image.root_path` is set but the directory does not exist on disk,
refuse with a clear message — do not fabricate a layout for a path
that isn't there.

### BSP discovery (under `bsp_image.root_path`)

Run **only** the following cheap operations — no recursive scans, no
file content reads beyond directory listings:

1. `ls -1` of `bsp_image.root_path` (one level deep). Record which
   directories are present.
2. For each canonical subtree below, mark present/absent:
   `rootfs/`, `bootloader/`, `kernel/`, `source/`, `tools/`,
   `nv_tegra/`.
3. Verify the active `flash_config` file exists at
   `<bsp_image.root_path>/<flash_config>`. Record its path or
   `(missing)`.
4. List `rootfs/etc/nvpmodel/` and filter to filenames matching
   `nvpmodel_<module.id>_<module.sku>*.conf`. Record each match.
   Use the lower-case module id (e.g. `p3767`) and the YAML-quoted
   sku string (e.g. `0001`).

### Source tree discovery (under `source.root_path`)

Skip this step entirely if `source.root_path` is `NA` or missing.
Otherwise, run only:

1. `ls -1` of `source.root_path` (one level deep).
2. For each canonical subtree below, mark present/absent:
   `kernel-jammy-src/`, `hardware/nvidia/`, `nvidia-oot/`, `nvgpu/`,
   `nvethernetrm/`, `nvdisplay/`, `hwpm/`, `kernel-devicetree/`.
3. If `kernel-devicetree/generic-dts/dts/` exists, list filenames
   matching `tegra<chip>*` where `<chip>` is the chip-family numeric
   prefix (see chip-family map below). Record up to 30 hits; if more,
   record the count and a "showing first 30" note.

#### Chip-family map (used in the "BSP discovery" and "Source tree discovery" steps)

Derive `<chip>` from `module.id`:

| `module.id` | Chip family | `<chip>` prefix |
|---|---|---|
| `p3701`, `p3767` | T234 — Orin | `234` |
| `p3834` | T264 — Thor | `264` |

If `module.id` is not in this table, record the chip as
`unknown (module.id=<value>)` and skip the chip-prefixed devicetree
filter.

### Documents pass

For each field in `documents.*` from the loaded profile:

1. Classify the value as **URL** (starts with `http://`, `https://`,
   or `ftp://`) or **local path** (anything else).
2. For URLs: record verbatim. **Do not fetch the URL** — KB
   generation must remain offline. (A future skill can promote to deep
   indexing.)
3. For local paths: check `os.path.exists`. Record the path; if
   missing on disk, append ` (missing)`.

The one-line description for each field comes from the marker in
[`../../references/platform_template.yaml`](../../references/platform_template.yaml)
— strip the `<OPTIONAL: …>` wrapper and use the inner text.

If the profile has no `documents:` block, render the section with a
single line: `_No documents recorded — run `jetson-link-docs`
or hand-edit the profile to add references._`

### Render and write the KB

Render the markdown using the structure below. Use today's date
(YYYY-MM-DD) in the header. Always overwrite any existing KB file at
the destination — do not prompt before overwriting; re-runs are the
intended use.

Destination: `target-platform/<profile-stem>.md`.

#### Rendered structure

```markdown
# Target knowledge base — <profile-stem>

> Generated <YYYY-MM-DD> from `<bsp_image.root_path>` (BSP version `<bsp_image.version>`).
> Re-run `jetson-generate-kb` after extracting a new BSP, applying
> patches, or editing profile fields. This file is a regenerated
> snapshot — do not hand-edit.

## Profile facts

- **Reference devkit:** `<reference_devkit.name>`
- **Module:** `<module.id>-<module.sku>` (`<chip family label>`)
- **Reference carrier:** `<carrier.id>-<carrier.sku>`
- **Custom carrier:** `<custom_carrier.name>` (`<custom_carrier.id>-<custom_carrier.sku>`)  _← omit this row if Case 1_
- **Active flash conf:** `<flash_config>`
- **BSP path:** `<bsp_image.root_path>`
- **BSP version:** `<bsp_image.version>`
- **Source root:** `<source.root_path>`  _← or "_not recorded_" if NA_

## BSP image layout

Top-level directories under `<bsp_image.root_path>`:

| Directory | Present | Purpose |
|---|---|---|
| `rootfs/`     | ✓ / ✗ | userspace rootfs (nvpmodel, nvfan, systemd units, etc.) |
| `bootloader/` | ✓ / ✗ | firmware blobs, BCT, MB1/MB2 dts |
| `kernel/`     | ✓ / ✗ | prebuilt kernel + modules |
| `source/`     | ✓ / ✗ | BSP source tree (kernel, OOT drivers, DT) |
| `tools/`      | ✓ / ✗ | flashing helpers, jetson-io, kernel_flash |
| `nv_tegra/`   | ✓ / ✗ | nvidia firmware tarballs, kernel-supplements |

Active flash conf `<flash_config>`: present at
`<bsp_image.root_path>/<flash_config>` _or_ `(missing — verify before flashing)`.

### nvpmodel files matching the active SKU

Filtered from `rootfs/etc/nvpmodel/` by `nvpmodel_<module.id>_<module.sku>*.conf`:

- `<each match, one per line>`

The active variant at boot is selected by `nvpower.sh` from
`/proc/device-tree/compatible` plus super / safety state — see
`jetson-customize-nvpmodel` for the resolution rules.

## Source tree layout

(omit this whole section if `source.root_path` is `NA`/missing)

Top-level subtrees under `<source.root_path>`:

| Subtree | Present | Purpose |
|---|---|---|
| `kernel-jammy-src/`   | ✓ / ✗ | mainline 5.x kernel sources |
| `hardware/nvidia/`    | ✓ / ✗ | NVIDIA platform DTs (per chip family) |
| `nvidia-oot/`         | ✓ / ✗ | NVIDIA out-of-tree kernel modules |
| `nvgpu/`              | ✓ / ✗ | GPU driver |
| `nvethernetrm/`       | ✓ / ✗ | ethernet driver |
| `nvdisplay/`          | ✓ / ✗ | display driver |
| `hwpm/`               | ✓ / ✗ | hardware performance monitor |
| `kernel-devicetree/`  | ✓ / ✗ | devicetree sources |

### Devicetree files for chip family `<chip>`

(omit if `kernel-devicetree/generic-dts/dts/` is absent)

Files matching `tegra<chip>*` under `kernel-devicetree/generic-dts/dts/`:

- `<each match, one per line — cap at 30, then a "first 30 of N" note>`

## Documents

| Field | Reference |
|---|---|
| Documents root folder                    | `<doc_root>`                    _or_ _not recorded_ |
| BSP / Jetson Linux developer guide       | `<bsp_developer_guide>`         _or_ _not recorded_ |
| Tegra SoC Technical Reference Manual     | `<soc_tech_ref_manual>`         _or_ _not recorded_ |
| Jetson module data sheet                 | `<module_data_sheet>`           _or_ _not recorded_ |
| Jetson module design guide (PDG)         | `<module_design_guide>`         _or_ _not recorded_ |
| Jetson module thermal design guide (TDG) | `<module_thermal_design_guide>` _or_ _not recorded_ |
| Jetson module schematic                  | `<module_schematic>`            _or_ _not recorded_ |
| Reference carrier board specification    | `<carrier_board_spec>`          _or_ _not recorded_ |
| Reference carrier schematic              | `<carrier_schematic>`           _or_ _not recorded_ |
| Custom carrier schematic                 | `<custom_carrier_schematic>`    _or_ _not recorded / N/A (no custom carrier)_ |
| Reference-devkit pinmux spreadsheet      | `<ref_devkit_pinmux_xls>`       _or_ _not recorded_ |
| Custom-carrier pinmux spreadsheet        | `<custom_carrier_pinmux_xls>`   _or_ _not recorded / N/A (no custom carrier)_ |

(Local paths are tagged ` (missing)` if absent on disk. URLs are
recorded verbatim and not fetched. If `doc_root` is set, also tag
` (missing)` on it if the directory itself is gone — that signals
auto-mapping in `jetson-link-docs` won't work on a re-run.)

## How to refresh this file

Re-run `jetson-generate-kb` whenever any of the following changes:

- the BSP at `<bsp_image.root_path>` is re-extracted, patched, or upgraded,
- the source tree at `<source.root_path>` changes,
- the active profile's `bsp_image.*` or `documents.*` fields are edited.

This file is overwritten on every run. Do not hand-edit it — edit the
source data (profile YAML or the BSP tree) and re-run instead.
```

### Confirm

Print a short summary:

- Output path: `target-platform/<profile-stem>.md`.
- BSP top-level directory count and which canonical subtrees were
  present / absent.
- nvpmodel match count for the active SKU.
- Source-tree section: rendered or skipped (and why).
- Documents: count of recorded fields, count of local paths flagged
  `(missing)`.

If a downstream skill triggered this run, tell the user to re-issue
their original request.

## Gotchas

- **The KB is a snapshot, not a live view.** The dated header is
  authoritative — if it doesn't match today, the BSP/source/docs may
  have changed underneath. Re-run on demand.
- **Always overwrites.** No prompt before clobbering the previous KB
  at `target-platform/<profile-stem>.md`. This is intentional —
  re-runnability is the whole point. Tell the user not to hand-edit
  the file; edit profile YAML or the BSP and regenerate.
- **Refuses on `bsp_image.root_path = NA`.** A profile with no BSP path
  produces a content-free KB. Do not write one — instead, point the
  user at the profile YAML to fill in.
- **No URL fetching.** Document URLs are recorded verbatim. Promoting
  to deep indexing (HTTP HEAD, PDF parsing) is out of scope for v0.1.
- **No recursive scans.** Discovery is one level deep per directory,
  with at most one targeted glob (nvpmodel + devicetree). Never walk
  the entire BSP — it's huge and slow.
- **Cap devicetree listings at 30 entries** to keep the KB readable.
  Show "first 30 of N" when truncating.
- **Don't auto-invoke from setup skills.** Setup may suggest running
  this skill in its summary, but the user opts in. Auto-running hides
  the I/O step and surprises users whose BSP/doc paths are incomplete.
- **Filename collision risk.** The KB sits at
  `target-platform/<stem>.md` next to `<stem>.yaml`. Don't accidentally
  read `.md` files in the profile-listing logic of
  `jetson-set-target` (it already filters to `*.yaml`, but check
  before adding new file types).
- **Chip-family map is short.** If a future module SKU is added that
  isn't in the map, the devicetree filter step is skipped — the KB
  will note `chip: unknown` rather than fabricate a `<chip>` prefix.
  Update this skill's chip-family table when a new chip lands.

## Prerequisites

- Active target profile resolved per
  `../../context/target-platform-contract.md`.
- `bsp_image:` recorded by `/jetson-init-image`; this is the only
  required on-disk tree. If `source.root_path` is missing, render the KB
  without the source-tree section.
- Optional: `/jetson-init-source` already resolved `source:` when the
  user wants source-tree discovery included.
- Optional but recommended: `/jetson-link-docs` already wrote the
  `documents:` block.

## Limitations

- Read-only against the BSP and source trees; never edits the profile
  YAML or rewrites source files.
- Devicetree-file enumeration depends on the chip-family table inside
  this skill; an unknown module SKU lands in the KB as `chip: unknown`
  rather than a fabricated prefix.
- Filename layout is fixed at `target-platform/<stem>.md` to stay next
  to the profile YAML; renaming the YAML invalidates the link.

## Troubleshooting

- **`bsp_image.root_path` not found** — re-run `/jetson-init-image` so
  the BSP is extracted and the path is recorded before regenerating
  the KB.
- **Source tree walk picks up wrong subtrees** — `source.root_path`
  override is stale; rerun `/jetson-init-source` or correct the
  profile field.
- **`documents:` block missing from the KB** — `/jetson-link-docs` was
  never run; the KB falls back to "no documents bound" rather than
  guessing paths.
- **Devicetree section short / empty** — chip-family table doesn't
  cover the active SoC; update the table and rerun.

## References

- [`../../context/target-platform-contract.md`](../../context/target-platform-contract.md) — read-order contract this skill follows.
- [`../../context/bsp-customization-workflow.md`](../../context/bsp-customization-workflow.md) — origin of the canonical BSP/source subtree list.
- [`../../references/platform_template.yaml`](../../references/platform_template.yaml) — source of the documents-field one-line descriptions.
- [`../jetson-init-target/SKILL.md`](../jetson-init-target/SKILL.md) — sibling skill that authors the active target identity.
- [`../jetson-init-image/SKILL.md`](../jetson-init-image/SKILL.md) — sibling skill that authors the BSP image metadata this skill scans.
- [`../jetson-set-target/SKILL.md`](../jetson-set-target/SKILL.md) — sibling skill that flips the active pointer this skill resolves.

Todos os arquivos

5 arquivos
SKILL.md 14.9k
Ver

Instalar jetson-generate-kb

Baixe e descompacte os arquivos de habilidades no diretório .claude/skills/.

Baixar ZIP

Clone o repositório e copie os arquivos da habilidade para o seu projeto.

git clone https://github.com/NVIDIA/skills/tree/main/skills/jetson-generate-kb # Copy SKILL.md to your .claude/skills/ directory

Copiar Copiar
Configuração rápida: Copie a pasta da habilidade para .claude/skills/ O Claude detectará e utilizará automaticamente a habilidade
Repositório NVIDIA/skills

Habilidades relacionadas

tc-tracker
Tempo atualizado 27 de Agosto de 2026
nuxthub
Tempo atualizado 23 de Agosto de 2026
golang-dependency-injection
Tempo atualizado 29 de Junho de 2026
altimate-data-engineering-skills
Tempo atualizado 23 de Agosto de 2026
OR