summaryrefslogtreecommitdiff
path: root/setup
AgeCommit message (Collapse)AuthorFilesLines
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>