Skip to content

Commit

Permalink
build syncd-vs and syncd-vs-dbg package (sonic-net#245)
Browse files Browse the repository at this point in the history
* build syncd-vs and syncd-vs-dbg package

build syncd-vs package without vendor SAI package
remove vssyncd package as its build still rely on a vendor SAI package.

* install sai headers in libsaivs-dev package
  • Loading branch information
lguohan committed Oct 18, 2017
1 parent 4e778d2 commit d22bffb
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 47 deletions.
20 changes: 15 additions & 5 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ Standards-Version: 1.0.0

Package: syncd
Architecture: any
Conflicts: syncd-rpc
Conflicts: syncd-rpc, syncd-vs
Description: This package contains sync daemon for SONiC project.
This sync daemon syncs the ASIC_DB in Redis database and the real ASIC via SAI.

Package: syncd-rpc
Architecture: any
Conflicts: syncd
Conflicts: syncd, syncd-vs
Description: This package contains sync daemon with rpc for SONiC project.
This sync daemon syncs the ASIC_DB in Redis database and the real ASIC via SAI.
This daemon contains saithrift rpc library for remote control of an ASIC.

Package: vssyncd
Package: syncd-vs
Architecture: any
Conflicts: syncd-rpc, syncd
Description: This package contains sync daemon for SONiC project linked with virtual switch.
Expand Down Expand Up @@ -61,7 +61,7 @@ Package: syncd-dbg
Architecture: any
Section: debug
Priority: extra
Conflicts: syncd-rpc-dbg
Conflicts: syncd-rpc-dbg, syncd-vs
Depends:
syncd (= ${binary:Version}),
${misc:Depends}
Expand All @@ -71,12 +71,22 @@ Package: syncd-rpc-dbg
Architecture: any
Section: debug
Priority: extra
Conflicts: syncd-dbg
Conflicts: syncd-dbg, syncd-vs
Depends:
syncd-rpc (= ${binary:Version}),
${misc:Depends}
Description: debugging symbols for syncd-rpc

Package: syncd-vs-dbg
Architecture: any
Section: debug
Priority: extra
Conflicts: syncd-dbg, syncd-rpc-dbg
Depends:
syncd-vs (= ${binary:Version}),
${misc:Depends}
Description: debugging symbols for syncd-vs

Package: libsairedis-dbg
Architecture: any
Section: debug
Expand Down
1 change: 1 addition & 0 deletions debian/libsaivs-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI/inc/*.h usr/include/sai/
15 changes: 11 additions & 4 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@ binary: binary-syncd binary-syncd-rpc
binary-syncd:
$(shell echo > /tmp/syncd-build)
dh clean --with autotools-dev
dh build -N syncd-rpc -N syncd-rpc-dbg --with autotools-dev
dh binary -N syncd-rpc -N syncd-rpc-dbg --with autotools-dev
dh build -N syncd-rpc -N syncd-rpc-dbg -N syncd-vs -N syncd-vs-dbg --with autotools-dev
dh binary -N syncd-rpc -N syncd-rpc-dbg -N syncd-vs -N syncd-vs-dbg --with autotools-dev

binary-syncd-rpc: | binary-syncd
$(shell echo '--enable-rpcserver=no' > /tmp/syncd-build)
dh clean --with autotools-dev
dh build -N syncd -N syncd-dbg --with autotools-dev
dh binary -N syncd -N syncd-dbg --with autotools-dev
dh build -N syncd -N syncd-dbg -N syncd-vs -N syncd-vs-dbg --with autotools-dev
dh binary -N syncd -N syncd-dbg -N syncd-vs -N syncd-vs-dbg --with autotools-dev

binary-syncd-vs:
$(shell echo '--with-sai=vs' > /tmp/syncd-build)
dh clean --with autotools-dev
dh build -N syncd -N syncd-dbg -N syncd-rpc -N syncd-rpc-dbg --with autotools-dev
dh binary -N syncd -N syncd-dbg -N syncd-rpc -N syncd-rpc-dbg --with autotools-dev

# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
Expand All @@ -61,6 +67,7 @@ override_dh_shlibdeps:
override_dh_strip:
dh_strip -psyncd-rpc --dbg-package=syncd-rpc-dbg
dh_strip -psyncd --dbg-package=syncd-dbg
dh_strip -psyncd-vs --dbg-package=syncd-vs-dbg
dh_strip -plibsairedis --dbg-package=libsairedis-dbg
dh_strip -plibsaivs --dbg-package=libsaivs-dbg
dh_strip -plibsaimetadata --dbg-package=libsaimetadata-dbg
1 change: 1 addition & 0 deletions debian/syncd-vs.dirs
1 change: 1 addition & 0 deletions debian/syncd-vs.init
1 change: 1 addition & 0 deletions debian/syncd-vs.install
1 change: 0 additions & 1 deletion debian/vssyncd.dirs

This file was deleted.

36 changes: 0 additions & 36 deletions debian/vssyncd.init

This file was deleted.

1 change: 0 additions & 1 deletion debian/vssyncd.install

This file was deleted.

1 change: 1 addition & 0 deletions vslib/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ libsaivs_la_SOURCES = \
sai_vs_generic_get.cpp \
sai_vs_generic_remove.cpp \
sai_vs_generic_set.cpp \
sai_vs.cpp \
sai_vs_switch_BCM56850.cpp \
sai_vs_switch_MLNX2700.cpp

Expand Down
8 changes: 8 additions & 0 deletions vslib/src/sai_vs.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "sai_vs.h"
#include "sai_vs_internal.h"

sai_status_t sai_dbg_generate_dump(
_In_ const char *dump_file_name)
{
return SAI_STATUS_SUCCESS;
}

0 comments on commit d22bffb

Please sign in to comment.