Skip to content

Commit b29376f

Browse files
committed
Merge branch 'github'
* github: [minigraph]: Set hostname in all default minigraphs to 'sonic' (sonic-net#1333) Install sonic-platform-common package in platform-monitor docker for ledd (sonic-net#1330) Prevent supervisor from restarting configdb-load.sh (sonic-net#1324) [scripts]: Fix issues with checking status of the DB. Use one approach everywhere. (sonic-net#1323) [Arista7260cx3] Add platform specific reboot tool (sonic-net#1318) Install azure cli into docker-sonic-mgmt (sonic-net#1322) [sonic-py-swsssdk]: Update submodule pointer (sonic-net#1319) [supervisor] Add patch to prevent 'supervisorctl start' command from hanging if system time has rolled backward (sonic-net#1311) Move platform-specific hardware plugin base packages to sonic-platform-common submodule (sonic-net#1301) [baseimage]: Add missing dependency of igb & ixgbe (sonic-net#1316) [snmpagent]: Update sonic-snmpagent submodule (sonic-net#1314) Run docker containers with /tmp and /var/tmp mounted to tmpfs (sonic-net#1313) [Broadcom]: Update Boradcom SAI package to 3.0.3.3-3 (sonic-net#1312) [submodule]: Update sairedis (sonic-net#1310) [snmpagent]: Update sonic-snmpagent submodule (sonic-net#1308) [baseimage]: add mkfs.ext3 and fsck.ext3 in initrd to support ext3 partition (sonic-net#1306) [submodule]: update sonic-sairedis to enable syncd-rpc (sonic-net#1304) [device]: Fix Mellanox sku check (sonic-net#1303) Add support for Accton AS7712-32X platform (sonic-net#1299) [build]: build libsaithrift-dev and docker-ptf-[platform] (sonic-net#1300) [libsaithrift-dev]: Enable building libsaithrift-dev and pythonthrift libraries (sonic-net#1296) [Platform] Update switch configuration files and download link for Ingrasys S9130-32X/S9230-64X (sonic-net#1295) [Delta]: Add psuutil support for ag9032v1 (sonic-net#1298) Revert "[Dell S6100, Z9100] psusutil sysfs attribute changes for hwmon (sonic-net#1264)" (sonic-net#1297) [Dell S6100, Z9100] psusutil sysfs attribute changes for hwmon (sonic-net#1264) [Platform]As7712-32x update for sensors test (sonic-net#1292) Revert "[DHCP relay]: Add patch to always undef VLAN_TCI_PRESENT so as not to treat VLAN-tagged packets differently (sonic-net#1254)" (sonic-net#1291) [[submodule]: Update swss-common (sonic-net#1289) [baseimage]: Install sysfsutils package into SONiC host system (sonic-net#1290) Add caclmgrd and related files to translate and install control plane ACL rules (sonic-net#1240) [mellanox]: Update Mellanox buffers configuration (sonic-net#1263) [platform]: chmod 0644 for *.mk files (sonic-net#1284) [arista]: Update Arista platform modules and mount libraries to snmp docker (sonic-net#1283) [platform]: chmod a+x for debian/rules for platform-modules-delta (sonic-net#1282) Let debootstrap uses the same sources link as apt (sonic-net#1279) [doc]: update sonic-buildimage clone instructions (sonic-net#1278) [image]: Explicitly specify kernel_version as string (sonic-net#1280) Disable autosuspend for USB devices, preventing usb drives to be stopped and then renamed (sonic-net#1275) [platform]: As7712 32x add fancontrol (sonic-net#1270) [Platform] Add psuutil support for Ingrasys S9130-32X (sonic-net#1273) [submodules]: Update swss and utilitiles modules (sonic-net#1276) [Platform] Add psuutil and update submodule for Ingrasys S9100-32X, S8810-32Q, S9200-64X on master branch (sonic-net#1271) [centec]: support sai1.0 (sonic-net#1268) [build]: add build badge for nephos platform (sonic-net#1267) [build]: allow to use http(s) proxy in the build (sonic-net#1265) [Accton AS7816-64X] Add new platform and device for AS7816-64X. (sonic-net#1260) [Platform] Add Ingrasys S9130-32X and S9230-64X with Nephos Switch ASIC (sonic-net#1245) Add 'make reset' target with warning prompt to reset git repo and submodules (sonic-net#1258) [sudoers] Add 'docker ps' to READ_ONLY_CMDS (sonic-net#1259) Add set/get lpmode and mode_rst feature for qsfp (sonic-net#1261) [build] allow user to override the default number of build jobs (sonic-net#1255) [build] make second Accton Debian package extra package of the first one (sonic-net#1257) [arista] Delete sysfs entries for all Arista Digital Power Monitor/Management devices (sonic-net#1256) [DHCP relay]: Add patch to always undef VLAN_TCI_PRESENT so as not to treat VLAN-tagged packets differently (sonic-net#1254) [snmp]: Save S/N in state DB prior to starting service (sonic-net#1246) [device/accton] Correct exception function name (sonic-net#1249) [DHCP relay]: Fix circuit ID and remote ID bugs (sonic-net#1248) [sonic-py-swsssdk]: Update submodule pointer (sonic-net#1253) [swss]: update swss submodule (sonic-net#1244) [broadcom]: update sai to 3.0.3.3-1 (sonic-net#1243)
2 parents 2bfa8e6 + 6f12ff2 commit b29376f

File tree

171 files changed

+7175
-1564
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+7175
-1564
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ src/sonic-device-data/src/device/
3535
src/sonic-device-data/src/debian/
3636
src/supervisor/*
3737
!src/supervisor/Makefile
38+
!src/supervisor/patch/
3839
src/thrift/*
3940
!src/thrift/Makefile
4041

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
[submodule "platform/broadcom/sonic-platform-modules-ingrasys"]
4848
path = platform/broadcom/sonic-platform-modules-ingrasys
4949
url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys
50+
[submodule "src/sonic-platform-common"]
51+
path = src/sonic-platform-common
52+
url = https://github.com/Azure/sonic-platform-common
5053
[submodule "src/sonic-platform-daemons"]
5154
path = src/sonic-platform-daemons
5255
url = git@gitli.corp.linkedin.com:sonic/sonic-platform-daemons.git
@@ -71,3 +74,6 @@
7174
[submodule "platform/p4/SAI-P4-BM"]
7275
path = platform/p4/SAI-P4-BM
7376
url = https://github.com/Mellanox/SAI-P4-BM.git
77+
[submodule "platform/nephos/sonic-platform-modules-ingrasys"]
78+
path = platform/nephos/sonic-platform-modules-ingrasys
79+
url = https://github.com/Ingrasys-sonic/sonic-platform-modules-ingrasys-nephos.git

Makefile

+25-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# * PASSWORD: Desired password -- default at rules/config
1414
# * KEEP_SLAVE_ON: Keeps slave container up after building-process concludes.
1515
# * SOURCE_FOLDER: host path to be mount as /var/src, only effective when KEEP_SLAVE_ON=yes
16+
# * SONIC_BUILD_JOB: Specifying number of concurrent build job(s) to run
1617
#
1718
###############################################################################
1819

@@ -34,10 +35,14 @@ SLAVE_IMAGE = sonic-slave-$(USER)
3435
DOCKER_RUN := docker run --rm=true --privileged \
3536
-v $(PWD):/sonic \
3637
-w /sonic \
38+
-e "http_proxy=$(http_proxy)" \
39+
-e "https_proxy=$(https_proxy)" \
3740
-i$(if $(TERM),t,)
3841

3942
DOCKER_BASE_BUILD = docker build --no-cache \
4043
-t $(SLAVE_BASE_IMAGE) \
44+
--build-arg http_proxy=$(http_proxy) \
45+
--build-arg https_proxy=$(https_proxy) \
4146
sonic-slave && \
4247
docker tag $(SLAVE_BASE_IMAGE):latest $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)
4348

@@ -59,9 +64,12 @@ SONIC_BUILD_INSTRUCTION := make \
5964
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
6065
ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
6166
PASSWORD=$(PASSWORD) \
62-
USERNAME=$(USERNAME)
67+
USERNAME=$(USERNAME) \
68+
SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) \
69+
HTTP_PROXY=$(http_proxy) \
70+
HTTPS_PROXY=$(https_proxy)
6371

64-
.PHONY: sonic-slave-build sonic-slave-bash init
72+
.PHONY: sonic-slave-build sonic-slave-bash init reset
6573

6674
.DEFAULT_GOAL := all
6775

@@ -96,5 +104,18 @@ sonic-slave-bash :
96104
@$(DOCKER_RUN) -t $(SLAVE_IMAGE):$(SLAVE_TAG) bash
97105

98106
init :
99-
git submodule update --init --recursive
100-
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $$(realpath --relative-to=. $$(cut -d" " -f2 .git))" > .git'
107+
@git submodule update --init --recursive
108+
@git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $$(realpath --relative-to=. $$(cut -d" " -f2 .git))" > .git'
109+
110+
reset :
111+
@echo && echo -n "Warning! All local changes will be lost. Proceed? [y/N]: "
112+
@read ans && \
113+
if [ $$ans == y ]; then \
114+
git clean -xfdf; \
115+
git reset --hard; \
116+
git submodule foreach --recursive git clean -xfdf; \
117+
git submodule foreach --recursive git reset --hard; \
118+
git submodule update --init --recursive;\
119+
else \
120+
echo "Reset aborted"; \
121+
fi

README.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
*master*: Broadcom: [![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all)
22
Mellanox: [![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all)
3+
Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all)
34
P4: [![P4](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all)
45
VS: [![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all)
56

67
*201709*:
78
Broadcom: [![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201709/)
89
Cavium: [![Cavium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/)
910
Centec: [![Centec](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/)
10-
Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/)
11+
Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-201709/)
1112
Marvell: [![Marvell](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-all/)
1213
Mellanox: [![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201709/)
1314

@@ -30,12 +31,17 @@ Please refer to [SONiC roadmap](https://github.com/Azure/SONiC/wiki/Sonic-Roadma
3031
## Clone or fetch the code repository with all git submodules
3132
To clone the code repository recursively, assuming git version 1.9 or newer:
3233

33-
git clone --recursive https://github.com/Azure/sonic-buildimage.git
34+
git clone https://github.com/Azure/sonic-buildimage.git
3435

3536
## Usage
3637

3738
To build SONiC installer image and docker images, run the following commands:
3839

40+
cd sonic-buildimage
41+
42+
# (Optional) Checkout a specific branch. By default, it uses master branch
43+
git checkout [branch_name]
44+
3945
# Execute make init once after cloning the repo, or fetched remote repo with submodule updates
4046
make init
4147

@@ -44,15 +50,19 @@ To build SONiC installer image and docker images, run the following commands:
4450

4551
make
4652

47-
**NOTE**: We recommend reserving 50G free space to build one platform.
48-
53+
**NOTE**:
54+
55+
- We recommend reserving 50G free space to build one platform.
56+
- Use ```http_proxy=[your_proxy] https_proxy=[your_proxy] make``` to enable http(s) proxy in the build process.
57+
4958
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:
5059

5160
- PLATFORM=broadcom
5261
- PLATFORM=marvell
5362
- PLATFORM=mellanox
5463
- PLATFORM=cavium
5564
- PLATFORM=centec
65+
- PLATFORM=nephos
5666
- PLATFORM=p4
5767
- PLATFORM=vs
5868

@@ -96,9 +106,11 @@ This may take a while, but it is a one-time action, so please be patient.
96106
- docker-orchagent-brcm.gz: docker image for SWitch State Service (SWSS) on Broadcom platform (gzip tar archive)
97107
- docker-orchagent-cavm.gz: docker image for SWitch State Service (SWSS) on Cavium platform (gzip tar archive)
98108
- docker-orchagent-mlnx.gz: docker image for SWitch State Service (SWSS) on Mellanox platform (gzip tar archive)
109+
- docker-orchagent-nephos.gz: docker image for SWitch State Service (SWSS) on Nephos platform (gzip tar archive)
99110
- docker-syncd-brcm.gz: docker image for the daemon to sync database and Broadcom switch ASIC (gzip tar archive)
100111
- docker-syncd-cavm.gz: docker image for the daemon to sync database and Cavium switch ASIC (gzip tar archive)
101112
- docker-syncd-mlnx.gz: docker image for the daemon to sync database and Mellanox switch ASIC (gzip tar archive)
113+
- docker-syncd-nephos.gz: docker image for the daemon to sync database and Nephos switch ASIC (gzip tar archive)
102114
- docker-sonic-p4.gz: docker image for all-in-one for p4 software switch (gzip tar archive)
103115
- docker-sonic-vs.gz: docker image for all-in-one for software virtual switch (gzip tar archive)
104116

build_debian.sh

+16-4
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ touch $FILESYSTEM_ROOT/$PLATFORM_DIR/firsttime
6868

6969
## Build a basic Debian system by debootstrap
7070
echo '[INFO] Debootstrap...'
71-
sudo debootstrap --variant=minbase --arch amd64 jessie $FILESYSTEM_ROOT http://ftp.us.debian.org/debian
71+
sudo http_proxy=$http_proxy debootstrap --variant=minbase --arch amd64 jessie $FILESYSTEM_ROOT http://debian-archive.trafficmanager.net/debian
7272

7373
## Config hostname and hosts, otherwise 'sudo ...' will complain 'sudo: unable to resolve host ...'
7474
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '$HOSTNAME' > /etc/hostname"
@@ -79,6 +79,9 @@ sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '127.0.0.1 localhos
7979
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c 'echo "proc /proc proc defaults 0 0" >> /etc/fstab'
8080
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c 'echo "sysfs /sys sysfs defaults 0 0" >> /etc/fstab'
8181

82+
## Setup proxy
83+
[ -n "$http_proxy" ] && sudo /bin/bash -c "echo 'Acquire::http::Proxy \"$http_proxy\";' > $FILESYSTEM_ROOT/etc/apt/apt.conf.d/01proxy"
84+
8285
## Note: mounting is necessary to makedev and install linux image
8386
echo '[INFO] Mount all'
8487
## Output all the mounted device for troubleshooting
@@ -144,6 +147,9 @@ sudo chroot $FILESYSTEM_ROOT update-initramfs -u
144147
## Install latest intel igb driver
145148
sudo cp target/debs/igb.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/igb/igb.ko
146149

150+
## Install latest intel ixgbe driver
151+
sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko
152+
147153
## Install docker
148154
echo '[INFO] Install docker'
149155
## Install apparmor utils since they're missing and apparmor is enabled in the kernel
@@ -215,6 +221,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
215221
less \
216222
unzip \
217223
gdisk \
224+
sysfsutils \
218225
grub2-common
219226

220227
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y download \
@@ -231,6 +238,8 @@ sudo cp files/sshd/host-ssh-keygen.sh $FILESYSTEM_ROOT/usr/local/bin/
231238
sudo cp -f files/sshd/sshd.service $FILESYSTEM_ROOT/lib/systemd/system/ssh.service
232239
## Config sshd
233240
sudo augtool --autosave "set /files/etc/ssh/sshd_config/UseDNS no" -r $FILESYSTEM_ROOT
241+
sudo sed -i 's/^ListenAddress ::/#ListenAddress ::/' $FILESYSTEM_ROOT/etc/ssh/sshd_config
242+
sudo sed -i 's/^#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/' $FILESYSTEM_ROOT/etc/ssh/sshd_config
234243

235244
## Config monit
236245
sudo sed -i '
@@ -292,8 +301,8 @@ set /files/etc/sysctl.conf/net.core.rmem_max 2097152
292301
" -r $FILESYSTEM_ROOT
293302

294303
## docker-py is needed by Ansible docker module
295-
sudo LANG=C chroot $FILESYSTEM_ROOT easy_install pip
296-
sudo LANG=C chroot $FILESYSTEM_ROOT pip install 'docker-py==1.6.0'
304+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT easy_install pip
305+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'docker-py==1.6.0'
297306
## Note: keep pip installed for maintainance purpose
298307

299308
## Create /var/run/redis folder for docker-database to mount
@@ -317,7 +326,7 @@ sudo cp files/dhcp/dhclient.conf $FILESYSTEM_ROOT/etc/dhcp/
317326
sudo mkdir -p $FILESYSTEM_ROOT/etc/sonic
318327
sudo tee $FILESYSTEM_ROOT/etc/sonic/sonic_version.yml > /dev/null <<EOF
319328
build_version: $(sonic_get_version)
320-
debian_version: $(cat $FILESYSTEM_ROOT/etc/debian_version)
329+
debian_version: '$(cat $FILESYSTEM_ROOT/etc/debian_version)'
321330
kernel_version: $kversion
322331
asic_type: $sonic_asic_platform
323332
commit_id: $(git rev-parse --short HEAD)
@@ -346,6 +355,9 @@ sudo LANG=C chroot $FILESYSTEM_ROOT apt-get autoclean
346355
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get clean
347356
sudo LANG=C chroot $FILESYSTEM_ROOT bash -c 'rm -rf /usr/share/doc/* /usr/share/locale/* /var/lib/apt/lists/* /tmp/*'
348357

358+
## Clean up proxy
359+
[ -n "$http_proxy" ] && sudo rm -f $FILESYSTEM_ROOT/etc/apt/apt.conf.d/01proxy
360+
349361
## Umount all
350362
echo '[INFO] Umount all'
351363
## Display all process details access /proc

0 commit comments

Comments
 (0)