diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/default_sku b/device/barefoot/x86_64-accton_as9516_32d-r0/default_sku similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/default_sku rename to device/barefoot/x86_64-accton_as9516_32d-r0/default_sku diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/installer.conf b/device/barefoot/x86_64-accton_as9516_32d-r0/installer.conf similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/installer.conf rename to device/barefoot/x86_64-accton_as9516_32d-r0/installer.conf diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/buffers.json.j2 b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers.json.j2 similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/buffers.json.j2 rename to device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers.json.j2 diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/buffers_defaults_t0.j2 b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t0.j2 similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/buffers_defaults_t0.j2 rename to device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t0.j2 diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/buffers_defaults_t1.j2 b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t1.j2 similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/buffers_defaults_t1.j2 rename to device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t1.j2 diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/pg_profile_lookup.ini b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/pg_profile_lookup.ini similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/pg_profile_lookup.ini rename to device/barefoot/x86_64-accton_as9516_32d-r0/newport/pg_profile_lookup.ini diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/port_config.ini b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/port_config.ini similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/port_config.ini rename to device/barefoot/x86_64-accton_as9516_32d-r0/newport/port_config.ini diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/qos.json.j2 b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/qos.json.j2 similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/qos.json.j2 rename to device/barefoot/x86_64-accton_as9516_32d-r0/newport/qos.json.j2 diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/sai.profile b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/sai.profile similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/sai.profile rename to device/barefoot/x86_64-accton_as9516_32d-r0/newport/sai.profile diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/switch-tna-sai.conf b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/switch-tna-sai.conf similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/switch-tna-sai.conf rename to device/barefoot/x86_64-accton_as9516_32d-r0/newport/switch-tna-sai.conf diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/plugins b/device/barefoot/x86_64-accton_as9516_32d-r0/plugins similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/plugins rename to device/barefoot/x86_64-accton_as9516_32d-r0/plugins diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0/pmon_daemon_control.json b/device/barefoot/x86_64-accton_as9516_32d-r0/pmon_daemon_control.json similarity index 100% rename from device/barefoot/x86_64-accton_as9516bf_32d-r0/pmon_daemon_control.json rename to device/barefoot/x86_64-accton_as9516_32d-r0/pmon_daemon_control.json diff --git a/device/barefoot/x86_64-accton_as9516bf_32d-r0 b/device/barefoot/x86_64-accton_as9516bf_32d-r0 new file mode 120000 index 0000000000..93f47d51b7 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9516bf_32d-r0 @@ -0,0 +1 @@ +x86_64-accton_as9516_32d-r0 \ No newline at end of file diff --git a/platform/barefoot/one-image.mk b/platform/barefoot/one-image.mk index 0147b62d00..df54898300 100644 --- a/platform/barefoot/one-image.mk +++ b/platform/barefoot/one-image.mk @@ -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) diff --git a/platform/barefoot/platform-modules-bfn-newport.mk b/platform/barefoot/platform-modules-bfn-newport.mk index ff251ed1dd..fcac23e57b 100644 --- a/platform/barefoot/platform-modules-bfn-newport.mk +++ b/platform/barefoot/platform-modules-bfn-newport.mk @@ -4,10 +4,14 @@ 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) -SONIC_STRETCH_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))) + +SONIC_STRETCH_DEBS += $(BFN_NEWPORT_PLATFORM_MODULE) \ No newline at end of file diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/debian/compat b/platform/barefoot/sonic-platform-modules-bfn-montara/debian/compat index 45a4fb75db..ec635144f6 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/debian/compat +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/debian/control b/platform/barefoot/sonic-platform-modules-bfn-montara/debian/control index e3f5356f22..efd16cf7a0 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/debian/control +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/debian/control @@ -2,7 +2,7 @@ Source: sonic-platform-modules-bfn-montara Section: main Priority: extra Maintainer: Support -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 diff --git a/platform/barefoot/sonic-platform-modules-bfn-newport/debian/compat b/platform/barefoot/sonic-platform-modules-bfn-newport/debian/compat index 45a4fb75db..ec635144f6 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-newport/debian/compat +++ b/platform/barefoot/sonic-platform-modules-bfn-newport/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/platform/barefoot/sonic-platform-modules-bfn-newport/debian/control b/platform/barefoot/sonic-platform-modules-bfn-newport/debian/control index bc6c990efe..38ecb25c45 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-newport/debian/control +++ b/platform/barefoot/sonic-platform-modules-bfn-newport/debian/control @@ -2,10 +2,15 @@ Source: sonic-platform-modules-bfn-newport Section: main Priority: extra Maintainer: Support -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.9.0-11-2-amd64 +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.9.0-11-2-amd64 Description: kernel module for bfn platform fpga and scripts for the devices such as fan, led, sfp diff --git a/platform/barefoot/sonic-platform-modules-bfn-newport/debian/rules b/platform/barefoot/sonic-platform-modules-bfn-newport/debian/rules index 951069a601..2a66679fe3 100755 --- a/platform/barefoot/sonic-platform-modules-bfn-newport/debian/rules +++ b/platform/barefoot/sonic-platform-modules-bfn-newport/debian/rules @@ -2,12 +2,13 @@ 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 +MODULE_NAMES := as9516 as9516bf %: dh $@ @@ -16,12 +17,14 @@ 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/ + (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/; \ + done) override_dh_usrlocal: diff --git a/platform/barefoot/sonic-platform-modules-bfn/debian/compat b/platform/barefoot/sonic-platform-modules-bfn/debian/compat index 45a4fb75db..ec635144f6 100644 --- a/platform/barefoot/sonic-platform-modules-bfn/debian/compat +++ b/platform/barefoot/sonic-platform-modules-bfn/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/platform/barefoot/sonic-platform-modules-bfn/debian/control b/platform/barefoot/sonic-platform-modules-bfn/debian/control index cca87831f1..518a969390 100644 --- a/platform/barefoot/sonic-platform-modules-bfn/debian/control +++ b/platform/barefoot/sonic-platform-modules-bfn/debian/control @@ -2,7 +2,7 @@ Source: sonic-platform-modules-bfn Section: main Priority: extra Maintainer: support -Build-Depends: debhelper (>= 8.0.0), bzip2 +Build-Depends: debhelper (>= 9.0.0), bzip2 Standards-Version: 3.9.3 Package: sonic-platform-modules-bfn