Skip to content

Commit

Permalink
packages: add needed packages for Mellanox Spectrum Switches
Browse files Browse the repository at this point in the history
Add needed kernel and firmware packages for Mellanox Spectrum
SN2000 Series Switches.

Signed-off-by: Til Kaiser <til.kaiser@gmx.de>
  • Loading branch information
Til Kaiser authored and blocktrron committed Oct 31, 2023
1 parent d522cce commit 76713f4
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 1 deletion.
9 changes: 9 additions & 0 deletions package/firmware/linux-firmware/mellanox.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package/mlxsw_spectrum-firmware = $(call Package/firmware-default,Mellanox Spectrum firmware)
define Package/mlxsw_spectrum-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/mellanox
$(CP) \
$(PKG_BUILD_DIR)/mellanox/mlxsw_spectrum-*.mfa2 \
$(1)/lib/firmware/mellanox
endef

$(eval $(call BuildPackage,mlxsw_spectrum-firmware))
17 changes: 17 additions & 0 deletions package/kernel/linux/modules/hwmon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@ endef
$(eval $(call KernelPackage,hwmon-adt7475))


define KernelPackage/hwmon-coretemp
TITLE:=Intel Core/Core2/Atom temperature sensor
KCONFIG:=CONFIG_SENSORS_CORETEMP
FILES:=$(LINUX_DIR)/drivers/hwmon/coretemp.ko
AUTOLOAD:=$(call AutoProbe,coretemp)
$(call AddDepends/hwmon,)
endef

define KernelPackage/hwmon-coretemp/description
Kernel module for Intel Core/Core2/Atom temperature monitoring support.
Most of the family 6 CPUs are supported.
Check Documentation/hwmon/coretemp.rst for details.
endef

$(eval $(call KernelPackage,hwmon-coretemp))


define KernelPackage/hwmon-dme1737
TITLE:=SMSC DME1737 and compatible monitoring support
KCONFIG:=CONFIG_SENSORS_DME1737
Expand Down
16 changes: 16 additions & 0 deletions package/kernel/linux/modules/leds.mk
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,22 @@ endef
$(eval $(call KernelPackage,leds-apu))


define KernelPackage/leds-mlxcpld
SUBMENU:=$(LEDS_MENU)
TITLE:=LED support for the Mellanox boards
FILES:=$(LINUX_DIR)/drivers/leds/leds-mlxcpld.ko
KCONFIG:=CONFIG_LEDS_MLXCPLD
AUTOLOAD:=$(call AutoProbe,leds-mlxcpld)
endef

define KernelPackage/leds-mlxcpld/description
This option enables support for the LEDs on the Mellanox
boards.
endef

$(eval $(call KernelPackage,leds-mlxcpld))


define KernelPackage/leds-pca955x
SUBMENU:=$(LEDS_MENU)
TITLE:=LED driver for PCA955x I2C chips
Expand Down
26 changes: 26 additions & 0 deletions package/kernel/linux/modules/lib.mk
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,29 @@ define KernelPackage/oid-registry
endef

$(eval $(call KernelPackage,oid-registry))


define KernelPackage/lib-objagg
SUBMENU:=$(LIB_MENU)
TITLE:=objagg support
FILES:=$(LINUX_DIR)/lib/objagg.ko
KCONFIG:= \
CONFIG_OBJAGG \
CONFIG_TEST_OBJAGG=n
AUTOLOAD:=$(call AutoProbe,objagg)
endef

$(eval $(call KernelPackage,lib-objagg))


define KernelPackage/lib-parman
SUBMENU:=$(LIB_MENU)
TITLE:=parman support
FILES:=$(LINUX_DIR)/lib/parman.ko
KCONFIG:= \
CONFIG_PARMAN \
CONFIG_TEST_PARMAN=n
AUTOLOAD:=$(call AutoProbe,parman)
endef

$(eval $(call KernelPackage,lib-parman))
115 changes: 114 additions & 1 deletion package/kernel/linux/modules/netdevices.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ $(eval $(call KernelPackage,mlx4-core))
define KernelPackage/mlx5-core
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Mellanox ConnectX(R) mlx5 core Network Driver
DEPENDS:=@PCI_SUPPORT +kmod-ptp
DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-mlxfw
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
KCONFIG:= CONFIG_MLX5_CORE \
CONFIG_MLX5_CORE_EN=y \
Expand Down Expand Up @@ -1372,6 +1372,119 @@ endef
$(eval $(call KernelPackage,mlx5-core))


