From 41d13742f6eb79a6b4372dce1d4afcfbe89e3805 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 11 Jun 2020 02:16:49 +0200
Subject: [PATCH] build: target_config_lib: do not build unused packages for
 targets without opkg (#2051)

Normally, we build all nonshared packages (which includes all kernel
modules) to generate an opkg feed for later package installations by
users. On targets without opkg, this just wastes time - disable it.

(cherry picked from commit b3edfd292a15ad34abb08236bdca231d7a6c3d52)
---
 scripts/target_config_lib.lua | 1 +
 targets/generic               | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua
index fc897d68b..346a18a7b 100644
--- a/scripts/target_config_lib.lua
+++ b/scripts/target_config_lib.lua
@@ -139,6 +139,7 @@ lib.check_devices()
 if not lib.opkg then
 	lib.config('SIGNED_PACKAGES', false)
 	lib.config('CLEAN_IPKG', true)
+	lib.config('ALL_NONSHARED', false)
 	lib.packages {'-opkg'}
 end
 
diff --git a/targets/generic b/targets/generic
index c7f284523..89aba6f25 100644
--- a/targets/generic
+++ b/targets/generic
@@ -40,7 +40,7 @@ config('PACKAGE_kmod-jool', false) -- fails to build
 config('BUSYBOX_CUSTOM', true)
 config('BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS', false)
 
-config('PACKAGE_ATH_DEBUG', true)
+try_config('PACKAGE_ATH_DEBUG', true)
 
 try_config('TARGET_SQUASHFS_BLOCK_SIZE', 256)
 
-- 
GitLab