diff --git a/bcmkernel/Makefile b/bcmkernel/Makefile index f1f048aaf22d9b75ad40582b6b18767ededad245..2d6cea7ec83aa307c75cdadab982076f1b7db508 100644 --- a/bcmkernel/Makefile +++ b/bcmkernel/Makefile @@ -2,7 +2,7 @@ # Primary/common bcmkernel makefile for all versions of Broadcom SDKs # -PKG_SOURCE_VERSION := c14e656a03c2d3ff5f58b51ba0ffa2244138fcbc +PKG_SOURCE_VERSION := bd547ddcecdf8b560ae355598200bfe9c14760cd BCM_KERNEL_VERSION := 4.19.235 BRCM_SDK_VERSION := 504041 @@ -112,6 +112,8 @@ define CheckDependencies endef # OpenWRT variables +# Override OpenWrt stripping: Run OpenWrt stripping but right after set DT_RUNPATH to account load libs from (/usr)/lib/broadcom +RSTRIP:=$(subst $(SCRIPT_DIR)/rstrip.sh,RSTRIP_SH=$(SCRIPT_DIR)/rstrip.sh $(TOPDIR)/package/feeds/broadcom/bcmkernel/scripts/rstrip_and_set_rpath.sh,$(RSTRIP)) MAKE_FLAGS += KDIR="$(KDIR)" # bcmkernel variables diff --git a/bcmkernel/scripts/rstrip_and_set_rpath.sh b/bcmkernel/scripts/rstrip_and_set_rpath.sh new file mode 100755 index 0000000000000000000000000000000000000000..2a1b51c727d8b624ed46e885dd1528465f404793 --- /dev/null +++ b/bcmkernel/scripts/rstrip_and_set_rpath.sh @@ -0,0 +1,15 @@ +#!/bin/sh -eux +"$RSTRIP_SH" "$@" +# TODO: find out why broadcom wl utility does not run after patching the RUNPATH. Maybe patchelf bug? +find -D exec \ + "$@" \ + -type f \ + -not -name 'ld-linux*.so*' \ + -not -name '*.sh' \ + -not -name wl.brcm \ + '(' \ + -name '*.so' \ + -or \ + -executable \ + ')' \ + -execdir "$PATCHELF" --no-default-lib --add-rpath '/${LIB}/broadcom:/usr/${LIB}/broadcom' '{}' ';' || true