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

[config] parse optional fields from hwsku #7

Open
wants to merge 143 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
8939202
[docker-sonic-mgmt]: Upgrade Tgen API from 0.0.42 to 0.0.70 (#6275)
baiwei0427 Dec 24, 2020
bf693be
[platform/dx010] Remove unused pca9541 device init line (#6280)
pphuchar Dec 24, 2020
f6d1c4a
[barefoot] Fix y_profile_set to not reset link (#6238)
msosyak Dec 24, 2020
9aae9c9
[arm][build_debian] Clean up qemu-arm-static bin after collecting pos…
Sabareesh-Kumar-Anandan Dec 24, 2020
e93330e
[sonic-swss] submodule update (#6292)
Sabareesh-Kumar-Anandan Dec 24, 2020
4bb8ab3
Add support to start fdbsyncd when orchagent docker starts (#5979)
kishorekunal01 Dec 25, 2020
94e143c
[BFN] Updated SAI headers to v1.7.1 (#6294)
akokhan Dec 25, 2020
8060142
[build]: disable build sonic-slave-jessie by default (#6297)
lguohan Dec 25, 2020
2999dfa
[build][arm]: allow customize docker data root for multiarch docker
lguohan Dec 25, 2020
512eb6b
[build]: add arch name in sonic-slave docker image
lguohan Dec 25, 2020
9a51505
[build]: add message for sonic-slave-build
lguohan Dec 25, 2020
d40c9a1
[docker-base-buster][docker-config-engine-buster] No longer install P…
jleveque Dec 26, 2020
a79fcb4
[build]: add option to pull sonic-slave docker from registry (#6300)
lguohan Dec 26, 2020
8fd50e8
[submodule]: swss Tunnel Manager changes (#5843)
prsunny Dec 26, 2020
283ed8b
[doc]: add centec(arm64) and marvel(armhf) build badge
lguohan Dec 27, 2020
9c06df8
update mft tool to 4.15.3 (#6281)
keboliu Dec 27, 2020
470ed18
[build]: disable unit tests for sonic-utilities
lguohan Dec 27, 2020
721c68c
[sonic-utilities] Update sonic-utilities submodule to pick set of new…
gechiang Dec 28, 2020
51f896b
Add pmon daemons python3 build support (#6176)
Junchao-Mellanox Dec 28, 2020
162f0fd
[init_cfg]: allow enable/disable swss/teamd/syncd services (#6291)
lguohan Dec 28, 2020
ed58684
[docker-frr]: add static ipv6 loopback route to allow bgp to advertis…
lguohan Dec 27, 2020
b846b9d
[submodule]: update sonic-swss
lguohan Dec 27, 2020
9432bb8
[submodule]: update sonic-utilities
lguohan Dec 28, 2020
6efc0a8
Convert snmp.yml to configdb (#6205)
tsvanduyn Dec 28, 2020
23f1d51
[ipinip.json.j2] align mellanox configuration dst_ip with other platf…
stepanblyschak Dec 29, 2020
0b0da87
[build]: install node.js for non-amd64 sonic-slave docker
lguohan Dec 29, 2020
273846a
FRR 7.5
Nov 19, 2020
a7b8f89
Patch libyang1.0.184 so version and let frr 7.5 use the patched version
pavel-shirshov Nov 24, 2020
62662ac
No longer install some unnecessary Python 2 packages in host (#6301)
jleveque Dec 29, 2020
566ea4f
[system-health] Convert to Python 3 (#5886)
jleveque Dec 29, 2020
727a451
[build]: setup -t option in docker run correctly (#6320)
lguohan Dec 30, 2020
de4a3c8
[build]: change user name to lower case when used in sonic-slave tag …
lguohan Dec 30, 2020
119fd7f
[buildsystem] Fix syntax error: unexpected end of file in Makefile.wo…
nazariig Dec 30, 2020
a64994e
[sysctl] Increase hung_task_timeout_secs to 300 (#6312)
daall Dec 30, 2020
a1fe203
[Nokia]: EEPROM platform API Python3 compliance changes (#6318)
carl-nokia Dec 30, 2020
ba92a08
Minigraph ECMP parsing support (cleaner format) (#4985)
kktheballer Dec 30, 2020
40f69f0
[determine-reboot-cause] Skip invoking platform code for unit tests f…
vaibhavhd Dec 31, 2020
a165e63
[build]: fix syntax error when DOCKER_BASE_PULL is enabled
lguohan Dec 31, 2020
ef0088c
Enable the notify mode of rsyslogd imfile module used for supervisord…
abdosi Jan 1, 2021
70ba591
[sonic-swss-common] Update submodule (#6317)
Jan 1, 2021
3acf700
[mellanox]: Update Mellanox SDK to 4.4.2208 FW to *.2008.2208 (#6333)
keboliu Jan 1, 2021
c4156b8
[device/accton] Fix accton driver not been installed (#6327)
brandonchuang Jan 2, 2021
66fffed
[doc]: add 202012 branch in the PR request template
lguohan Jan 2, 2021
30a51c1
[build]: fix dpkg uninstall bug
lguohan Jan 1, 2021
d365d0d
[build]: check if package with given version is installed or not
lguohan Jan 1, 2021
f2c418e
[frr]: remove dependency betwee frr and frr-snmp
lguohan Jan 1, 2021
ae2cb47
[build]: add artifical dependency between libyang and frr
lguohan Dec 30, 2020
36fbc01
Fix the hostimage version path permission issue (#6337)
xumia Jan 3, 2021
c6253f6
[sonic-py-common] Added an API to get file path containing SONiC vers…
smaheshm Jan 3, 2021
618b4bf
[broadcom]: match the brcm sai filename version to control file versi…
lguohan Jan 3, 2021
ae5caee
[frr]: change frr debug package to extra to avoid build break for dbg…
lguohan Jan 4, 2021
9e57f51
[BFN] Upgrade docker-syncd-bfn to buster (#6345)
dpetryshintl Jan 4, 2021
d6b92da
[libyang1] Adding LFS support for arm32 (#6346)
Sabareesh-Kumar-Anandan Jan 4, 2021
9006b96
[BFN] Convert platform modules to python 3 (#6347)
msosyak Jan 4, 2021
c38eee8
Update udev rules to support 96 ttyUSB ports (#6334)
sandycelestica Jan 5, 2021
19b2b44
[DellEMC] Add platform-modules as prerequisite for determine-reboot-c…
ArunSaravananBalachandran Jan 5, 2021
6fbd52b
[docker-sonic-vs]: reduce the build steps for docker-sonic-vs (#6350)
lguohan Jan 5, 2021
7fc2d38
[lldp] lldp upstream patches (#6118)
sudhanshukumar22 Jan 5, 2021
9593680
Install the latest version of the sonic build hooks in slave containe…
xumia Jan 5, 2021
62e7c45
After first bootup, the FEATURE table is not present in CONFIG_DB (#5…
AkhileshSamineni Jan 5, 2021
4460076
[xcvrd] Remove dependency on SONIC_PLATFORM_API_PY2 and SONIC_PLATFOR…
Junchao-Mellanox Jan 5, 2021
6fd78b6
[determine-reboot-cause] Ignore non-hardware reboot cause (#6349)
vaibhavhd Jan 5, 2021
d769ef2
[snmp]: updated to support snmp config from redis configdb (#6134)
tsvanduyn Jan 5, 2021
afd60bd
[rsyslog]: Explicitly set the notify mode for rsyslog imfile module …
abdosi Jan 6, 2021
78dae94
[sairedis] advance sairedis submodule head (#6365)
yxieca Jan 6, 2021
4632e0b
DellEMC: Z9332f change SFP detection logic (#6261)
aravindmani-1 Jan 6, 2021
8a3ac8f
[docker-lldp]: sonic advertise meaningful SysDescription instead of d…
sudhanshukumar22 Jan 6, 2021
a013b8c
[sonic-platform-common][sonic-platform-daemons] Update submodules (#6…
jleveque Jan 6, 2021
f99dbff
[Nokia]: Enable Telemetry for armhf and provide required qos files (#…
carl-nokia Jan 6, 2021
afc87b8
Updated imfile configuration for supervisord logs (#6368)
abdosi Jan 7, 2021
a6907a7
[brcm]: BRCM SAI 4.2.1.5-9 Fix _brcm_sai_indexed_data_get () with une…
gechiang Jan 7, 2021
2d77a36
[system-health] Make `run_command()` Python 3-compliant (#6371)
jleveque Jan 7, 2021
0ad2098
[README] Update build badges to include 202012 build status (#6373)
daall Jan 7, 2021
e52581e
[PDDF] Build and install Python 3 package (#6286)
jleveque Jan 7, 2021
dbc6718
Take a copy of existing TACACS credentials and restore it during upgr…
renukamanavalan Jan 8, 2021
fc3cb76
[ci]: Set up CI with Azure Pipelines (#6384)
lguohan Jan 8, 2021
04cd1d6
[Monit] Monitoring the running status of containers. (#6251)
yozhao101 Jan 8, 2021
83715cf
[bgpcfgd]: Support default action for "Allow prefix" feature (#6370)
pavel-shirshov Jan 8, 2021
5b7f88a
[sonic-swss-common] Update submodule (#6382)
qiluo-msft Jan 8, 2021
72b6350
Bump lxml from 4.6.1 to 4.6.2 in /src/sonic-config-engine (#6385)
dependabot[bot] Jan 8, 2021
c64052b
[Centec ARM64]Upgrade Centec syncd docker to buster and Enable Teleme…
guxianghong Jan 9, 2021
1498408
[Arista] Update driver submodules (#6396)
Staphylo Jan 10, 2021
c225752
[docker-macsec]: MACsec container and wpa_supplicant component (#5700)
Pterosaur Jan 10, 2021
2816515
[utilities] advance utilities submodule head (#6402)
yxieca Jan 11, 2021
3dd993e
[minigraph.py]: Add peer switch hostname to device metadata (#6405)
theasianpianist Jan 11, 2021
4ef3f13
[arista]: Fix web package md5 hash not correct issue (#6411)
xumia Jan 11, 2021
6ff8d2c
[ci]: add mellanox build to azure-pipeline (#6409)
lguohan Jan 12, 2021
ab2ae41
[build]: fix dpkg admindir corruption issue in parallel build (#6408)
lguohan Jan 12, 2021
8b82408
[sonic-slave]: Upgrade python lxml library version to 4.6.2 (#6404)
qiluo-msft Jan 12, 2021
6e63ecf
[minigraph.py]: Force /32 prefix for mux cable server IPv4 loopbacks …
theasianpianist Jan 12, 2021
26fd527
Anchor the libprotobuf-dev version based on a fixed version by using …
gechiang Jan 12, 2021
bbd6967
[as7326-54x] Remove not need executable flag (#6326)
jostar-yang Jan 12, 2021
015b421
[Mellanox] [platform API] Fix “local variable 'label_port' referenced…
keboliu Jan 12, 2021
d4f9fa5
[Centec] upgrade to buster docker for DOCKER_SYNCD_CENTEC_RPC, docker…
guxianghong Jan 12, 2021
380edf0
[Platform][nokia]: python3-smbus package add with python3 and jinja f…
carl-nokia Jan 12, 2021
674fac2
[Nokia ixs7215] Add SW assist for platform entropy & fix inband mgmt …
dflynn-Nokia Jan 13, 2021
1dcab4d
Fix py3 version changed even version control enabled issue (#6422)
xumia Jan 13, 2021
b56320c
[SN4410] fixed 'port_config.ini' (#6316)
vadymhlushko-mlnx Jan 13, 2021
68e9b83
Update swi-tools in buster Dockerfile (#6414)
Staphylo Jan 13, 2021
0a49edb
[Mellanox] Fix issue: need import initialize_sdk_handle in get_sdk_ha…
Junchao-Mellanox Jan 13, 2021
8b4b146
[sonic-swss-common] Advance swss-common head to include General Prote…
vaibhavhd Jan 13, 2021
1c00145
[ci]: cleanup fsroot reliably (#6431)
lguohan Jan 13, 2021
18350a5
[build]: Fix for missing dependencies in the DPKG framework (#6393)
Kalimuthu-Velappan Jan 13, 2021
8655334
[sonic-linux-kernel]: Update sonic-linux-kernel submodule (#6433)
keboliu Jan 13, 2021
4612f68
[swss] Depend on Python 3 version of swsscommon rather than Python 2 …
jleveque Jan 14, 2021
9a1b42f
[snmpagent] update submodule (#6169)
stepanblyschak Jan 14, 2021
c141bb9
Remove things needed for building Python 3 from source (#6441)
jleveque Jan 14, 2021
419c10b
[sonic-platform-common] Enable pytest during build for Python 3 packa…
jleveque Jan 14, 2021
16e5434
[docker-frr]: Use egrep with regexp to match correct TSA rules (#6403)
pavel-shirshov Jan 14, 2021
58a13b4
Export libyang API "lyd_check_mandatory_tree" for Management framewor…
dutta-partha Jan 15, 2021
054f5b7
[warm boot finalizer] only wait for enabled components to reconcile (…
yxieca Jan 15, 2021
6db88e8
[Mellanox] PSU and module thermals are no longer child of chassis (#6…
Junchao-Mellanox Jan 15, 2021
1b29805
[mellanox][platform api] fix a missing import time module (#6458)
keboliu Jan 15, 2021
ffcef27
[minigraph.py]: Check for empty cluster tag before parsing (#6440)
theasianpianist Jan 15, 2021
c9d3e25
[device/accton]: As7816-64x, fix memory leakage on accton fan monitor…
roylee123 Jan 15, 2021
0ca3434
[device/celestica]: Add thermalctld support on DX010 platform APIs (#…
Jan 15, 2021
4cf9316
[Mellanox] Make determine-reboot-cause service start after hw-managem…
keboliu Jan 15, 2021
2830a2b
[build arm] fix sonic-slave-buster build break (#6469)
dflynn-Nokia Jan 17, 2021
063e11c
[minigraph.py]: Don't create mux table entries for servers w/o loopba…
theasianpianist Jan 17, 2021
1ea5fd7
[DPB][YANG-models] extended regex pattern according to Mellanox syste…
vadymhlushko-mlnx Jan 17, 2021
c984cf9
[DPB] [Mellanox] added capability files for SN2700 platform (#6003)
vadymhlushko-mlnx Jan 17, 2021
d1db716
[DPB] [Mellanox] added capability files for SN3800 platform (#6013)
vadymhlushko-mlnx Jan 17, 2021
ce819e7
[DPB] [Mellanox] added capability files for SN2010 platform (#6015)
vadymhlushko-mlnx Jan 17, 2021
ffc957c
[DPB] [Mellanox] added capability files for SN2100 platform (#6016)
vadymhlushko-mlnx Jan 17, 2021
553ece0
[DPB] [Mellanox] added capability files for SN2410 platform (#6017)
vadymhlushko-mlnx Jan 17, 2021
dd13e41
[DPB] [Mellanox] added capability files for SN3700 platform (#6021)
vadymhlushko-mlnx Jan 17, 2021
db5a88e
[DPB] [Mellanox] added capability files for SN4410 platform (#6059)
vadymhlushko-mlnx Jan 17, 2021
ece8297
[DPB] [Mellanox] added capability files for SN4600C platform (#6061)
vadymhlushko-mlnx Jan 17, 2021
9b2bc88
[kvm]: add debug cmd for build_kvm_image.sh (#6472)
lguohan Jan 17, 2021
755c737
[mellanox]: fix mellanox hw-management build (#6471)
lguohan Jan 18, 2021
52afc80
[ci]: exit kvmtest on the first error (#6489)
lguohan Jan 19, 2021
afee1a8
[bgpd]: Check zebra is ready to connect when starting bgpd (#6478)
shi-su Jan 19, 2021
53c2a0a
[ci]: build docker-sonic-vs.gz in kvm build pipeline (#6494)
lguohan Jan 19, 2021
4e1c102
[DPB] [Mellanox] added capability files for SN3420 platform (#6020)
vadymhlushko-mlnx Jan 19, 2021
6d13d0f
[submodule]: update sonic-wpa-supplicant (#6492)
lguohan Jan 19, 2021
3a942fb
[submodule] Update sonic-sairedis submodule pointer (#6496)
daall Jan 19, 2021
abb0139
[submodule]: update sonic-utilities (#6485)
shlomibitton Jan 20, 2021
3c16f80
sonic-config-engine uses libswsscommon instead of swsssdk (#6406)
qiluo-msft Jan 20, 2021
cad2025
[frr]: ADD L3 VNI EVPN Support for SONiC, Send RMAC and VLAN along wi…
kishorekunal01 Jan 20, 2021
d75c290
[files/build/versions]: support reproduceable build for git (#5774)
liushilongbuaa Jan 21, 2021
df29773
[submodule]: Update SONiC Utilities Submodule (#6507)
tahmed-dev Jan 21, 2021
0eed960
[config] parse optional fields from hwsku
dmytroxshevchuk Dec 8, 2020
427903e
[config] add sanity check for hwsku
dmytroxshevchuk Jan 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .artifactignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/*
!target/*.bin
!target/*.log
!target/*.img.gz
!target/docker-sonic-vs.gz
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Please provide the following information:
- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012

**- Description for the changelog**
<!--
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ target/

# Autogenerated Dockerfiles
sonic-slave*/Dockerfile
sonic-slave*/Dockerfile.user
dockers/*/Dockerfile
platform/*/docker-*/Dockerfile

Expand Down
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
[submodule "src/sonic-frr/frr"]
path = src/sonic-frr/frr
url = https://github.com/Azure/sonic-frr.git
branch = frr/7.2
branch = frr/7.5
[submodule "platform/p4/p4-hlir/p4-hlir-v1.1"]
path = platform/p4/p4-hlir/p4-hlir-v1.1
url = https://github.com/p4lang/p4-hlir.git
Expand Down Expand Up @@ -85,3 +85,6 @@
[submodule "src/sonic-mgmt-common"]
path = src/sonic-mgmt-common
url = https://github.com/Azure/sonic-mgmt-common.git
[submodule "src/wpasupplicant/sonic-wpa-supplicant"]
path = src/wpasupplicant/sonic-wpa-supplicant
url = https://github.com/Azure/sonic-wpa-supplicant.git
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SONiC make file

NOJESSIE ?= 0
NOJESSIE ?= 1
NOSTRETCH ?= 0

%::
Expand Down
8 changes: 4 additions & 4 deletions Makefile.cache
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ SONIC_COMMON_FLAGS_LIST := $(CONFIGURED_PLATFORM) \
$(SONIC_PROFILING_ON) $(SONIC_ENABLE_SYNCD_RPC)
SONIC_COMMON_DPKG_LIST := debian/control debian/changelog debian/rules \
debian/compat debian/install debian/copyright
SONIC_COMMON_BASE_FILES_LIST := sonic-slave-jessie/Dockerfile.j2 sonic-slave-jessie/Dockerfile.user \
sonic-slave-stretch/Dockerfile.j2 sonic-slave-stretch/Dockerfile.user \
sonic-slave-buster/Dockerfile.j2 sonic-slave-buster/Dockerfile.user
SONIC_COMMON_BASE_FILES_LIST := sonic-slave-jessie/Dockerfile.j2 sonic-slave-jessie/Dockerfile.user.j2 \
sonic-slave-stretch/Dockerfile.j2 sonic-slave-stretch/Dockerfile.user.j2 \
sonic-slave-buster/Dockerfile.j2 sonic-slave-buster/Dockerfile.user.j2



Expand Down Expand Up @@ -181,7 +181,7 @@ define GET_MOD_DEP_SHA
$($(dfile)_DEP_FLAGS_FILE) $($(dfile)_MOD_HASH_FILE) $($(dfile)_SMOD_HASH_FILE)) )
$(eval $(1)_DEP_FILES_MISSING := $(filter-out $(wildcard $($(1)_DEP_MOD_SHA_FILES)),$($(1)_DEP_MOD_SHA_FILES)) )
$(if $($(1)_DEP_FILES_MISSING), $(warning "[ DPKG ] Dependecy file(s) are not found for $(1) : $($(1)_DEP_FILES_MISSING)))

$(eval $(1)_DEP_MOD_SHA := $(shell git hash-object $($(1)_DEP_MOD_SHA_FILES) \
| sha1sum | awk '{print substr($$1,0,23);}'))
endef
Expand Down
49 changes: 38 additions & 11 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ SHELL = /bin/bash

USER := $(shell id -un)
PWD := $(shell pwd)
USER_LC := $(shell echo $(USER) | tr A-Z a-z)

comma := ,

Expand Down Expand Up @@ -91,8 +92,16 @@ endif

include rules/config

ifeq ($(ENABLE_DOCKER_BASE_PULL),)
override ENABLE_DOCKER_BASE_PULL = n
endif

ifeq ($(CONFIGURED_ARCH),amd64)
SLAVE_BASE_IMAGE = $(SLAVE_DIR)
SLAVE_IMAGE = $(SLAVE_BASE_IMAGE)-$(USER)
else
SLAVE_BASE_IMAGE = $(SLAVE_DIR)-$(CONFIGURED_ARCH)
endif
SLAVE_IMAGE = $(SLAVE_BASE_IMAGE)-$(USER_LC)

# Generate the version control build info
$(shell SONIC_VERSION_CONTROL_COMPONENTS=$(SONIC_VERSION_CONTROL_COMPONENTS) \
Expand All @@ -101,6 +110,7 @@ $(shell SONIC_VERSION_CONTROL_COMPONENTS=$(SONIC_VERSION_CONTROL_COMPONENTS) \

# Generate the slave Dockerfile, and prepare build info for it
$(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) j2 $(SLAVE_DIR)/Dockerfile.j2 > $(SLAVE_DIR)/Dockerfile)
$(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) j2 $(SLAVE_DIR)/Dockerfile.user.j2 > $(SLAVE_DIR)/Dockerfile.user)
$(shell BUILD_SLAVE=y scripts/prepare_docker_buildinfo.sh $(SLAVE_BASE_IMAGE) $(SLAVE_DIR)/Dockerfile $(CONFIGURED_ARCH) "" $(BLDENV))

# Add the versions in the tag, if the version change, need to rebuild the slave
Expand Down Expand Up @@ -128,7 +138,7 @@ DOCKER_RUN := docker run --rm=true --privileged --init \
-w $(DOCKER_BUILDER_WORKDIR) \
-e "http_proxy=$(http_proxy)" \
-e "https_proxy=$(https_proxy)" \
-i$(if $(TERM),t,) \
-i$(shell { if [ -t 0 ]; then echo t; fi }) \
$(SONIC_BUILDER_EXTRA_CMDLINE)

ifneq ($(DOCKER_BUILDER_USER_MOUNT),)
Expand All @@ -146,16 +156,20 @@ endif
ifeq ($(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD), y)
DOCKER_RUN += -v /var/run/docker.sock:/var/run/docker.sock
endif

ifneq (,$(filter $(CONFIGURED_ARCH), armhf arm64))
ifeq ($(DOCKER_DATA_ROOT_FOR_MULTIARCH),)
DOCKER_DATA_ROOT_FOR_MULTIARCH := /var/lib/march/docker
endif
# Multiarch docker cannot start dockerd service due to iptables cannot run over different arch kernel
SONIC_SERVICE_DOCKERD_FOR_MULTIARCH=y
SONIC_NATIVE_DOCKERD_FOR_MUTLIARCH := dockerd --experimental=true --storage-driver=vfs \
--data-root=/var/lib/march/docker/ --exec-root=/var/run/march/docker/ \
-H unix:///var/run/march/docker.sock -p /var/run/march/docker.pid
--data-root=$(DOCKER_DATA_ROOT_FOR_MULTIARCH) --exec-root=/var/run/march/docker/ \
-H unix:///var/run/march/docker.sock -p /var/run/march/docker.pid
DOCKER_RUN += -v /var/run/march/docker.sock:/var/run/docker.sock
DOCKER_RUN += -v /var/run/march/docker.pid:/var/run/docker.pid
DOCKER_RUN += -v /var/run/march/docker:/var/run/docker
DOCKER_RUN += -v /var/lib/march/docker:/var/lib/docker
DOCKER_RUN += -v $(DOCKER_DATA_ROOT_FOR_MULTIARCH):/var/lib/docker
SONIC_USERFACL_DOCKERD_FOR_MUTLIARCH := setfacl -m user:$(USER):rw /var/run/march/docker.sock

#Override Native config to prevent docker service
Expand Down Expand Up @@ -185,6 +199,9 @@ DOCKER_BASE_BUILD = docker build --no-cache \
--build-arg https_proxy=$(https_proxy) \
$(SLAVE_DIR)

DOCKER_BASE_PULL = docker pull \
$(REGISTRY_SERVER):$(REGISTRY_PORT)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)

DOCKER_BUILD = docker build --no-cache \
--build-arg user=$(USER) \
--build-arg uid=$(shell id -u) \
Expand Down Expand Up @@ -247,11 +264,15 @@ endif
@$(OVERLAY_MODULE_CHECK)

@pushd src/sonic-build-hooks; TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) make all; popd
@cp src/sonic-build-hooks/buildinfo/sonic-build-hooks* $(SLAVE_BASE_IMAGE)/buildinfo
@cp src/sonic-build-hooks/buildinfo/sonic-build-hooks* $(SLAVE_DIR)/buildinfo
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
{ [ $(ENABLE_DOCKER_BASE_PULL) == y ] && { echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Pulling...; } && \
$(DOCKER_BASE_PULL) && \
{ docker tag $(REGISTRY_SERVER):$(REGISTRY_PORT)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) && \
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; } } || \
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
$(DOCKER_BASE_BUILD) ; \
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; }
$(DOCKER_BASE_BUILD) ; \
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; }
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
$(DOCKER_BUILD) ; }
Expand All @@ -267,16 +288,22 @@ endif

sonic-build-hooks:
@pushd src/sonic-build-hooks; TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) make all; popd
@cp src/sonic-build-hooks/buildinfo/sonic-build-hooks* $(SLAVE_BASE_IMAGE)/buildinfo
@cp src/sonic-build-hooks/buildinfo/sonic-build-hooks* $(SLAVE_DIR)/buildinfo

sonic-slave-base-build : sonic-build-hooks
@$(OVERLAY_MODULE_CHECK)
@echo Checking sonic-slave-base image: $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
{ [ $(ENABLE_DOCKER_BASE_PULL) == y ] && { echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Pulling...; } && \
$(DOCKER_BASE_PULL) && \
{ docker tag $(REGISTRY_SERVER):$(REGISTRY_PORT)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) && \
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; } } || \
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
$(DOCKER_BASE_BUILD) ; \
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; }
$(DOCKER_BASE_BUILD) ; \
scripts/collect_docker_version_files.sh $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) target ; }

sonic-slave-build : sonic-slave-base-build
@echo Checking sonic-slave image: $(SLAVE_IMAGE):$(SLAVE_TAG)
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
$(DOCKER_BUILD) ; }
Expand Down
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
*static anaylsis*:

[![Total alerts](https://img.shields.io/lgtm/alerts/g/Azure/sonic-buildimage.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Azure/sonic-buildimage/alerts/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Azure/sonic-buildimage.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Azure/sonic-buildimage/context:python)


*master builds*:


[![Barefoot](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-all/badge/icon?subject=Barefoot)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-all)
[![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/badge/icon?subject=Broadcom)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all)
[![Centec](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/badge/icon?subject=Centec)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all)
[![Centec(arm64)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-arm64-all/badge/icon?subject=Centec(arm64))](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-arm64-all)
[![Innovium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-all/badge/icon?subject=Innovium)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-all)
[![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all/badge/icon?subject=Mellanox)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all)
[![Marvell(armhf)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-armhf-all/badge/icon?subject=Marvell(armhf))](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-armhf-all)
[![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/badge/icon?subject=Nephos)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all)
[![P4](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all/badge/icon?subject=P4)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all)
[![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all/badge/icon?subject=VS)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all)
[![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-image/badge/icon?subject=VS)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-image)

*202012 builds*:

[![Barefoot](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-202012/badge/icon?subject=Barefoot)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-202012/)
[![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-202012/badge/icon?subject=Broadcom)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-202012)
[![Centec](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-202012/badge/icon?subject=Centec)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-202012)
[![Centec(arm64)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-arm64-202012/badge/icon?subject=Centec(arm64))](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-arm64-202012)
[![Innovium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-202012/badge/icon?subject=Innovium)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-202012/)
[![Marvell(armhf)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-armhf-202012/badge/icon?subject=Marvell(armhf))](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-armhf-202012)
[![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-202012/badge/icon?subject=Mellanox)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-202012)
[![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-202012/badge/icon?subject=Nephos)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-202012)
[![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-image-202012/badge/icon?subject=VS)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-image-202012)

*201911 builds*:

Expand All @@ -25,7 +40,6 @@

*201811 builds*:


[![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201811/badge/icon?subject=Broadcom)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201811/)
[![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201811/badge/icon?subject=Mellanox)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201811/)
[![Innovium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-201811/badge/icon?subject=Innovium)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/innovium/job/buildimage-invm-201811/)
Expand All @@ -48,7 +62,7 @@

## Build SONiC Switch Images

# Description
# Description

Following is the instruction on how to build an [(ONIE)](https://github.com/opencomputeproject/onie) compatible network operating system (NOS) installer image for network switches, and also how to build docker images running inside the NOS. Note that SONiC image are build per ASIC platform. Switches using the same ASIC platform share a common image. For a list of supported switches and ASIC, please refer to this [list](https://github.com/Azure/SONiC/wiki/Supported-Devices-and-Platforms)

Expand All @@ -69,8 +83,8 @@ Configure your system to allow running the 'docker' command without 'sudo':
`sudo gpasswd -a ${USER} docker`
Log out and log back in so that your group membership is re-evaluated

## SAI Version
Please refer to [SONiC roadmap](https://github.com/Azure/SONiC/wiki/Sonic-Roadmap-Planning) on the SAI version for each SONiC release.
## SAI Version
Please refer to [SONiC roadmap](https://github.com/Azure/SONiC/wiki/Sonic-Roadmap-Planning) on the SAI version for each SONiC release.

## Clone or fetch the code repository with all git submodules
To clone the code repository recursively, assuming git version 1.9 or newer:
Expand Down Expand Up @@ -145,7 +159,7 @@ To build Arm64 bit for plaform
The SONiC installer contains all docker images needed. SONiC uses one image for all devices of a same ASIC vendor. The supported ASIC vendors are:

- PLATFORM=broadcom
- PLATFORM=marvell
- PLATFORM=marvell
- PLATFORM=mellanox
- PLATFORM=cavium
- PLATFORM=centec
Expand All @@ -154,7 +168,7 @@ The SONiC installer contains all docker images needed. SONiC uses one image for
- PLATFORM=p4
- PLATFORM=vs

For Broadcom ASIC, we build ONIE and EOS image. EOS image is used for Arista devices, ONIE image is used for all other Broadcom ASIC based devices.
For Broadcom ASIC, we build ONIE and EOS image. EOS image is used for Arista devices, ONIE image is used for all other Broadcom ASIC based devices.

make configure PLATFORM=broadcom
# build debian stretch required targets
Expand Down
Loading