aboutsummaryrefslogtreecommitdiffstats
path: root/target/sdk/Makefile
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2022-07-16 01:34:44 +0200
committerChristian Lamparter <chunkeey@gmail.com>2022-07-17 14:19:21 +0200
commitb479db9062b721776be44b976961a1031c1344ea (patch)
tree4d04d5e25ebe76b3bc546c4466d8d39f2e625f3f /target/sdk/Makefile
parent488b25f5ac5028923f67e3beade92dab0c2591f1 (diff)
downloadupstream-b479db9062b721776be44b976961a1031c1344ea.tar.gz
upstream-b479db9062b721776be44b976961a1031c1344ea.tar.bz2
upstream-b479db9062b721776be44b976961a1031c1344ea.zip
sdk: add spidev-test to the bundle of userspace sources
moves and extends the current facilities, which have been added some time ago for the the usbip utility, to support more utilites that are shipped with the Linux kernel tree to the SDK. this allows to drop all the hand-waving and code for failed previous attempts to mitigate the SDK build failures. Fixes: bdaaf66e28bd ("utils/spidev_test: build package directly from Linux") Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/sdk/Makefile')
-rw-r--r--target/sdk/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index 0606621192..be7e1ebf51 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -82,6 +82,18 @@ KERNEL_FILES_BASE := \
KERNEL_FILES := $(patsubst $(TOPDIR)/%,%,$(wildcard $(addprefix $(LINUX_DIR)/,$(KERNEL_FILES_BASE))))
+# The kernel source hosts various userspace utilities sources.
+# These are packaged separately from the kernel and kernel modules.
+# The source has to be included here to be buildable by the SDK.
+#
+USERSPACE_UTILS_FILES := \
+ tools/build \
+ tools/scripts \
+ tools/usb/usbip \
+ tools/spi
+
+USERSPACE_FILES := $(patsubst $(TOPDIR)/%,%,$(wildcard $(addprefix $(LINUX_DIR)/,$(USERSPACE_UTILS_FILES))))
+
all: compile
$(BIN_DIR)/$(SDK_NAME).tar.xz: clean
@@ -100,8 +112,7 @@ $(BIN_DIR)/$(SDK_NAME).tar.xz: clean
$(SDK_DIRS) $(KERNEL_FILES) | \
$(TAR) -xf - -C $(SDK_BUILD_DIR)
- # Copy usbip sources, this is required for the usbip userspace packages to be buildable by the SDK.
- $(TAR) -cf - -C $(TOPDIR) $(KDIR_BASE)/tools/usb/usbip/ | \
+ $(TAR) -cf - -C $(TOPDIR) $(USERSPACE_FILES) | \
$(TAR) -xf - -C $(SDK_BUILD_DIR)
(cd $(SDK_BUILD_DIR); find $(STAGING_SUBDIR_HOST)/bin $(STAGING_SUBDIR_HOST)/usr/bin \