Skip to content

Commit

Permalink
build: don't copy packages to output directory for targets without opkg
Browse files Browse the repository at this point in the history
  • Loading branch information
neocturne committed May 15, 2017
1 parent a7ea424 commit ad91ab1
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 26 deletions.
4 changes: 4 additions & 0 deletions scripts/common.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ sysupgrade() {
:
}

no_opkg() {
:
}


unknown_devices="$DEVICES"

Expand Down
9 changes: 8 additions & 1 deletion scripts/copy_output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ factory_suffix=
sysupgrade_ext=
sysupgrade_suffix=

no_opkg=


mkdir -p "${GLUON_IMAGEDIR}/factory" "${GLUON_IMAGEDIR}/sysupgrade"

Expand Down Expand Up @@ -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}"
Expand Down
18 changes: 18 additions & 0 deletions scripts/target_config.inc.sh
Original file line number Diff line number Diff line change
@@ -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'
}
12 changes: 1 addition & 11 deletions scripts/target_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,7 +29,7 @@ emit() {
}


. scripts/common.inc.sh
. scripts/target_config.inc.sh

config() {
echo "$1"
Expand Down
12 changes: 1 addition & 11 deletions scripts/target_config_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -49,7 +39,7 @@ check_package() {
}


. scripts/common.inc.sh
. scripts/target_config.inc.sh

config() {
local config="$1"
Expand Down
5 changes: 2 additions & 3 deletions targets/ar71xx-tiny
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ad91ab1

Please sign in to comment.