setup: skip non-phosphor machines
We already had logic to skip non-phosphor machines in the
'list' operation, but did not skip those machines when targeting
them. Those machines are almost certain to not operate as
expected and in some cases, such as EVB models, we have two
meta-layers associated with the machine. Skipping non-phosphor
machines ensures that the setup script picks the right
configuration and does not attempt to target a machine that won't
work.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: If68c27e2a8675405672df497827dde6e86147108
diff --git a/setup b/setup
index db9ede6..976e861 100755
--- a/setup
+++ b/setup
@@ -47,6 +47,15 @@
name=${cfg##*/}
name=${name%.conf}
tmpl=${cfg%/machine/*.conf}
+
+ # Skip any machines that don't support meta-phosphor.
+ if [ ! -e $tmpl/bblayers.conf.sample ]; then
+ continue
+ fi
+ if ! grep -q "##OEROOT##/meta-phosphor" $tmpl/bblayers.conf.sample; then
+ continue
+ fi
+
# If a target is specified, then check for a match,
# otherwise just list what we've discovered
if [ -n "$target" ]; then
@@ -62,9 +71,7 @@
fi
return
fi
- elif test -e $tmpl/bblayers.conf.sample && \
- grep -q "##OEROOT##/meta-phosphor" $tmpl/bblayers.conf.sample;
- then
+ else
echo "${name}"
fi
done