2022-08-20 10:30:50 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=qca-ssdk
|
2023-11-14 08:22:40 +00:00
|
|
|
PKG_RELEASE:=3
|
2022-08-20 10:30:50 +00:00
|
|
|
|
|
|
|
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk.git
|
|
|
|
PKG_SOURCE_PROTO:=git
|
2023-11-07 13:47:15 +00:00
|
|
|
PKG_SOURCE_DATE:=2023-10-04
|
|
|
|
PKG_SOURCE_VERSION:=23a5aa4a4d5834da7a07efb58baebfbee91786b0
|
|
|
|
PKG_MIRROR_HASH:=9d169ce924a46a4e530031061d3183b92f23c7f46b3106f0b9ba3587846a73ee
|
2022-08-20 10:30:50 +00:00
|
|
|
|
|
|
|
PKG_FLAGS:=nonshared
|
2023-01-31 11:03:09 +00:00
|
|
|
PKG_BUILD_FLAGS:=no-lto
|
2022-08-20 10:30:50 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define KernelPackage/qca-ssdk
|
|
|
|
SECTION:=kernel
|
|
|
|
CATEGORY:=Kernel modules
|
|
|
|
SUBMENU:=Network Devices
|
|
|
|
TITLE:=Qualcom SSDK switch driver
|
2023-06-11 17:32:52 +00:00
|
|
|
DEPENDS:=@(TARGET_qualcommax)
|
2022-08-20 10:30:50 +00:00
|
|
|
FILES:=$(PKG_BUILD_DIR)/build/bin/qca-ssdk.ko
|
|
|
|
AUTOLOAD:=$(call AutoLoad,30,qca-ssdk)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define KernelPackage/qca-ssdk/Description
|
|
|
|
Driver for Qualcomm Atheros switches.
|
|
|
|
endef
|
|
|
|
|
|
|
|
GCC_VERSION=$(shell echo "$(CONFIG_GCC_VERSION)" | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
|
|
|
|
|
2023-05-23 12:55:48 +00:00
|
|
|
LNX_CONFIG_OPTS = LNX_MAKEOPTS='$(KERNEL_MAKEOPTS)' MODULE_TYPE=KSLIB modules
|
|
|
|
|
2022-08-20 10:30:50 +00:00
|
|
|
MAKE_FLAGS+= \
|
|
|
|
TARGET_NAME=$(CONFIG_TARGET_NAME) \
|
2023-10-19 16:16:25 +00:00
|
|
|
TOOL_PATH=$(firstword $(TOOLCHAIN_BIN_DIRS)) \
|
2022-08-20 10:30:50 +00:00
|
|
|
SYS_PATH=$(LINUX_DIR) \
|
|
|
|
TOOLPREFIX=$(TARGET_CROSS) \
|
|
|
|
KVER=$(LINUX_VERSION) \
|
|
|
|
ARCH=$(LINUX_KARCH) \
|
|
|
|
TARGET_SUFFIX=$(CONFIG_TARGET_SUFFIX) \
|
|
|
|
GCC_VERSION=$(GCC_VERSION) \
|
|
|
|
EXTRA_CFLAGS=-fno-stack-protector -I$(STAGING_DIR)/usr/include \
|
2023-11-14 08:22:40 +00:00
|
|
|
SoC=$(CONFIG_TARGET_SUBTARGET) \
|
2023-05-23 12:55:48 +00:00
|
|
|
$(LNX_CONFIG_OPTS)
|
2022-08-20 10:30:50 +00:00
|
|
|
|
2023-06-13 20:07:06 +00:00
|
|
|
ifeq ($(CONFIG_TARGET_SUBTARGET), "ipq807x")
|
2022-08-20 10:30:50 +00:00
|
|
|
MAKE_FLAGS+= CHIP_TYPE=HPPE PTP_FEATURE=disable SWCONFIG_FEATURE=disable
|
|
|
|
endif
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/api
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/ref
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/fal
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/sal
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/init
|
|
|
|
$(CP) -rf $(PKG_BUILD_DIR)/include/api/sw_ioctl.h $(1)/usr/include/qca-ssdk/api
|
|
|
|
if [ -f $(PKG_BUILD_DIR)/include/ref/ref_vsi.h ]; then \
|
|
|
|
$(CP) -rf $(PKG_BUILD_DIR)/include/ref/ref_vsi.h $(1)/usr/include/qca-ssdk/ref/; \
|
|
|
|
fi
|
|
|
|
if [ -f $(PKG_BUILD_DIR)/include/ref/ref_fdb.h ]; then \
|
|
|
|
$(CP) -rf $(PKG_BUILD_DIR)/include/ref/ref_fdb.h $(1)/usr/include/qca-ssdk/ref/; \
|
|
|
|
fi
|
|
|
|
if [ -f $(PKG_BUILD_DIR)/include/ref/ref_port_ctrl.h ]; then \
|
|
|
|
$(CP) -rf $(PKG_BUILD_DIR)/include/ref/ref_port_ctrl.h $(1)/usr/include/qca-ssdk/ref/; \
|
|
|
|
fi
|
|
|
|
if [ -f $(PKG_BUILD_DIR)/include/init/ssdk_init.h ]; then \
|
|
|
|
$(CP) -rf $(PKG_BUILD_DIR)/include/init/ssdk_init.h $(1)/usr/include/qca-ssdk/init/; \
|
|
|
|
fi
|
2023-06-23 11:51:14 +00:00
|
|
|
if [ -f $(PKG_BUILD_DIR)/include/init/ssdk_netlink.h ]; then \
|
|
|
|
$(CP) -rf $(PKG_BUILD_DIR)/include/init/ssdk_netlink.h $(1)/usr/include/qca-ssdk/init/; \
|
|
|
|
fi
|
2022-08-20 10:30:50 +00:00
|
|
|
$(CP) -rf $(PKG_BUILD_DIR)/include/fal $(1)/usr/include/qca-ssdk
|
|
|
|
$(CP) -rf $(PKG_BUILD_DIR)/include/common/*.h $(1)/usr/include/qca-ssdk
|
|
|
|
$(CP) -rf $(PKG_BUILD_DIR)/include/sal/os/linux/*.h $(1)/usr/include/qca-ssdk
|
|
|
|
$(CP) -rf $(PKG_BUILD_DIR)/include/sal/os/*.h $(1)/usr/include/qca-ssdk
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call KernelPackage,qca-ssdk))
|