跳到正文
TakoAPI
返回技能列表

sonic-build

由 rustiqly 提供

Coding Agents & IDEs
491下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Build SONiC (Software for Open Networking in the Cloud) switch images from sonic-buildimage.

描述

该技能的功能

Builds SONiC switch images from the sonic-buildimage repository across all supported platforms. Covers parallelism tuning, memory limits, DPKG caching, single-package rebuilds, submodule management, and artifact cleanup.

sonic-buildimage's interactions between parallelism, memory limits, caching, and two-phase build logic are non-obvious, and wrong settings routinely cause silent failures or kernel OOM kills.

何时使用

  • Building a VS image for local SONiC simulation
  • Tuning parallel build jobs to fit available RAM
  • Rebuilding a single .deb package after a source change
  • Setting up DPKG cache for faster incremental builds
  • Diagnosing OOM kills during parallel Docker builds

示例工作流

输入

User asks: Build a VS image with 4 parallel jobs and package caching enabled

智能体
  1. 1

    Run make init to initialize submodules after cloning

  2. 2

    Run make configure PLATFORM=vs to set the VS target platform

  3. 3

    Write SONIC_CONFIG_BUILD_JOBS=4, BUILD_SKIP_TEST=y, and SONIC_DPKG_CACHE_METHOD=rwcache to rules/config.user

  4. 4

    Run make SONIC_BUILD_JOBS=4 target/sonic-vs.img.gz to start the build

  5. 5

    Confirm sonic-vs.img.gz appears in target/ and cached .deb packages are stored for subsequent builds

输出

sonic-vs.img.gz produced in target/ with .deb packages cached for faster incremental rebuilds

安装

clawhub install rustiqly/sonic-build

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接