summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2022-03-30 18:32:22 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-04-07 23:36:34 +0300
commitcbcd6f4c549b9e9119545a17a48191930841739d (patch)
tree7a1233c6ba7610b07c5d8b7b1ea194c44369a1fd /setup
parentbe970b1c78cea00a1f93a5ce002eb6ca17fedd45 (diff)
downloadopenbmc-cbcd6f4c549b9e9119545a17a48191930841739d.tar.xz
setup: enable all qemu* machines
The existing support for qemuarm wasn't working. Sometimes, when submitting recipes to upstream, it is useful to test image builds against various qemu* machine models. Enhance the setup script so that we can build any of the qemu* machines that Poky supports and treat them like a generic meta-phosphor machine. Tested: Used `setup qemumips` and was able to `bitbake phosphor-image` successfully. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ide141c879dd674fe3771984f7fd41006a64ce54f
Diffstat (limited to 'setup')
-rwxr-xr-xsetup45
1 files changed, 25 insertions, 20 deletions
diff --git a/setup b/setup
index 647022fb5e..5655bfa817 100755
--- a/setup
+++ b/setup
@@ -33,27 +33,34 @@ machine() {
local cfg name tmpl
local configs
- # zsh requires wordsplit so that variable expansion behaves like bash
- if [ -n "$ZSH_NAME" ]; then
- setopt local_options shwordsplit
- fi
- if which find > /dev/null 2>&1; then
- configs=$(find meta-* -path "*/conf/machine/*.conf")
- else
- configs=$(ls -1 meta-*/meta-*/conf/machine/*.conf meta-*/conf/machine/*.conf)
- fi
+ # zsh requires wordsplit so that variable expansion behaves like bash
+ if [ -n "$ZSH_NAME" ]; then
+ setopt local_options shwordsplit
+ fi
+ if which find > /dev/null 2>&1; then
+ configs="$(find meta-* -path "*/conf/machine/*.conf")"
+ else
+ configs=$(ls -1 meta-*/meta-*/conf/machine/*.conf meta-*/conf/machine/*.conf)
+ fi
+ # Add qemu machines.
+ configs="$configs $(ls -1 poky/meta/conf/machine/qemu*.conf)"
for cfg in $configs; do
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
+ if [ "$tmpl" = "poky/meta/conf" ]; then
+ # This is a QEMU machine, use phosphor defaults.
+ tmpl="meta-phosphor/conf"
+ else
+ # 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
fi
# If a target is specified, then check for a match,
@@ -80,11 +87,9 @@ machine() {
}
if [ -z "$1" ]; then
- echo Target machine must be specified. Use one of:
- echo
- (echo qemuarm; machine) | sort | $COLUMN
-elif [ "$1" = "qemuarm" ]; then
- source openbmc-env
+ echo Target machine must be specified. Use one of:
+ echo
+ machine | sort | $COLUMN
else
bld_dir=$2
if [ -z "$2" ]; then