diff --git a/scripts/common.inc.sh b/scripts/common.inc.sh index ac879ada..0c69b9f0 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 94fa55fa..0917746d 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 00000000..b2d6fa8b --- /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 525a2104..ccda6c0d 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 d7f8abf6..6ee02371 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 5f82acd4..d50be83d 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