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.
This commit is contained in:
Erik Karlsson 2021-11-19 16:16:19 +01:00
parent 84ad0eec4e
commit b7e010be3b

View file

@ -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"