Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate device-specific files; install as a Debian package #316

Merged
merged 27 commits into from
Feb 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ba73c46
Move device-specific files from sonic-config-engine to new directory …
jleveque Feb 17, 2017
9b75dd4
Add device-specific files from external sonic-utilities
jleveque Feb 17, 2017
a4a8eb3
Remove ACS-S6000; Move files under Force10-S6000
jleveque Feb 17, 2017
f0f223c
Add files for Arista-7050-QX32 and Force10-S6100
jleveque Feb 17, 2017
30a33b2
sonic-config-engine no longer installs device-specific files
jleveque Feb 18, 2017
cbcf87a
[All platforms]: Move sensors.conf from under HW SKU dirs to under pl…
jleveque Feb 18, 2017
06adc00
[All platforms]: eeprom.py and sfputil.py now reference new SONiC uti…
jleveque Feb 18, 2017
d0fc7e4
Now building sonic-utilities as SONIC_PYTHON_STDEB_DEBS
jleveque Feb 18, 2017
caa3e82
Add files for creating sonic-device-data Debian package
jleveque Feb 21, 2017
c7ae52a
Fix full version string
jleveque Feb 21, 2017
2779789
Fix source path
jleveque Feb 21, 2017
af632c0
Rearrange sonic-device-data directory for clean build of Debian package
jleveque Feb 22, 2017
ef6d089
Re-add existing platform-specific files to sonic-config-engine for no…
jleveque Feb 23, 2017
163a4e0
Mount platform and hwsku directories in every docker
jleveque Feb 23, 2017
457f98c
Install sonic-device-data in OneImage; Refactor sonic-utilities depen…
jleveque Feb 23, 2017
90e5031
Move eeprom.py and sfputil.py files to respective <platform>/plugins …
jleveque Feb 23, 2017
707b1eb
Add files for Arista-7060-CX32S and INGRASYS-S9100-C32
jleveque Feb 24, 2017
11288e3
Add device-specific SAI profiles from sonic-sairedis repo
jleveque Feb 24, 2017
e6b88af
Move file to proper device
jleveque Feb 24, 2017
7a78611
Update sonic-utilities submodule pointer
jleveque Feb 24, 2017
394e0b2
Reorder steps and update apt so that extra apt repos are available be…
jleveque Feb 24, 2017
9313b68
Update sonic-utilities submodule pointer
jleveque Feb 25, 2017
9d26f8c
Remove explicit install of sonic-utilities dependencies
jleveque Feb 26, 2017
ebe7ecd
Fix version mismatch with sonic-device-data package
jleveque Feb 26, 2017
cd1c126
Add sonic-device-data to base image; cleanup rule
jleveque Feb 26, 2017
038635a
Reference new name of sonic-utilities Debian package.
jleveque Feb 27, 2017
c75df06
Fix typos, grammar and formatting in README.md
jleveque Feb 27, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ src/snmpd/*
!src/snmpd/Makefile
src/thrift/*
!src/thrift/Makefile
src/sonic-device-data/src/device/

# Autogenerated Dockerfiles
dockers/docker-database/Dockerfile
Expand Down
80 changes: 41 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,89 @@
Broadcom[![Broadcom](https://sonic-jenkins.westus.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all)
Cavium[![Cavium](https://sonic-jenkins.westus.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/)
Mellanox[![Mellanox](https://sonic-jenkins.westus.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all)
P4[![Broadcom](https://sonic-jenkins.westus.cloudapp.azure.com/job/p4/job/buildimage-p4-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/p4/job/buildimage-p4-all)
Broadcom: [![Broadcom](https://sonic-jenkins.westus.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all)
Cavium: [![Cavium](https://sonic-jenkins.westus.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/)
Mellanox: [![Mellanox](https://sonic-jenkins.westus.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all)
P4: [![Broadcom](https://sonic-jenkins.westus.cloudapp.azure.com/job/p4/job/buildimage-p4-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/p4/job/buildimage-p4-all)

# Build SONiC Switch Images - buildimage
# sonic-buildimage

## Build SONiC Switch Images

# Description
Build an [Open Network Install Environment (ONIE)](https://github.com/opencomputeproject/onie) compatiable network operating system (NOS) installer image for network switches, and also build docker images running inside the NOS.

# Prerequisite
# SAI Version
# Prerequisites

## SAI Version
SONiC V2 is using [SAI 0.9.4](https://github.com/opencomputeproject/SAI/tree/v0.9.4).

# Clone or fetch the code repository with all git submodules
To clone the code repository recursively, assuming git version 1.9 or newer
## Clone or fetch the code repository with all git submodules
To clone the code repository recursively, assuming git version 1.9 or newer:

git clone --recursive https://github.com/Azure/sonic-buildimage.git

If it is already cloned, however there is no files under ./dockers/docker-base/ or ./src/sonic-linux-kernel/, manually fetch all the git submodules.

NOTE: If the repo has already been cloned, however there are no files under the submodule directories (e.g., src/lldpd, src/ptf, src/sonic-linux-kernel, etc.), you can manually fetch all the git submodules as follows:
git submodule update --init --recursive

You also need to change all git paths to relative path as we build all submodules inside the docker.
You also need to change all git paths to relative path as we build all submodules inside the docker:

git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'

# Usage
## Usage

To build NOS installer image and docker images, run command line
To build NOS installer image and docker images, run the following commands:

make configure PLATFORM=[ASIC_VENDOR] SKU=[HW_SKU]
make

**NOTE**: We recommend to reserve 50G free space to build one platform.
**NOTE**: We recommend reserving 50G free space to build one platform.

Supported PLATFORM AND SKU are:
Supported PLATFORM and SKU are:
- PLATFORM=broadcom SKU=Force10-S6000
- PLATFORM=mellanox SKU=ACS-MSN2700
- PLATFORM=cavium SKU=AS7512
- PLATFORM=p4

You can find rules/config file useful. It contains configuration options for build process, like adding more verbosity or showing dependencies, username and password for base image etc.
You may find the rules/config file useful. It contains configuration options for the build process, like adding more verbosity or showing dependencies, username and password for base image etc.

Every docker image is built and saved to target/ directory.
So, for instance, to build only docker-database, execute
So, for instance, to build only docker-database, execute:

make target/docker-database.gz

Same goes for debian packages, which are under target/debs/:

make target/debs/swss_1.0.0_amd64.deb

Every target has a clean target, so in order to clean swss, execute
Every target has a clean target, so in order to clean swss, execute:

make target/debs/swss_1.0.0_amd64.deb-clean

It is recommended to use clean targets to clean all packages, that are built together, like dev packages for instance. In order to be more familiar with build process and make some changes to it, it is recommended to read this short [Documentation](README.buildsystem.md).
It is recommended to use clean targets to clean all packages that are built together, like dev packages for instance. In order to be more familiar with build process and make some changes to it, it is recommended to read this short [Documentation](README.buildsystem.md).

# Note:
If you are running make for the first time, a sonic-slave-${USER} docker image will be built automatically.
It is a one time action, so be patient.
## Notes:
- If you are running make for the first time, a sonic-slave-${USER} docker image will be built automatically.
This may take a while, but it is a one-time action, so please be patient.

The root is disabled, but the created user could sudo.
- The root user account is disabled. However, the created user can sudo.

The target directory is ./target, containing the NOS installer image and docker images.
- sonic-generic.bin: SONiC switch installer image (ONIE compatiable)
- sonic-aboot.bin: SONiC switch installer image (Aboot compatiable)
- docker-base.gz: base docker image where other docker images are built from, only used in build process (gzip tar archive)
- docker-database.gz: docker image for in-memory key-value store, used as inter-process communication (gzip tar archive)
- docker-fpm.gz: docker image for quagga with fpm module enabled (gzip tar archive)
- docker-orchagent-brcm.gz: docker image for SWitch State Service (SWSS) on Broadcom platform (gzip tar archive)
- docker-orchagent-cavm.gz: docker image for SWitch State Service (SWSS) on Cavium platform (gzip tar archive)
- docker-orchagent-mlnx.gz: docker image for SWitch State Service (SWSS) on Mellanox platform (gzip tar archive)
- docker-syncd-brcm.gz: docker image for the daemon to sync database and Broadcom switch ASIC (gzip tar archive)
- docker-syncd-cavm.gz: docker image for the daemon to sync database and Cavium switch ASIC (gzip tar archive)
- docker-syncd-mlnx.gz: docker image for the daemon to sync database and Mellanox switch ASIC (gzip tar archive)
- docker-sonic-p4.gz: docker image for all-in-one for p4 software switch (gzip tar archive)
- The target directory is ./target, containing the NOS installer image and docker images.
- sonic-generic.bin: SONiC switch installer image (ONIE compatiable)
- sonic-aboot.bin: SONiC switch installer image (Aboot compatiable)
- docker-base.gz: base docker image where other docker images are built from, only used in build process (gzip tar archive)
- docker-database.gz: docker image for in-memory key-value store, used as inter-process communication (gzip tar archive)
- docker-fpm.gz: docker image for quagga with fpm module enabled (gzip tar archive)
- docker-orchagent-brcm.gz: docker image for SWitch State Service (SWSS) on Broadcom platform (gzip tar archive)
- docker-orchagent-cavm.gz: docker image for SWitch State Service (SWSS) on Cavium platform (gzip tar archive)
- docker-orchagent-mlnx.gz: docker image for SWitch State Service (SWSS) on Mellanox platform (gzip tar archive)
- docker-syncd-brcm.gz: docker image for the daemon to sync database and Broadcom switch ASIC (gzip tar archive)
- docker-syncd-cavm.gz: docker image for the daemon to sync database and Cavium switch ASIC (gzip tar archive)
- docker-syncd-mlnx.gz: docker image for the daemon to sync database and Mellanox switch ASIC (gzip tar archive)
- docker-sonic-p4.gz: docker image for all-in-one for p4 software switch (gzip tar archive)

# Contribution guide
## Contribution Guide

All contributors must sign a contribution license agreement before contributions can be accepted. Contact sonic-cla-agreements@microsoft.com.

### GitHub Workflow
## GitHub Workflow

We're following basic GitHub Flow. If you have no idea what we're talking about, check out [GitHub's official guide](https://guides.github.com/introduction/flow/). Note that merge is only performed by the repository maintainer.

Expand Down
33 changes: 33 additions & 0 deletions device/accton/x86_64-accton_as7512_32x-r0/AS7512/port_config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# name lanes
Ethernet0 16,17,18,19
Ethernet4 20,21,22,23
Ethernet8 24,25,26,27
Ethernet12 28,29,30,31
Ethernet16 32,33,34,35
Ethernet20 36,37,38,39
Ethernet24 40,41,42,43
Ethernet28 44,45,46,47
Ethernet32 0,1,2,3
Ethernet36 4,5,6,7
Ethernet40 8,9,10,11
Ethernet44 12,13,14,15
Ethernet48 48,49,50,51
Ethernet52 52,53,54,55
Ethernet56 56,57,58,59
Ethernet60 60,61,62,63
Ethernet64 127,126,125,124
Ethernet68 123,122,121,120
Ethernet72 115,114,113,112
Ethernet76 119,118,117,116
Ethernet80 79,78,77,76
Ethernet84 75,74,73,72
Ethernet88 64,65,66,67
Ethernet92 71,70,68,69
Ethernet96 111,110,109,108
Ethernet100 107,106,105,104
Ethernet104 103,102,101,100
Ethernet108 99,98,97,96
Ethernet112 95,94,93,92
Ethernet116 91,90,89,88
Ethernet120 87,86,85,84
Ethernet124 83,82,81,80
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# name lanes alias
Ethernet0 125,126,127,128 Ethernet1/1
Ethernet4 121,122,123,124 Ethernet2/1
Ethernet8 13,14,15,16 Ethernet3/1
Ethernet12 9,10,11,12 Ethernet4/1
Ethernet16 17,18,19,20 Ethernet5/1
Ethernet20 21,22,23,24 Ethernet6/1
Ethernet24 25,26,27,28 Ethernet7/1
Ethernet28 29,30,31,32 Ethernet8/1
Ethernet32 37,38,39,40 Ethernet9/1
Ethernet36 33,34,35,36 Ethernet10/1
Ethernet40 45,46,47,48 Ethernet11/1
Ethernet44 41,42,43,44 Ethernet12/1
Ethernet48 53,54,55,56 Ethernet13/1
Ethernet52 49,50,51,52 Ethernet14/1
Ethernet56 69,70,71,72 Ethernet15/1
Ethernet60 65,66,67,68 Ethernet16/1
Ethernet64 77,78,79,80 Ethernet17/1
Ethernet68 73,74,75,76 Ethernet18/1
Ethernet72 93,94,95,96 Ethernet19/1
Ethernet76 89,90,91,92 Ethernet20/1
Ethernet80 101,102,103,104 Ethernet21/1
Ethernet84 97,98,99,100 Ethernet22/1
Ethernet88 109,110,111,112 Ethernet23/1
Ethernet92 105,106,107,108 Ethernet24/1
Ethernet96 61,62,63,64 Ethernet25
Ethernet100 57,58,59,60 Ethernet26
Ethernet104 81,82,83,84 Ethernet27
Ethernet108 85,86,87,88 Ethernet28
Ethernet112 117,118,119,120 Ethernet29
Ethernet116 113,114,115,116 Ethernet30
Ethernet120 5,6,7,8 Ethernet31
Ethernet124 1,2,3,4 Ethernet32
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI_INIT_CONFIG_FILE=/etc/bcm/td2-a7050-qx32-32x40G.config.bcm
Loading