From b7e010be3b4eb9920e5e77d45835e0d1359c726e Mon Sep 17 00:00:00 2001 From: Erik Karlsson Date: Fri, 19 Nov 2021 16:16:19 +0100 Subject: [PATCH] gryphon-led-module: use the right toolchain on Broadcom targets Userspace toolchain was being used to build the kernel module which although not correct happened to work on 32-bit kernel but obviously does not work on 64-bit kernel with 32-bit userspace. Ideally, it should but enough to set KERNEL_CROSS if Build/Compile is updated to use KERNEL_CROSS instead of TARGET_CROSS, but not changing TARGET_CROSS breaks scripts/strip-kmod.sh which for some reason uses TARGET_CROSS rather than KERNEL_CROSS. --- gryphon-led-module/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gryphon-led-module/Makefile b/gryphon-led-module/Makefile index bd4cad7a3..cf0b8be58 100644 --- a/gryphon-led-module/Makefile +++ b/gryphon-led-module/Makefile @@ -45,12 +45,12 @@ 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.183 - KERNEL_CROSS:=$(CONFIG_BCM_TOOLCHAIN)/bin/$(CONFIG_BCM_TOOLTUPLE) + TARGET_CROSS:=$(CONFIG_BCM_TOOLCHAIN)/bin/$(CONFIG_BCM_TOOLTUPLE) ifeq ($(CONFIG_BCM_CHIP_ID),$(filter $(CONFIG_BCM_CHIP_ID),"63158" "6856" "6858")) # These targets use a 64-bit kernel LINUX_KARCH:=arm64 - KERNEL_CROSS:=/opt/toolchains/crosstools-aarch64-gcc-9.2-linux-4.19-glibc-2.30-binutils-2.32/bin/aarch64-buildroot-linux-gnu- + TARGET_CROSS:=/opt/toolchains/crosstools-aarch64-gcc-9.2-linux-4.19-glibc-2.30-binutils-2.32/bin/aarch64-buildroot-linux-gnu- endif # For some reason, Broadcom's kernel does not set the include paths correctly when compiling out-of-tree modules EXTRA_KCPPFLAGS:="-I $(LINUX_DIR)/../bcmkernel/include -I $(LINUX_DIR)/arch/arm/mach-bcm963xx/include"