Skip to content
Closed
Changes from all commits
Commits
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
26 changes: 17 additions & 9 deletions src/sonic-frr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,28 @@ SHELL = /bin/bash

MAIN_TARGET = $(FRR)
DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG) $(FRR_SNMP) $(FRR_SNMP_DBG)
BRANCH = $(shell date +%Y%m%d\.%H%M%S)

patch1 = 0001-Add-support-of-bgp-tcp-DSCP-value.patch
patch2 = 0002-Reduce-severity-of-Vty-connected-from-message.patch
patch3 = 0003-ignore-nexthop-attribute-when-NLRI-is-present.patch
patch4 = 0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch
patch5 = 0005-Support-VRF.patch

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Build the package
pushd ./frr
git checkout -b $(BRANCH) origin/frr/7.0
stg init
stg import -s ../patch/series
pushd ./frr
for frr_patch in $(patch1) $(patch2) $(patch3) $(patch4) $(patch5); do
if patch -sfp1 --dry-run < ../patch/$$frr_patch; then
patch -sfp1 < ../patch/$$frr_patch
else
if ! patch -Rsfp1 --dry-run < ../patch/$$frr_patch; then
echo "Patch $$frr_patch failure"
exit 1
fi
fi
done
tools/tarsource.sh -V -e '-sonic'
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)
stg undo
git clean -xfdf
git checkout frr/7.0
git branch -D $(BRANCH)
popd
mv $(DERIVED_TARGET) $* $(DEST)/

Expand Down