โ† All skills
Tencent SkillHub ยท Developer Tools

sonic-build

Build SONiC (Software for Open Networking in the Cloud) switch images from sonic-buildimage. Use when building VS/ASIC images, configuring build parallelism/...

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Build SONiC (Software for Open Networking in the Cloud) switch images from sonic-buildimage. Use when building VS/ASIC images, configuring build parallelism/...

โฌ‡ 0 downloads โ˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
SKILL.md, references/prerequisites.md, references/troubleshooting.md, references/vs-platform.md, scripts/prerequisites.sh

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.1.0

Documentation

ClawHub primary doc Primary doc: SKILL.md 16 sections Open source page

Quick Start

cd sonic-buildimage make init make configure PLATFORM=vs # or broadcom, mellanox, etc. make SONIC_BUILD_JOBS=4 target/sonic-vs.img.gz For dev builds (skip tests): add BUILD_SKIP_TEST=y.

Build Architecture

Two-phase build via GNU Make โ†’ slave.mk โ†’ sonic-slave Docker container: Bookworm phase โ€” compile all packages (debs, python wheels, Docker images) into target/debs/bookworm/ Trixie phase โ€” assemble final image from phase 1 packages into target/debs/trixie/ Makefile invokes Makefile.work with different BLDENV per phase. The configure target creates per-distro directories.

Configuration

All knobs in rules/config. Override in rules/config.user (gitignored, persists across rebases).

Key Knobs

KnobDefaultRecommendedEffectSONIC_CONFIG_BUILD_JOBS14Parallel top-level package buildsSONIC_CONFIG_MAKE_JOBS$(nproc)defaultCompiler threads per packageBUILD_SKIP_TESTny (dev)Skip unit testsSONIC_BUILD_MEMORYunset24gDocker --memory โ€” contains OOM in containerSONIC_DPKG_CACHE_METHODnonerwcacheCache .deb packages for incremental buildsDEFAULT_BUILD_LOG_TIMESTAMPnonesimpleTimestamps in build logsSONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILDunsetyHost Docker daemon instead of DinD

Recommended rules/config.user

SONIC_CONFIG_BUILD_JOBS = 4 BUILD_SKIP_TEST = y SONIC_BUILD_MEMORY = 24g DEFAULT_BUILD_LOG_TIMESTAMP = simple

Parallelism

Rule of thumb: JOBS ร— 6GB โ‰ค available RAM. JOBS=1: ~3h VS build, ~10GB RAM JOBS=4: significant speedup, ~20GB RAM JOBS=8: OOM risk on <48GB RAM Why JOBS=1 is slow: 64/194 packages depend on libswsscommon (critical path bottleneck). JOBS=1 leaves most cores idle.

Memory Protection

Without limits, parallel builds can trigger the kernel OOM killer on any host process. # Container-scoped OOM (host stays healthy): SONIC_BUILD_MEMORY = 24g # Or via CLI: make SONIC_BUILDER_EXTRA_CMDLINE="--memory=24g" ...

DPKG cache (package-level)

SONIC_DPKG_CACHE_METHOD = rwcache SONIC_DPKG_CACHE_SOURCE = /var/cache/sonic/artifacts

Version cache (downloads)

SONIC_VERSION_CACHE_METHOD = cache

Rebuilding a Single Package

make target/debs/bookworm/sonic-utilities_1.2-1_all.deb make target/docker-syncd-vs.gz ls target/debs/bookworm/ | grep <name>

Clean Builds

When to clean: after branch switch, rebase, or unexplained failures. rm -rf target/* # always full clean, not selective make configure PLATFORM=vs make SONIC_BUILD_JOBS=4 target/sonic-vs.img.gz Stale artifacts (.bin, squashfs) confuse make into skipping phases.

Submodules

make init # after clone or pull git submodule update --init --force src/<module> # fix corrupted submodule SSH clone is more reliable than HTTPS (HTTPS can give HTTP 500).

Common Pitfalls

For detailed troubleshooting, see references/troubleshooting.md.

Prerequisites

See references/prerequisites.md for host setup (Docker, Python, jinjanator).

VS Platform Notes

See references/vs-platform.md for VS-specific details (TAP devices, port mapping, sai.profile, oper speed).

PR Submission

Single commit per PR (squash before push) git commit -s for DCO sign-off Rebase to latest master before force-push Add tests โ€” run BUILD_SKIP_TEST=n at least once Monitor CI after push

Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
4 Docs1 Scripts
  • SKILL.md Primary doc
  • references/prerequisites.md Docs
  • references/troubleshooting.md Docs
  • references/vs-platform.md Docs
  • scripts/prerequisites.sh Scripts