Skip to content

Commit

Permalink
[gearbox] provide common gbsyncd.service.j2 to start for platform spe…
Browse files Browse the repository at this point in the history
…cific gbsyncd docker (#9286)

Why I did it
Fix #9059. It provides common gbsyncd.service.j2 to start for platform specific gbsyncd docker, which must be named 'gbsyncd'.

How I did it
All of platform specific gbsyncd dockers use a common name 'gbsyncd'
Use a unique systemd service template gbsyncd.service.j2 for gbsyncd docker
  • Loading branch information
jimmyzhai authored Nov 18, 2021
1 parent 0e07725 commit 1d2a11b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 6 additions & 0 deletions device/virtual/x86_64-kvm_x86_64-r0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ set default_sku to:
brcm_gearbox_vs t1
```

And create file gbsyncd.ini with:

```
platform=gbsyncd
```

To build (same as Force-10-S6000):

```
Expand Down
1 change: 0 additions & 1 deletion files/build_templates/gbsyncd-cisco.service.j2

This file was deleted.

1 change: 0 additions & 1 deletion files/build_templates/gbsyncd-credo.service.j2

This file was deleted.

5 changes: 1 addition & 4 deletions files/scripts/gbsyncd-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ DEVPATH="/usr/share/sonic/device"
CONFIGFILE="${DEVPATH}/${PLATFORM}/gbsyncd.ini"

if [ ! -f "$CONFIGFILE" ]; then
if [ gbsyncd = "$SERVICE" ]; then
exit 0
fi
exit 1
fi

while IFS="=" read -r key value; do
case "$key" in
platform)
if [ "$value" = "$SERVICE" ]; then
if [[ "$value" = "$SERVICE"* ]]; then
exit 0
fi
;;
Expand Down
1 change: 0 additions & 1 deletion platform/components/docker-gbsyncd-credo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ifneq ($($(LIBSAI_CREDO)_URL),)
include $(PLATFORM_PATH)/../template/docker-gbsyncd-base.mk
$(DOCKER_GBSYNCD_BASE)_VERSION = 1.0.0
$(DOCKER_GBSYNCD_BASE)_PACKAGE_NAME = gbsyncd
$(DOCKER_GBSYNCD_BASE)_CONTAINER_NAME = gbsyncd-$(DOCKER_GBSYNCD_PLATFORM_CODE)
$(DOCKER_GBSYNCD_BASE)_PATH = $(PLATFORM_PATH)/../components/docker-gbsyncd-$(DOCKER_GBSYNCD_PLATFORM_CODE)
SONIC_ONLINE_DEBS += $(LIBSAI_CREDO) $(LIBSAI_CREDO_OWL)
$(DOCKER_GBSYNCD_BASE)_DEPENDS += $(SYNCD) $(LIBSAI_CREDO) $(LIBSAI_CREDO_OWL)
Expand Down

0 comments on commit 1d2a11b

Please sign in to comment.