buildscript: Do not use target-dependent build directory

So far, building the firmware happens in parallel subdirectories
of "build", one for each subtarget. However, OpenWrt itself is
capable of hosting several target builds in its directory, so
there is no need for this extra separation.

This patch thus build all targets/subtargets directly in the
"build" folder.

Since most of the time during build is spent for the toolchain,
this will also significantly boost build time if more than one
target is used.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
Adrian Schmutzler 2019-10-07 14:28:05 +02:00 committed by Fabian Bläse
parent 6724aaedee
commit d43ef0a6a0
4 changed files with 2 additions and 4 deletions

View File

@ -1,7 +1,6 @@
machine=ar71xx
chipset=ar71xx
subtarget=tiny
target=$builddir/$machine
images=("openwrt-${chipset}-${subtarget}-archer-c25-v1-squashfs-sysupgrade.bin"
"openwrt-${chipset}-${subtarget}-archer-c60-v1-squashfs-sysupgrade.bin"
"openwrt-${chipset}-${subtarget}-archer-c7-v2-squashfs-sysupgrade.bin"

View File

@ -1,7 +1,6 @@
machine=mt7621
chipset=ramips
subtarget=mt7621
target=$builddir/$machine
images=(
"openwrt-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.tar"

View File

@ -1,7 +1,6 @@
machine=wdr4900
chipset=mpc85xx
subtarget=generic
target=$builddir/$machine
images=(
"openwrt-${chipset}-${subtarget}-tl-wdr4900-v1-squashfs-sysupgrade.bin"

View File

@ -169,7 +169,7 @@ prepare() {
#saves ~200MB for each build
test -d ./src/dl || mkdir ./src/dl
ln -s ../../src/dl "$target"/dl
ln -s ../src/dl "$target"/dl
}
prebuild() {
@ -347,6 +347,7 @@ loadBSP()
{
echo "Working with $(/bin/ls -l selected_bsp | awk '{ print $11 }')"
. selected_bsp
target=$builddir
}
loadVariant()