define KernelPackage/mlxfw
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Mellanox Technologies firmware flash module
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlxfw/mlxfw.ko
KCONFIG:=CONFIG_MLXFW
AUTOLOAD:=$(call AutoProbe,mlxfw)
endef

define KernelPackage/mlxfw/description
This driver supports Mellanox Technologies Firmware
flashing common logic.
endef

$(eval $(call KernelPackage,mlxfw))


define KernelPackage/mlxsw-core
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Mellanox Technologies Switch ASICs support
DEPENDS:=+kmod-mlxfw +kmod-hwmon-core
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlxsw/mlxsw_core.ko
KCONFIG:= \
CONFIG_MLXSW_CORE \
CONFIG_MLXSW_CORE_HWMON=y \
CONFIG_MLXSW_CORE_THERMAL=y
AUTOLOAD:=$(call AutoProbe,mlxsw_core)
endef

define KernelPackage/mlxsw-core/description
This driver supports Mellanox Technologies Switch ASICs family.
endef

$(eval $(call KernelPackage,mlxsw-core))


define KernelPackage/mlxsw-i2c
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=I2C bus implementation for Mellanox Technologies Switch ASICs
DEPENDS:=+kmod-mlxsw-core +kmod-i2c-core
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlxsw/mlxsw_i2c.ko
KCONFIG:=CONFIG_MLXSW_I2C
AUTOLOAD:=$(call AutoProbe,mlxsw_i2c)
endef

define KernelPackage/mlxsw-i2c/description
This is I2C bus implementation for Mellanox Technologies Switch ASICs.
endef

$(eval $(call KernelPackage,mlxsw-i2c))


define KernelPackage/mlxsw-minimal
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Mellanox Technologies minimal I2C support
DEPENDS:=+kmod-mlxsw-core +kmod-mlxsw-i2c
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlxsw/mlxsw_minimal.ko
KCONFIG:=CONFIG_MLXSW_MINIMAL
AUTOLOAD:=$(call AutoProbe,mlxsw_minimal)
endef

define KernelPackage/mlxsw-minimal/description
This driver supports I2C access for Mellanox Technologies Switch
ASICs.
endef

$(eval $(call KernelPackage,mlxsw-minimal))


define KernelPackage/mlxsw-pci
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=PCI bus implementation for Mellanox Technologies Switch ASICs
DEPENDS:=@PCI_SUPPORT +kmod-mlxsw-core
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlxsw/mlxsw_pci.ko
KCONFIG:=CONFIG_MLXSW_PCI
AUTOLOAD:=$(call AutoProbe,mlxsw_pci)
endef

define KernelPackage/mlxsw-pci/description
This is PCI bus implementation for Mellanox Technologies Switch ASICs.
endef

$(eval $(call KernelPackage,mlxsw-pci))


define KernelPackage/mlxsw-spectrum
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Mellanox Technologies Spectrum family support
DEPENDS:= \
+kmod-mlxsw-core +kmod-mlxsw-pci +kmod-lib-objagg +kmod-lib-parman \
+kmod-ip6-tunnel +kmod-ptp +kmod-sched-act-sample +kmod-vxlan
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlxsw/mlxsw_spectrum.ko
KCONFIG:= \
CONFIG_MLXSW_SPECTRUM \
CONFIG_NET_SWITCHDEV=y \
CONFIG_MLXSW_SPECTRUM_DCB=y \
CONFIG_DCB=y \
CONFIG_AMD_XGBE_DCB=n \
CONFIG_IXGBE_DCB=n \
CONFIG_I40E_DCB=n \
CONFIG_QLCNIC_DCB=n \
CONFIG_FSL_DPAA2_ETH_DCB=n \
CONFIG_FSL_DPAA2_SWITCH=n
AUTOLOAD:=$(call AutoProbe,mlxsw_spectrum)
endef

define KernelPackage/mlxsw-spectrum/description
This driver supports Mellanox Technologies
Spectrum/Spectrum-2/Spectrum-3/Spectrum-4 Ethernet Switch ASICs.
endef

$(eval $(call KernelPackage,mlxsw-spectrum))


define KernelPackage/net-selftests
SUBMENU:=$(NETWORK_DEVICES_MENU)
DEPENDS:=+kmod-libphy
Expand Down

0 comments on commit 76713f4

Please sign in to comment.