Skip to content
Snippets Groups Projects
Commit 3424be90 authored by Andreas Gnau's avatar Andreas Gnau :speech_balloon:
Browse files

bcmkernel: Put libs in separate directory


Install libraries into separate directory (/usr)/lib/broadcom. This is
to enable a clean separation between BCM-SDK-built libraries and
OpenWrt-built built libraries. More importantly, it avoids binary
compatibility issues between the two worlds.

As a side-effect is will also enable future enhancements such as
hardfloat or 64-bit user space on the IOWRT side, which is not supported
in the BCM SDK.

Set the RUNPATH of all the binaries in the OpenWrt Makefile after
stripping, because OpenWrt will remove the RUNPATH during stripping,
otherwise..

Signed-off-by: default avatarAndreas Gnau <andreas.gnau@iopsys.eu>
parent 34f0b0c4
No related branches found
No related tags found
1 merge request!69Install BCM libraries to separate dir (needed for OpenWrt 23.03)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Primary/common bcmkernel makefile for all versions of Broadcom SDKs # Primary/common bcmkernel makefile for all versions of Broadcom SDKs
# #
PKG_SOURCE_VERSION := c14e656a03c2d3ff5f58b51ba0ffa2244138fcbc PKG_SOURCE_VERSION := bd547ddcecdf8b560ae355598200bfe9c14760cd
BCM_KERNEL_VERSION := 4.19.235 BCM_KERNEL_VERSION := 4.19.235
BRCM_SDK_VERSION := 504041 BRCM_SDK_VERSION := 504041
...@@ -112,6 +112,8 @@ define CheckDependencies ...@@ -112,6 +112,8 @@ define CheckDependencies
endef endef
# OpenWRT variables # 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)" MAKE_FLAGS += KDIR="$(KDIR)"
# bcmkernel variables # bcmkernel variables
......
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment