Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'github/master' into 201904
Browse files Browse the repository at this point in the history
  • Loading branch information
Shu0T1an ChenG committed May 29, 2019
2 parents 23fb00c + e041b15 commit 9c6b0dc
Show file tree
Hide file tree
Showing 196 changed files with 18,270 additions and 1,016 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ target/
*.deb
*.changes
*.buildinfo
*.tar
*.xz
*.gz
*-dbg
*dbg.j2
*.img

# Subdirectories in src
src/bash/*
Expand Down Expand Up @@ -43,6 +49,8 @@ src/libnl3/*
!src/libnl3/Makefile
src/libteam/*
!src/libteam/Makefile
src/libyang/*
!src/libyang/Makefile
src/lldpd/*
!src/lldpd/Makefile
!src/lldpd/patch/
Expand All @@ -59,13 +67,17 @@ src/radvd/*
!src/radvd/patch/
src/redis/*
!src/redis/Makefile
src/smartmontools/*
!src/smartmontools/Makefile
src/snmpd/*
!src/snmpd/Makefile
src/sonic-device-data/src/device/
src/sonic-device-data/src/debian/
src/supervisor/*
!src/supervisor/Makefile
!src/supervisor/patch/
src/swig/*
!src/swig/Makefile
src/telemetry/debian/*
!src/telemetry/debian/changelog
!src/telemetry/debian/compat
Expand Down Expand Up @@ -109,3 +121,7 @@ src/sonic-config-engine/sonic_config_engine.egg-info
src/sonic-daemon-base/**/*.pyc
src/sonic-daemon-base/build
src/sonic-daemon-base/sonic_daemon_base.egg-info

# Misc. files
files/initramfs-tools/arista-convertfs
files/initramfs-tools/union-mount
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
[submodule "src/sonic-frr/frr"]
path = src/sonic-frr/frr
url = https://github.com/Azure/sonic-frr.git
branch = frr/7.0
[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
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# SONiC make file

NOSTRETCH ?= 0
NOJESSIE ?= 0

%::
@echo "+++ --- Making $@ --- +++"
ifeq ($(NOSTRETCH), 0)
BLDENV=stretch EXTRA_STRETCH_TARGETS=$(notdir $@) make -f Makefile.work stretch
ifeq ($(NOJESSIE), 0)
EXTRA_JESSIE_TARGETS=$(notdir $@) make -f Makefile.work jessie
endif
make -f Makefile.work $@
BLDENV=stretch make -f Makefile.work $@

stretch:
jessie:
@echo "+++ Making $@ +++"
ifeq ($(NOSTRETCH), 0)
BLDENV=stretch make -f Makefile.work stretch
ifeq ($(NOJESSIE), 0)
make -f Makefile.work jessie
endif

clean reset init configure showtag sonic-slave-build sonic-slave-bash :
@echo "+++ Making $@ +++"
make -f Makefile.work $@
BLDENV=stretch make -f Makefile.work $@
9 changes: 4 additions & 5 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
# * Please note that with current Stretch build structure,
# * user of KEEP_SLAVE_ON feature will have to be conscious
# * about which docker to stay inside after build is done.
# * - If user desires to stay inside Stretch docker, please issue
# * make KEEP_SLAVE_ON=yes stretch
# * - If user desires to stay inside Jessie docker, please issue
# * (a successful "make stretch" may be needed before the following command)
# * make NOSTRETCH=1 KEEP_SLAVE_ON=yes <any jessie target>
# * make KEEP_SLAVE_ON=yes jessie
# * - If user desires to stay inside Stretch docker, please issue
# * make NOJESSIE=1 KEEP_SLAVE_ON=yes <any target>
# * SOURCE_FOLDER: host path to be mount as /var/$(USER)/src, only effective when KEEP_SLAVE_ON=yes
# * SONIC_BUILD_JOBS: Specifying number of concurrent build job(s) to run
# * VS_PREPARE_MEM: Prepare memory in VS build (drop cache and compact).
Expand Down Expand Up @@ -123,7 +122,7 @@ SONIC_BUILD_INSTRUCTION := make \
HTTP_PROXY=$(http_proxy) \
HTTPS_PROXY=$(https_proxy) \
SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) \
EXTRA_STRETCH_TARGETS=$(EXTRA_STRETCH_TARGETS) \
EXTRA_JESSIE_TARGETS=$(EXTRA_JESSIE_TARGETS) \
$(SONIC_OVERRIDE_BUILD_VARS)

.PHONY: sonic-slave-build sonic-slave-bash init reset
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ To build SONiC installer image and docker images, run the following commands:
# Execute make configure once to configure ASIC
make configure PLATFORM=[ASIC_VENDOR]

# Build Debian Stretch required targets (Manual execution optional; will also be executed as part of the build)
BLDENV=stretch make stretch

# Build SONiC image
make all

Expand Down
10 changes: 8 additions & 2 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck
pushd $FILESYSTEM_ROOT/usr/share/initramfs-tools/scripts/init-bottom && sudo patch -p1 < $OLDPWD/files/initramfs-tools/udev.patch; popd

## Install latest intel ixgbe driver
sudo cp target/files/stretch/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/${LINUX_KERNEL_VERSION}-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko
sudo cp $files_path/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/${LINUX_KERNEL_VERSION}-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko

## Install docker
echo '[INFO] Install docker'
Expand Down Expand Up @@ -230,6 +230,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
usbutils \
pciutils \
iptables-persistent \
ebtables \
logrotate \
curl \
kexec-tools \
Expand All @@ -247,6 +248,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
tcptraceroute \
mtr-tiny \
locales \
flashrom \
cgroup-tools

#Adds a locale to a debian system in non-interactive mode
Expand Down Expand Up @@ -305,7 +307,7 @@ check filesystem root-overlay with path /
check filesystem var-log with path /var/log
if space usage > 90% for 5 times within 10 cycles then alert
check system $HOST
if memory usage > 90% for 5 times within 10 cycles then alert
if memory usage > 50% for 5 times within 10 cycles then alert
if cpu usage (user) > 90% for 5 times within 10 cycles then alert
if cpu usage (system) > 90% for 5 times within 10 cycles then alert
EOF
Expand Down Expand Up @@ -411,6 +413,10 @@ if [ "${enable_organization_extensions}" = "y" ]; then
fi
fi

## Setup ebtable rules (rule file is in binary format)
sudo sed -i 's/EBTABLES_LOAD_ON_START="no"/EBTABLES_LOAD_ON_START="yes"/g' ${FILESYSTEM_ROOT}/etc/default/ebtables
sudo cp files/image_config/ebtables/ebtables.filter ${FILESYSTEM_ROOT}/etc

## Remove gcc and python dev pkgs
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y remove gcc libpython2.7-dev

Expand Down
Loading

0 comments on commit 9c6b0dc

Please sign in to comment.