sonic-net / sonic-buildimage
Scripts which perform an installable binary image build for SONiC
github.com/sonic-net/sonic-buildimageIndexed at db02833Up to date with upstream
What is sonic-buildimage?
sonic-buildimage is a build system for creating installable ONIE-compatible SONiC network operating system images and Docker images for network switches. It uses Make targets, Docker, platform-specific configuration, and build scripts to assemble images per ASIC platform. The repository uses Python, C, C++, shell, Makefile, and Rust code, with C as its primary language.
Written by a model from the README and the source
9,481 files and 136,982 symbols in 8 modules, led by Python (3,386 files) and C (1,339).
Code health
This codebase scores 8.9 out of 10 for code health, which we rate excellent. It also scores maintainability 8.9 and static performance 9.8 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 24 of 9,481 files are git hotspots, and they average 4.9 — which is where the fixes pay off most.
Use sonic-net/sonic-buildimage in your agent
Point Claude Code, Cursor, Codex or VS Code at this repository. Your agent gets the index this page is built from: cited answers, callers, history and health for any file.
- 1.In Claude, open Customize → Connectors, click +, then Add custom connector. On a Team or Enterprise plan an owner adds it first under Organization settings → Connectors.
- 2.Paste the server URL below as the Remote MCP server URL, then click Add.
- 3.Click Connect. A Repowise sign-in window opens. Approve access.
- 4.Repowise's tools are now available in your Claude chats.
Connect with one click. Sign in with Repowise (OAuth), no API key to copy. Works in Claude on the web, desktop, and mobile.
Docshttps://api.repowise.dev/mcp/sonic-net/sonic-buildimage
This repo is public, so anyone with a Repowise account and an API key can connect.
Try asking
- get_overview()
- get_answer("how is sonic-buildimage put together?")
- get_why("why is sonic-buildimage structured this way?")
Explore sonic-buildimage
- DocumentationModule-by-module documentation, 16,705 pages.
- ArchitectureDependency graph, layers and third-party dependencies.
- Code healthEvery file's score and the findings behind it.
- CommitsEach commit's effect on code health.
- OverviewEverything else the index found: contributors, decisions, what changed this week.
Key features of sonic-buildimage
- Builds ONIE-compatible SONiC installer images for network switches.
- Builds Docker images that run inside the SONiC network operating system.
- Builds images per ASIC platform so switches using the same ASIC platform can share an image.
- Supports ARMHF and ARM64 platform builds, including cross-compilation for an ARMHF Marvell Prestera build.
- Builds Broadcom ONIE and EOS images for the applicable devices.
- Supports debug Docker images and debug SONiC installer images with debugging tools and symbols.
How sonic-net/sonic-buildimage works
Build configuration enters through Make targets such as make configure, which selects an ASIC platform and architecture. The Makefile-driven process uses Docker-based build environments and scripts to compile packages, create Docker images, and assemble installer images. The platform directory provides ASIC and hardware-specific components, while the device directory contains device-related build content. The src directory contains SONiC source components used during the build. The dockers directory defines Docker image build content, and the files directory provides build files used by the image-generation process. Outputs are written under target/, including installer images, Docker archives, and Debian packages.
The codebase has 9,481 files and 136,982 symbols in 8 modules, led by Python, C and C++. Code health is 8.9 out of 10, rated excellent.
Getting started with sonic-buildimage
- Configure the build for an ASIC platform and architecture.
make configure PLATFORM=[ASIC_VENDOR] PLATFORM_ARCH=arm64 - Build an installer image for a configured platform.
make target/sonic-[ASIC_VENDER]-armhf.bin - Build an individual Docker image.
make target/docker-database.gz
Commands copied from the README
sonic-net/sonic-buildimage FAQ
What is sonic-buildimage?
sonic-buildimage is a build system for SONiC network operating system installer images and Docker images. It creates ONIE-compatible images for network switches and builds images per ASIC platform.
How does sonic-buildimage work?
sonic-buildimage uses Make targets, Docker build environments, and platform-specific configuration to compile packages and assemble images. Outputs include installer images, Docker archives, and Debian packages under target/.
How do I install sonic-buildimage?
sonic-buildimage uses an automated prerequisites script to install required packages, configure Docker, and clone the repository. The script is run with curl and bash.
What language is sonic-buildimage written in?
sonic-buildimage is primarily written in C. Its repository also includes Python, C++, shell, Makefile, and Rust code.
How is the sonic-buildimage code organized?
sonic-buildimage organizes platform-specific code in platform, device-related content in device, source components in src, Docker build content in dockers, and build files in files.
Who is sonic-buildimage for?
sonic-buildimage is for building SONiC network operating system installer images and Docker images for network switches. It supports ASIC-specific and architecture-specific builds.
The summary, features and answers on this page are written by a model from the README and the source, and refreshed with each index.
About this page
Get a page like this for your own codebase
Repowise built this map of sonic-net/sonic-buildimage from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.
Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.
Maintain sonic-net/sonic-buildimage?
Claim this page, add a badge to the README, or re-index it.
Claim this page
Sign in with GitHub and we check that you are an admin or maintainer of sonic-net/sonic-buildimage. Then add a badge to the README that links readers here.
Add a badge to your README
Every badge is public, cached, and updates on its own after every index. Nothing to install.
Repowise badge
Links to this page, with no score on it. Adding it also re-indexes the repo every week.
[](https://repowise.dev/repo/sonic-net/sonic-buildimage?src=badge_wiki)Code health badge
The repo's health score out of 10, from the latest index.
[](https://repowise.dev/repo/sonic-net/sonic-buildimage?src=badge_health)Code health card
A larger card with the score, its change since the last index, and when it was measured. The HTML version follows the reader's light or dark theme.
[](https://repowise.dev/repo/sonic-net/sonic-buildimage?src=badge_card)