From patchwork Wed Apr 15 13:47:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [2/2] bsp: autogenerate machine variable from filename From: Fabian Blaese X-Patchwork-Id: 1339 Message-Id: <20200415134703.1033234-2-fabian@blaese.de> To: franken-dev@freifunk.net Date: Wed, 15 Apr 2020 15:47:03 +0200 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 Reviewed-by: Adrian Schmutzler --- bsp/ar71xx-tiny.bsp | 1 - bsp/ipq806x-generic.bsp | 1 - bsp/mpc85xx-generic.bsp | 1 - bsp/ramips-mt7621.bsp | 1 - bsp/ramips-mt76x8.bsp | 1 - buildscript | 1 + 6 files changed, 1 insertion(+), 5 deletions(-) diff --git a/bsp/ar71xx-tiny.bsp b/bsp/ar71xx-tiny.bsp index 0cf426c..aa2c86e 100644 --- a/bsp/ar71xx-tiny.bsp +++ b/bsp/ar71xx-tiny.bsp @@ -1,4 +1,3 @@ -machine=ar71xx-tiny chipset=ar71xx subtarget=tiny images=("openwrt-${chipset}-${subtarget}-archer-c25-v1-squashfs-*" diff --git a/bsp/ipq806x-generic.bsp b/bsp/ipq806x-generic.bsp index 405f8d0..b626af2 100644 --- a/bsp/ipq806x-generic.bsp +++ b/bsp/ipq806x-generic.bsp @@ -1,4 +1,3 @@ -machine=ipq806x-generic chipset=ipq806x subtarget=generic diff --git a/bsp/mpc85xx-generic.bsp b/bsp/mpc85xx-generic.bsp index 1d3658f..ce642c1 100644 --- a/bsp/mpc85xx-generic.bsp +++ b/bsp/mpc85xx-generic.bsp @@ -1,4 +1,3 @@ -machine=mpc85xx-generic chipset=mpc85xx subtarget=generic diff --git a/bsp/ramips-mt7621.bsp b/bsp/ramips-mt7621.bsp index 8a5c69e..7cff37d 100644 --- a/bsp/ramips-mt7621.bsp +++ b/bsp/ramips-mt7621.bsp @@ -1,4 +1,3 @@ -machine=mt7621-generic chipset=ramips subtarget=mt7621 diff --git a/bsp/ramips-mt76x8.bsp b/bsp/ramips-mt76x8.bsp index 53bf3d1..f8e9065 100644 --- a/bsp/ramips-mt76x8.bsp +++ b/bsp/ramips-mt76x8.bsp @@ -1,4 +1,3 @@ -machine=ramips-mt76x8 chipset=ramips subtarget=mt76x8 images=("openwrt-${chipset}-${subtarget}-tplink_c50-v3-squashfs-sysupgrade.bin" diff --git a/buildscript b/buildscript index 3aa262d..386d06c 100755 --- a/buildscript +++ b/buildscript @@ -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()