summaryrefslogtreecommitdiff
path: root/setup
AgeCommit message (Collapse)AuthorFilesLines
9 dayssetup: Replace tabs with 4 spaces to keep consistencyRoy Yang1-11/+11
Change-Id: Ieadc4fcf922429df1bbb1e6fc347e9071493c6d4 Signed-off-by: Roy Yang <royyang@google.com>
2022-11-18setup: fix multi-machine layersPatrick Williams1-1/+1
When making the change required by Yocto to move configs into template subdirectories, the setup script wasn't updated in a way to handle the appropriate fix-up of the MACHINE variable in the `conf/local.conf`. Fixes bb789d5694b3696a9aa81d2cd37a1c7f39908ed8 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If90f1a3c4052c019ea88eeea7787bc2b252f6094
2022-09-09treewide: handle upstream TEMPLATECONF movePatrick Williams1-3/+3
The latest poky commit is requiring us to have all of our template configs in a subdirectory instead of directly in the `conf` directory. Without this we end up with errors during setup like: ``` Error: TEMPLATECONF value (which is .../openbmc/meta-facebook/meta-bletchley/conf) must point to meta-some-layer/conf/templates/template-name ``` Fix this by moving all of our template files into the 'default' template subdirectory (following the pattern of poky) and modifying `setup` as necessary to follow. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iecefde73d55acbb6bc63ae3d68c4311adaf327ae
2022-06-14setup: minor changes to machine listPatrick Williams1-4/+11
- Pass column results to `expand` to eliminate tabs. This enables easy copy/paste into markdown files for updating. - Filter out QEMU machines. We enable the QEMU machines from Yocto to be used for building but they're not actively supported. Remove them to reduce the noise in the tool output. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I53c3f039cb36c705aa614627aeb40b20471c499c
2022-04-07setup: enable all qemu* machinesPatrick Williams1-20/+25
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
2022-04-07setup: retab to soft-tabsPatrick Williams1-46/+46
Change-Id: Id9d3d4ff314c0635f9f5ad6fc81d5f19977f65c1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2022-01-28setup: handle invalid machine argument more gracefullyZev Weiss1-1/+1
If 'setup' is sourced with an invalid machine name, the error message is now sent to stderr and the failure is propagated back up the stack with a non-zero return value. Change-Id: I50ad40b58c1479ce9ee80ea52536075eddd09b4c Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
2021-11-04setup: fix shellcheck errorsPatrick Williams1-6/+6
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4c09e61294506659500f9760993dd4b8b6f22f23
2021-02-20setup: skip non-phosphor machinesPatrick Williams1-3/+10
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
2021-02-20setup: tolerate `which` failuresPatrick Williams1-2/+2
If this script is sourced in a shell that has something like `set -e`, then it fails if the column program does not exist because the `which columm` fails. Make a few changes to tolerate this and not fail: - Use $(...) rather than `...`. - Use `... || true` when appropriate to allow continuance. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9008778e8aee4747faa4decff74a2fb361a206ed
2021-01-28setup: support any level of machine conf depthMaksym Sloyko1-1/+13
Modify setup script to support any level of machine conf depth. Internally Google uses machines that sit yet another layer deep in the repository. Instead of adding yet another level of depth to the expansion, look for all configs using `find`, if it's available. If it's not, ball back to the old wildcard expansion. Signed-off-by: Maksym Sloyko <maxims@google.com> Change-Id: I1066fe5f6ece4454e3555ca97f75bd91d6da1dba
2020-05-01setup: support single-deep machine conf directoriesPatrick Williams1-1/+1
The witherspoon config was moved directly into meta-ibm, which caused the setup script to not be able to find it. Modify the setup script to also find machine config files in single-deep meta directories. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Icb24649c2e90cd29f72e8b661085b85cde6fcad5
2020-04-28setup: Use machine-specific build directories by defaultAndrew Jeffery1-1/+2
bitbake can struggle to cope with switching machine configurations in the one build directory, so default to using machine-specific build directories. It's recommended that the following be added to your .profile to provide a common location for bitbake data caches: ``` BB_ENV_EXTRAWHITE="SSTATE_DIR DL_DIR" SSTATE_DIR="/var/cache/bitbake/sstate-cache" DL_DIR="/var/cache/bitbake/downloads" export BB_ENV_EXTRAWHITE SSTATE_DIR DL_DIR ``` Change-Id: I70abb6a6bc901c42266f92c9f8c230b793b7a0f9 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2020-04-08setup: filter out unsupported machinesPatrick Williams1-1/+3
Due to the import of meta-layers from out of openbmc, some of which have their own machine configs, running `source setup` reveils a long list of machines many of which are unsupported. Any supported machine should be using the `meta-phosphor` layer in some way, so look for that in the `bblayers.conf.sample` file. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3ee4aa33a643d5f7faf0c6e1bd6f3d9c84cddab8
2020-01-21setup: support zshPatrick Williams1-2/+1
zsh populates $0 even when sourcing a script. This caused sourcing this script to think that it was being executed and it `exit 1`d the running shell. Since no sane distribution would ever set /bin/sh to zsh, the presence of $ZSH_NAME implies that the script is being sourced. Tested with both bash and zsh in both modes of operation. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2843d96a7fdaa46f9ee6edb9031ca9c16ca3bd98
2019-08-08Make `setup` show available targets in columnsAlexander Amelkin1-1/+8
The list of targets is getting longer and tends to not fit into one screen when displayed in one column. Filter it through `column` tool if available. If not available, then fall back to the old representation. Change-Id: I1e827d0835608d2e37ca58705e77a14b0667b170 Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
2019-06-18setup: Add the missing quotesAlexander Filippov1-1/+1
Fixes: d70e7e81bfd44553f425f (setup: Use config name instead layer name) Change-Id: Iee4a49f31bfbe137532f9be30277857d408cf7d5 Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
2019-06-11setup: Use config name instead layer nameAlexander Filippov1-16/+20
Allows user to pass a config name instead of a layer name. This can be extremely useful for layers, which contain several configs. E.g. to build firmware for swift you can call: ``` . setup swift bitbake obmc-phosphor-image ``` Change-Id: I397a53b0cc135f622e4b3dc712ff93f6a0c10b8a Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
2018-09-28setup: Allow user to pass in the build directory nameAmithash Prasad1-2/+7
This can be extremely useful if one is working on multiple platforms simultaneously Change-Id: I316ef106d972413221ab2691dfc727f8f9bcffa8 Signed-off-by: Amithash Prasad <amithash@fb.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2018-08-23[Subtree] Bring openbmc machines to top levelDave Cobbley1-17/+15
The new subtree model brings the subtrees up from the openbmc-machines layer. Change-Id: I58a03ae1be374bc79ae1438e65e888375d12d0c0 Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2018-04-26Refix 68a967d: setup: Fix subshell spawningAlexander Amelkin1-2/+19
* Fix subshell spawning due to `sort`. Subshell spawning effectively prevented the script from working. Now `sort` is only invoked for `setup` without arguments; * Add a license/copyright header Change-Id: I643a91cae14e5ddb8e6efe154d325baaab3d0100 Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
2018-02-14Add setup script for easy openbmc env setupAlexander Amelkin1-0/+43
Before this commit it was required to specify a long TEMPLATECONF string before running openbmc-env if one wanted to build a non-qemu image. This commit adds a simple setup script that can be sourced like the following to setup the environment for any machine (e.g., for palmetto): . setup palmetto Change-Id: Id3fa73dca9b8ce9347cf38e41fe8662c03ea84e3 Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>