openwrt/package/kernel/qca-ssdk/Makefile

99 lines
3.3 KiB
Makefile
Raw Normal View History

include $(TOPDIR)/rules.mk
PKG_NAME:=qca-ssdk
kernel: qca-ssdk: update 12.5 to 2024-06-13 There are some new commits, so refresh and update patches. Some build warnings have been fixed upstream too. Add backport target/linux/generic/backport-6.6/722-v6.10-dt-bindings-arm-qcom-ids-Add-SoC-ID-for-IPQ5321.patch. Removed upstream: [-] qca-ssdk/patches/101-hsl_phy-add-support-for-detection-PSGMII-PHY-mode.patch [-] qca-ssdk/patches/201-fix-compile-warnings.patch List of changes: 2024-04-16 -c451136b- qca-ssdk: strip MRPPE code 2024-06-05 -f455a820- [qca-ssdk]: fix enum-int-mismatch warnings 2024-05-31 -bbfc0fa9- Merge "[qca-ssdk]: update eee status of phydev" 2024-05-31 -adbe9dc5- Merge "[qca-ssdk]: support psgmii and uqsxgmii mode of kernel" 2024-05-31 -d06ca777- Merge "[qca-ssdk]: fix 5G issue with the AQR FW that use 5gbaser for 5G speed" 2024-05-31 -c6f539a5- Merge "qca-ssdk: support mrppe pktedit padding functions" 2024-04-29 -c321e2a9- qca-ssdk: support mrppe pktedit padding functions 2024-05-24 -ee6e201e- qca-ssdk: Fix the big endian compile error 2024-05-15 -8c116bb9- [qca-ssdk]: update eee status of phydev 2024-05-20 -f0341a2c- Merge "qca-ssdk: Enable igmp for PPE MINI profile" 2024-05-16 -44a0ce93- qca-ssdk: Enable igmp for PPE MINI profile 2024-05-15 -8b91bbf6- [qca-ssdk]: support psgmii and uqsxgmii mode of kernel 2024-05-14 -7eec1658- [qca-ssdk]: fix 5G issue with the AQR FW that use 5gbaser for 5G speed 2024-05-12 -b9f5ea0e- [qca-ssdk]: ethtool support, do not change wake-up timer when the requested timer is 0 2024-05-09 -5e2c15ed- Merge "[qca-ssdk]: remove check when mht clock enable" 2024-05-09 -a1563b90- Merge "[qca-ssdk] support new sku IPQ5321" 2024-04-23 -f04b7680- [qca-ssdk]: show unknown status when link down 2024-03-22 -33b91b30- [qca-ssdk]: remove check when mht clock enable 2024-04-29 -b6362f2b- Merge "qca-ssdk:fix bug in marina nptv6 iid cal" 2024-04-29 -097033ae- Merge "[qca-ssdk] support cypress uniphy0 connecting MHT switch port0" 2024-04-24 -d45560fd- qca-ssdk:fix bug in marina nptv6 iid cal 2024-04-24 -7d7a42af- qca-ssdk: enable policer counter on low memory profile 2024-04-18 -e36cf6ea- Merge "[qca-ssdk]: change portvlan egress mode initial value as untouched" 2024-04-18 -27817881- Merge "[qca-ssdk]: update the aqr phy supported ability" 2024-04-18 -5a3a693c- Merge "qca-ssdk:support marina nptv6" 2024-04-16 -129fe9b3- Merge "qca-ssdk: support tunnel fields and innner fields inverse" 2024-01-09 -fc8f6abd- qca-ssdk:support marina nptv6 Signed-off-by: Kristian Skramstad <kristian+github@83.no> Link: https://github.com/openwrt/openwrt/pull/15771 Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-21 22:00:15 +00:00
PKG_RELEASE:=3
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk.git
PKG_SOURCE_PROTO:=git
kernel: qca-ssdk: update 12.5 to 2024-06-13 There are some new commits, so refresh and update patches. Some build warnings have been fixed upstream too. Add backport target/linux/generic/backport-6.6/722-v6.10-dt-bindings-arm-qcom-ids-Add-SoC-ID-for-IPQ5321.patch. Removed upstream: [-] qca-ssdk/patches/101-hsl_phy-add-support-for-detection-PSGMII-PHY-mode.patch [-] qca-ssdk/patches/201-fix-compile-warnings.patch List of changes: 2024-04-16 -c451136b- qca-ssdk: strip MRPPE code 2024-06-05 -f455a820- [qca-ssdk]: fix enum-int-mismatch warnings 2024-05-31 -bbfc0fa9- Merge "[qca-ssdk]: update eee status of phydev" 2024-05-31 -adbe9dc5- Merge "[qca-ssdk]: support psgmii and uqsxgmii mode of kernel" 2024-05-31 -d06ca777- Merge "[qca-ssdk]: fix 5G issue with the AQR FW that use 5gbaser for 5G speed" 2024-05-31 -c6f539a5- Merge "qca-ssdk: support mrppe pktedit padding functions" 2024-04-29 -c321e2a9- qca-ssdk: support mrppe pktedit padding functions 2024-05-24 -ee6e201e- qca-ssdk: Fix the big endian compile error 2024-05-15 -8c116bb9- [qca-ssdk]: update eee status of phydev 2024-05-20 -f0341a2c- Merge "qca-ssdk: Enable igmp for PPE MINI profile" 2024-05-16 -44a0ce93- qca-ssdk: Enable igmp for PPE MINI profile 2024-05-15 -8b91bbf6- [qca-ssdk]: support psgmii and uqsxgmii mode of kernel 2024-05-14 -7eec1658- [qca-ssdk]: fix 5G issue with the AQR FW that use 5gbaser for 5G speed 2024-05-12 -b9f5ea0e- [qca-ssdk]: ethtool support, do not change wake-up timer when the requested timer is 0 2024-05-09 -5e2c15ed- Merge "[qca-ssdk]: remove check when mht clock enable" 2024-05-09 -a1563b90- Merge "[qca-ssdk] support new sku IPQ5321" 2024-04-23 -f04b7680- [qca-ssdk]: show unknown status when link down 2024-03-22 -33b91b30- [qca-ssdk]: remove check when mht clock enable 2024-04-29 -b6362f2b- Merge "qca-ssdk:fix bug in marina nptv6 iid cal" 2024-04-29 -097033ae- Merge "[qca-ssdk] support cypress uniphy0 connecting MHT switch port0" 2024-04-24 -d45560fd- qca-ssdk:fix bug in marina nptv6 iid cal 2024-04-24 -7d7a42af- qca-ssdk: enable policer counter on low memory profile 2024-04-18 -e36cf6ea- Merge "[qca-ssdk]: change portvlan egress mode initial value as untouched" 2024-04-18 -27817881- Merge "[qca-ssdk]: update the aqr phy supported ability" 2024-04-18 -5a3a693c- Merge "qca-ssdk:support marina nptv6" 2024-04-16 -129fe9b3- Merge "qca-ssdk: support tunnel fields and innner fields inverse" 2024-01-09 -fc8f6abd- qca-ssdk:support marina nptv6 Signed-off-by: Kristian Skramstad <kristian+github@83.no> Link: https://github.com/openwrt/openwrt/pull/15771 Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-21 22:00:15 +00:00
PKG_SOURCE_DATE:=2024-06-13
PKG_SOURCE_VERSION:=c451136ba69d51d60f770365b6d6d60ff2801998
PKG_MIRROR_HASH:=4c54f2d77b5abeb96bddceb4a9eb58aa2c8fb12b58d5d666196224a35ac107dc
PKG_FLAGS:=nonshared
PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-lto
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
DEPENDS:=@(TARGET_qualcommax)
FILES:=$(PKG_BUILD_DIR)/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/')
LNX_CONFIG_OPTS = LNX_MAKEOPTS='$(KERNEL_MAKEOPTS)' PRJ_PATH=$(PKG_BUILD_DIR) MODULE_TYPE=KSLIB modules
MAKE_FLAGS+= \
TARGET_NAME=$(CONFIG_TARGET_NAME) \
TOOL_PATH=$(firstword $(TOOLCHAIN_BIN_DIRS)) \
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" \
SoC=$(CONFIG_TARGET_SUBTARGET) \
kernel: qca-ssdk: use bash as shell Currently, trying to compile qca-ssdk on macOS will fail in a weird way: make[6]: *** No rule to make target 'openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-ssdk-2024.04.17~3d060f7a/-n', needed by 'openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-ssdk-2024.04.17~3d060f7a/qca-ssdk.o'. Stop. After looking looking at src_list.dep from which KBuild cmd_mod will generate the list of objects to compile it looked like: -n /src/adpt/adpt.c -n -n Which was rather suspicous so after comparing to the same file but with Fedora as host: /src/adpt/adpt.c src/adpt/hppe/adpt_hppe_fdb.c src/adpt/hppe/adpt_hppe_mib.c It was clear that echo -n which was used in SSDK-s target.mk was not working as intented, and it looked like the POSIX only version of echo was being used which does not honor -n. So, after failling to reproduce it externally, replacing the call to echo with a full path to coreutils echo fixed the compilation. After further debugging, it was determined that SSDK does not honor CONFIG_SHELL like other kernel modules so it was defaulting to /bin/sh as the shell make was calling thus calling the /bin/sh built-in echo which on macOS is the old Bash 3.2 one and it does not respect -n. So, we have to explicitly pass SHELL=$(BASH) to SSDK to make it use bash like kernel build or other kernel modules. This is not an issue since on macOS we always build bash anyway. Link: https://github.com/openwrt/openwrt/pull/15459 Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-11 15:01:42 +00:00
SHELL="$(BASH)" \
PTP_FEATURE=disable SWCONFIG_FEATURE=disable \
ISISC_ENABLE=disable MHT_ENABLE=disable \
IN_QCA803X_PHY=FALSE IN_QCA808X_PHY=FALSE \
IN_MALIBU_PHY=FALSE \
$(LNX_CONFIG_OPTS)
ifeq ($(CONFIG_TARGET_SUBTARGET), "ipq807x")
MAKE_FLAGS+= CHIP_TYPE=HPPE
endif
ifeq ($(CONFIG_TARGET_SUBTARGET), "ipq60xx")
MAKE_FLAGS+= CHIP_TYPE=CPPE
endif
define Build/Compile
+$(MAKE) $(PKG_JOBS) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR) $(LNX_CONFIG_OPTS)
endef
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
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
$(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))