bsp: autogenerate machine variable from filename

Because we nowadays only use bsp files as a wrapper for
OpenWrt targets, the machine variable got obsolete.
It's only use today is to locate the configuration folder for
a specific bsp.

Instead of explicitly defining this variable, it is now generated
from the filename of the bsp.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Fabian Bläse 2020-04-15 15:47:03 +02:00 committed by Adrian Schmutzler
parent a16800c683
commit 11ab5f15a7
6 changed files with 1 additions and 5 deletions

View File

@ -1,4 +1,3 @@
machine=ar71xx-tiny
chipset=ar71xx
subtarget=tiny
images=("openwrt-${chipset}-${subtarget}-archer-c25-v1-squashfs-*"

View File

@ -1,4 +1,3 @@
machine=ipq806x-generic
chipset=ipq806x
subtarget=generic

View File

@ -1,4 +1,3 @@
machine=mpc85xx-generic
chipset=mpc85xx
subtarget=generic

View File

@ -1,4 +1,3 @@
machine=mt7621-generic
chipset=ramips
subtarget=mt7621

View File

@ -1,4 +1,3 @@
machine=ramips-mt76x8
chipset=ramips
subtarget=mt76x8
images=("openwrt-${chipset}-${subtarget}-tplink_c50-v3-squashfs-*"

View File

@ -362,6 +362,7 @@ loadBSP()
{
echo "Working with $(/bin/ls -l selected_bsp | awk '{ print $11 }')"
. selected_bsp
machine=$(basename $(realpath selected_bsp) .bsp)
}
loadVariant()