Skip to content

Commit

Permalink
[barefoot][platform] Update BFN platforms (sonic-net#5356)
Browse files Browse the repository at this point in the history
1. Added support of BFN newport new platform name.
2. Updated debian version for montara and mavericks platforms.
  • Loading branch information
vsenchyshyn authored and santhosh-kt committed Feb 25, 2021
1 parent d1cd0d4 commit a4f72e9
Show file tree
Hide file tree
Showing 22 changed files with 32 additions and 18 deletions.
1 change: 1 addition & 0 deletions device/barefoot/x86_64-accton_as9516bf_32d-r0
1 change: 1 addition & 0 deletions platform/barefoot/one-image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_MONTARA_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_NEWPORT_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_NEWPORT_BF_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(WNC_OSW1800_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9180_32X_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9280_64X_PLATFORM_MODULE)
Expand Down
8 changes: 6 additions & 2 deletions platform/barefoot/platform-modules-bfn-newport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ BFN_NEWPORT_PLATFORM_MODULE_VERSION = 1.0

export BFN_NEWPORT_PLATFORM_MODULE_VERSION

BFN_NEWPORT_PLATFORM_MODULE = sonic-platform-modules-bfn-newport_$(BFN_NEWPORT_PLATFORM_MODULE_VERSION)_amd64.deb
BFN_NEWPORT_PLATFORM_MODULE = sonic-platform-modules-bfn-newport-as9516_$(BFN_NEWPORT_PLATFORM_MODULE_VERSION)_amd64.deb
$(BFN_NEWPORT_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-bfn-newport
$(BFN_NEWPORT_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
$(BFN_NEWPORT_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as9516bf_32d-r0
$(BFN_NEWPORT_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as9516_32d-r0
SONIC_DPKG_DEBS += $(BFN_NEWPORT_PLATFORM_MODULE)

BFN_NEWPORT_BF_PLATFORM_MODULE = sonic-platform-modules-bfn-newport-as9516bf_$(BFN_NEWPORT_PLATFORM_MODULE_VERSION)_amd64.deb
$(BFN_NEWPORT_BF_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as9516bf_32d-r0
$(eval $(call add_extra_package,$(BFN_NEWPORT_PLATFORM_MODULE),$(BFN_NEWPORT_BF_PLATFORM_MODULE)))
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
9
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: sonic-platform-modules-bfn-montara
Section: main
Priority: extra
Maintainer: Support <[email protected]>
Build-Depends: debhelper (>= 8.0.0), bzip2
Build-Depends: debhelper (>= 9.0.0), bzip2
Standards-Version: 3.9.3

Package: sonic-platform-modules-bfn-montara
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
9
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ Source: sonic-platform-modules-bfn-newport
Section: main
Priority: extra
Maintainer: Support <[email protected]>
Build-Depends: debhelper (>= 8.0.0), bzip2
Build-Depends: debhelper (>= 9.0.0), bzip2
Standards-Version: 3.9.3

Package: sonic-platform-modules-bfn-newport
Package: sonic-platform-modules-bfn-newport-as9516
Architecture: amd64
Depends: linux-image-4.19.0-9-2-amd64-unsigned
Description: kernel module for bfn platform fpga and scripts for the devices such as fan, led, sfp

Package: sonic-platform-modules-bfn-newport-as9516bf
Architecture: amd64
Depends: linux-image-4.19.0-9-2-amd64-unsigned
Description: kernel module for bfn platform fpga and scripts for the devices such as fan, led, sfp
Expand Down
21 changes: 12 additions & 9 deletions platform/barefoot/sonic-platform-modules-bfn-newport/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

export INSTALL_MOD_DIR:=extra

PACKAGE_NAME := sonic-platform-modules-bfn-newport
PACKAGE_PRE_NAME := sonic-platform-modules-bfn-newport
KVERSION ?= $(shell uname -r)
KERNEL_SRC := /lib/modules/$(KVERSION)
MODULE_SRC := $(shell pwd)/modules
SCRIPT_SRC := $(shell pwd)/scripts
CONFIGS_SRC := $(shell pwd)/configs
PLUGINS_DIR := $(shell pwd)/plugins
MODULE_NAMES := as9516 as9516bf

%:
dh $@
Expand All @@ -17,14 +18,16 @@ override_dh_auto_build:
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)

override_dh_auto_install:
dh_installdirs -p$(PACKAGE_NAME) $(KERNEL_SRC)/$(INSTALL_MOD_DIR)
cp $(MODULE_SRC)/*.ko debian/$(PACKAGE_NAME)/$(KERNEL_SRC)/$(INSTALL_MOD_DIR)
dh_installdirs -p$(PACKAGE_NAME) usr/local/bin
cp -r $(SCRIPT_SRC)/* debian/$(PACKAGE_NAME)/usr/local/bin
dh_installdirs -p$(PACKAGE_NAME) etc/network/interfaces.d/
cp -r $(CONFIGS_SRC)/network/interfaces.d/* debian/$(PACKAGE_NAME)/etc/network/interfaces.d/
dh_installdirs -p$(PACKAGE_NAME) usr/share/sonic/device/x86_64-accton_as9516bf_32d-r0/plugins
cp -r $(PLUGINS_DIR)/* debian/$(PACKAGE_NAME)/usr/share/sonic/device/x86_64-accton_as9516bf_32d-r0/plugins/
(for mod in $(MODULE_NAMES); do \
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} $(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
cp $(MODULE_SRC)/*.ko debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} usr/local/bin; \
cp -r $(SCRIPT_SRC)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/local/bin; \
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} etc/network/interfaces.d/; \
cp -r $(CONFIGS_SRC)/network/interfaces.d/* debian/$(PACKAGE_PRE_NAME)-$${mod}/etc/network/interfaces.d/; \
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} usr/share/sonic/device/x86_64-accton_$${mod}_32d-r0/plugins; \
cp -r $(PLUGINS_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/share/sonic/device/x86_64-accton_$${mod}_32d-r0/plugins/; \
done)

override_dh_usrlocal:

Expand Down
2 changes: 1 addition & 1 deletion platform/barefoot/sonic-platform-modules-bfn/debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
9
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: sonic-platform-modules-bfn
Section: main
Priority: extra
Maintainer: support <[email protected]>
Build-Depends: debhelper (>= 8.0.0), bzip2
Build-Depends: debhelper (>= 9.0.0), bzip2
Standards-Version: 3.9.3

Package: sonic-platform-modules-bfn
Expand Down

0 comments on commit a4f72e9

Please sign in to comment.