diff --git a/scripts/common.inc.sh b/scripts/common.inc.sh
index ac879ada467848f9687d400732fd95c7cc86c9b9..0c69b9f00cd055c1aa61585978ada382da8493b8 100644
--- a/scripts/common.inc.sh
+++ b/scripts/common.inc.sh
@@ -30,6 +30,10 @@ sysupgrade() {
 	:
 }
 
+no_opkg() {
+	:
+}
+
 
 unknown_devices="$DEVICES"
 
diff --git a/scripts/copy_output.sh b/scripts/copy_output.sh
index 94fa55fa4bbc0abded34e96eb7091b83a1c743ea..0917746d9f8bf0b08712ece33bb576ca580992c0 100755
--- a/scripts/copy_output.sh
+++ b/scripts/copy_output.sh
@@ -19,6 +19,8 @@ factory_suffix=
 sysupgrade_ext=
 sysupgrade_suffix=
 
+no_opkg=
+
 
 mkdir -p "${GLUON_IMAGEDIR}/factory" "${GLUON_IMAGEDIR}/sysupgrade"
 
@@ -146,10 +148,15 @@ sysupgrade() {
 	fi
 }
 
+no_opkg() {
+	no_opkg=1
+}
+
+
 . targets/"$1"; copy
 
 # Copy opkg repo
-if [ -z "$DEVICES" ]; then
+if [ -z "$no_opkg" -a -z "$DEVICES" ]; then
 	rm -f "$GLUON_PACKAGEDIR"/*/"$LEDE_BINDIR"/*
 	rmdir -p "$GLUON_PACKAGEDIR"/*/"$LEDE_BINDIR" 2>/dev/null || true
 	mkdir -p "${GLUON_PACKAGEDIR}/${PACKAGE_PREFIX}/${LEDE_BINDIR}"
diff --git a/scripts/target_config.inc.sh b/scripts/target_config.inc.sh
new file mode 100644
index 0000000000000000000000000000000000000000..b2d6fa8b7181de020ddac706d7c5201c85964aed
--- /dev/null
+++ b/scripts/target_config.inc.sh
@@ -0,0 +1,18 @@
+site_packages() {
+	MAKEFLAGS= make print PROFILE="$1" --no-print-directory -s -f - <<'END_MAKE'
+include $(GLUON_SITEDIR)/site.mk
+
+print:
+	echo '$(GLUON_$(PROFILE)_SITE_PACKAGES)'
+END_MAKE
+}
+
+
+. scripts/common.inc.sh
+
+
+no_opkg() {
+	config '# CONFIG_SIGNED_PACKAGES is not set'
+	config 'CONFIG_CLEAN_IPKG=y'
+	packages '-opkg'
+}
diff --git a/scripts/target_config.sh b/scripts/target_config.sh
index 525a2104b70fbcd443bd6111c19947ee2a705b88..ccda6c0d703ad3411b046d701c32b6a2186d9039 100755
--- a/scripts/target_config.sh
+++ b/scripts/target_config.sh
@@ -14,16 +14,6 @@ profile_packages=
 LEDE_CONFIG_TARGET="${LEDE_TARGET//-/_}"
 
 
-site_packages() {
-	MAKEFLAGS= make PROFILE="$1" --no-print-directory -s -f - <<'END_MAKE'
-include $(GLUON_SITEDIR)/site.mk
-
-all:
-	echo '$(GLUON_$(PROFILE)_SITE_PACKAGES)'
-END_MAKE
-}
-
-
 emit() {
 	[ "${output}" ] || return 0
 	want_device "${output}" || return 0
@@ -39,7 +29,7 @@ emit() {
 }
 
 
-. scripts/common.inc.sh
+. scripts/target_config.inc.sh
 
 config() {
 	echo "$1"
diff --git a/scripts/target_config_check.sh b/scripts/target_config_check.sh
index d7f8abf6bf6f932065fc4fe111663b497167286b..6ee02371c619fb6f2eafdefbe62158c9f9b12624 100755
--- a/scripts/target_config_check.sh
+++ b/scripts/target_config_check.sh
@@ -14,16 +14,6 @@ ret=0
 LEDE_CONFIG_TARGET="${LEDE_TARGET//-/_}"
 
 
-site_packages() {
-	MAKEFLAGS= make PROFILE="$1" --no-print-directory -s -f - <<'END_MAKE'
-include $(GLUON_SITEDIR)/site.mk
-
-all:
-	echo '$(GLUON_$(PROFILE)_SITE_PACKAGES)'
-END_MAKE
-}
-
-
 fail() {
 	local message="$1"
 
@@ -49,7 +39,7 @@ check_package() {
 }
 
 
-. scripts/common.inc.sh
+. scripts/target_config.inc.sh
 
 config() {
 	local config="$1"
diff --git a/targets/ar71xx-tiny b/targets/ar71xx-tiny
index 5f82acd420b34cc4042fc8b56d1d52f9c1046a14..d50be83df08bf4ede07a717f157891e5fa930d87 100644
--- a/targets/ar71xx-tiny
+++ b/targets/ar71xx-tiny
@@ -1,6 +1,5 @@
-config '# CONFIG_SIGNED_PACKAGES is not set'
-config 'CONFIG_CLEAN_IPKG=y'
-packages '-opkg' '-uboot-envtools' '-kmod-usb-core' '-kmod-usb-ohci' '-kmod-usb2' '-kmod-usb-ledtrig-usbport'
+no_opkg
+packages '-uboot-envtools' '-kmod-usb-core' '-kmod-usb-ohci' '-kmod-usb2' '-kmod-usb-ledtrig-usbport'
 
 
 # D-Link