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

Commit

Permalink
Merge 201904 branch to broadcom_sonic branch on Sun Jun 9 22:42:15 PD…
Browse files Browse the repository at this point in the history
…T 2019

Change-Id: I819b0eab140ebad0a80a77f6de32fd7f736fcb0c
  • Loading branch information
rupesh-k committed Jun 10, 2019
2 parents f7bdf62 + f0cfa85 commit 8d7177f
Show file tree
Hide file tree
Showing 288 changed files with 34,199 additions and 2,445 deletions.
16 changes: 15 additions & 1 deletion .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,4 +121,6 @@ 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
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 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 $@
8 changes: 4 additions & 4 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,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
# * SONIC_MAKE_JOBS: Specifying number of parallel processes to run within a target makefile
Expand Down Expand Up @@ -194,6 +193,7 @@ SONIC_BUILD_INSTRUCTION := make \
HTTPS_PROXY=$(https_proxy) \
SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) \
LOCAL_SAI_DEBS_PATH=$(LOCAL_SAI_DEBS_PATH) \
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 @@ -172,7 +172,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 @@ -241,6 +241,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 @@ -258,6 +259,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 @@ -316,7 +318,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 @@ -422,6 +424,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 8d7177f

Please sign in to comment.