From e4acdd529b70bed447dd3c85e7d93bb5c053130b Mon Sep 17 00:00:00 2001 From: Andreas Gnau Date: Thu, 15 Sep 2022 16:46:32 +0200 Subject: [PATCH] gryphon-led-module: Do not hardcode BCM SDK kernel version Signed-off-by: Andreas Gnau --- gryphon-led-module/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gryphon-led-module/Makefile b/gryphon-led-module/Makefile index c5807825c..fcd574083 100644 --- a/gryphon-led-module/Makefile +++ b/gryphon-led-module/Makefile @@ -44,7 +44,15 @@ MODULE_INCLUDE=-I$(PKG_BUILD_DIR) ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y) LINUX_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.19 - MODULES_SUBDIR:=lib/modules/4.19.225 + # This assumes that the MODULES_SUBDIR set by OpenWrt is of the form + # lib/modules/4.19.235-abcdef where 4.19.235 is the version of our fake bcmlinux kernel + # and abcdef the git-commit. + # The kernel compiled by the Broadcom SDK has a uname -r of 4.19.235, i.e. without the git-commit. + # The assignment below removes the part after the - which puts modules in the right directory as + # long as the bcmlinux version matches the kernel version in the BCM SDK. + # So, this will only stop working in the time window where the BCM SDK has been updated + # but bcmlinux has not yet been updated. + MODULES_SUBDIR:=$(firstword $(subst -, ,$(MODULES_SUBDIR))) TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_PREFIX)- ifeq ($(CONFIG_BCM_CHIP_ID),$(filter $(CONFIG_BCM_CHIP_ID),"63158" "6856" "6858"))