summaryrefslogtreecommitdiffstats
path: root/scripts/oe-setup-builddir
AgeCommit message (Collapse)Author
2024-02-19scripts/oe-setup-builddir: add support for configuration summariesAlexander Kanavin
They are handled exactly same as conf-notes.txt. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10scripts/oe-setup-builddir: copy conf-notes.txt to build dirStéphane Veyret
Since commit 569d4cd325, if one is using a custom template directory containing a conf-notes.txt, this file is only displayed when creating a new environment. When entering an already existing environment, only the default poky conf-notes.txt is displayed. This patch copies the conf-notes.txt to display to the build directory, so that the good file is shown, even when templateconf.cfg is not used. Signed-off-by: Stéphane Veyret <sveyret@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-29scripts/oe-setup-builddir: do not read TEMPLATECONF from templateconf.cfgAlexander Kanavin
Also, write to it only if it does not already exist. As discussed here[1], reading from templateconf.cfg serves no purpose: it exists only if the build directory has already been initialized, and so the scripts will not change anything in the build directory anyway. My adjustment is to keep the file however; it is useful as a pointer to the original template, which can be utilized by config management tools in the future. [1] https://lists.openembedded.org/g/openembedded-architecture/topic/template_handling_in_oe_core/93968540 Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-09oe-setup-builddir: do not suggest local.conf as a source of examplesAlexander Kanavin
This holds true for the default core/poky template, but not anything else. Eventually there will be fragments and associated tooling. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-08oe-setup-builddir: Always update templateconf.cfgPeter Kjellerstedt
The intent of the templateconf.cfg file is to cache the value of $TEMPLATECONF. To do this, it needs to be updated in case TEMPLATECONF is manually specified. Before, the following commands: TEMPLATECONF=foo . oe-init-build-env TEMPLATECONF=bar . oe-init-build-env . oe-init-build-env would cause the templates in foo to be used for the last source of oe-init-build-env, while afterwards, bar is used as expected. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-08oe-setup-builddir: Keep templateconf.cfg relative if $TEMPLATECONF isPeter Kjellerstedt
Before commit 7b96dc80 (scripts/oe-setup-builddir: write to conf/templateconf.cfg after the build is set up), the path written to templateconf.cfg was relative if $TEMPLATECONF was relative, but afterwards it became absolute. Restore the original behavior of saving the relative path to templateconf.cfg. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-08oe-setup-builddir: Avoid shellcheck warningsPeter Kjellerstedt
This avoid the following warnings: * SC2086: Double quote to prevent globbing and word splitting. * SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. * SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. * SC2236: Use -n instead of ! -z. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-08oe-setup-builddir: Simplify error handlingPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-08oe-setup-builddir: Correct when validation of the templates dir is runPeter Kjellerstedt
The validation of the templates directory is supposed to be run as long as $TEMPLATECONF is defined, but it was only done if the directory did not exist. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-03scripts/oe-setup-builddir: make environment variable the highest priority ↵Alexander Kanavin
source for TEMPLATECONF This sets the following order: 1. TEMPLATECONF set in the unix environment (for example as a prefix to '. oe-init-build-env'). 2. If empty then $BUILDDIR/conf/templateconf.cfg 3. If absent then $OEROOT/.templateconf (oe-init-build-env sets OEROOT to where it is, which is poky or oe-core). I believe this is more logical and consistent with common practice; it also avoids situations where the user is stuck with cryptic errors because templateconf.cfg contains something invalid and that something cannot be overridden from command line. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-03scripts/oe-setup-builddir: write to conf/templateconf.cfg after the build is ↵Alexander Kanavin
set up This was done before any of the sanity checks or actual setup, which resulted in templateconf.cfg always getting written out, whether it would be valid or not, and the user becoming stuck with it. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-02scripts/oe-setup-builddir: migrate build/conf/templateconf.cfg to new ↵Alexander Kanavin
template locations This is done only for default oe-core/poky templates; for anything else the locations themselves need to be migrated first, and there is no way to tell where they would be. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2022-09-01scripts/oe-setup-builddir: add a check that TEMPLATECONF is validAlexander Kanavin
specifically that ../../layer.conf exists, and that second-from-last component in the path is 'templates'. This requires tweaking template.conf creation in eSDK bbclass, as we need to ensure that the path in it is valid, and exists (which may not be the case if the SDK is poky-based). Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-01meta/conf: move default configuration templates into meta/conf/templates/defaultAlexander Kanavin
This sets the ground for standardizing (and enforcing) the location of configuration templates: let's start with the default one. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-02scripts/oe-setup-builddir: make it known where configurations come fromAlexander Kanavin
"with some default values" isn't clear; if the user wants to change or inspect the default values and their history, we should help them find where they are. This becomes especially important when using template configs other than poky's. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2022-04-05oe-init-build-env: add quotes around variables to prevent word splittingAbongwa Amahnui Bonalais
Used shellcheck to add quotes to the variables. This is to make sure that directories with names that have space between, such as "Desktop/projects/test repo/poky" will not be considered as 2 separate words. With this modification, running the command "source oe-init-build-env" will not give the error "bash: oe-init-build-env: No such file or directory" Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02scripts: Various typo/grammar/punctuation fixesRobert P. J. Day
Among other things, fix misspellings of: - absolute - deprecated - suitable - handle and a bunch of other things. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-25oe-setup-builddir: update YP docs and OE URLsMichael Opdenacker
This updates the link to the YP docs and proposes to access the OE website through https Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23meta: move some text from oe-setup-builddir to conf-notes.txtMing Liu
This allows the end users to be able to override the entire notes showing on the shell console. For instance, Our company uses a external conf-notes.txt, and we run bitbake with some extra variables, looks like: F=xxx D=xxx M=xxx bitbake <target>, so we want to show exactly these texts on the shell console, that's why we need this change. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-13oe-setup-builddir: create usage outputEd Bartosh
Created usage output for oe-setup-builddir script. [YOCTO #10751] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-06oe-setup-builddir: fix TEMPLATECONF error messagePaul Eggleton
This directory shouldn't contain local.conf and bblayers.conf - just templates for them; except it doesn't have to contain those, it just has to exist to pass this test. Change the error message accordingly, and mention TEMPLATECONF so that the user has at least some context. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-09oe-setup-builddir: tidy up local.conf and bblayers.conf commentaryAndre McCurdy
Remove obsolete reference to enabling parallel build via local.conf. Unify wording used to explain that local.conf and bblayers.conf have been created based on defaults. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12scripts: Move BUILDDIR chmod fix after checks in oe-setup-builddirAlex Franco
Makes more sense to have this fix after checking BUILDDIR exists, is a directory and is writable. [YOCTO #7669] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-02Fix recursive mode -st on BUILDDIR setupAlex Franco
Removing recursive option from chmod -st on BUILDDIR as it would take very long on existing build directories [YOCTO 7669] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-31Fix mode +st on TMPDIR when creating itAlex Franco
A sanity check fails when TMPDIR has setuid, setgid set. It was proposed to fix this on TMPDIR creation instead of failing with a sanity test only. This patch handles removal of those special bits (and additonally, the sticky bit) from BUILDDIR and TMPDIR when these directories are created. [YOCTO #7669] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13oe-init-build-env: fix for build dirs that have spaces in their pathJoshua Lock
Enclose expansions of BUILDDIR in quotes in order to correctly handle paths which include spaces. Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16oe-setup-builddir: output message cleanupBenjamin Esquivel
Moved a Yoctoproject documentation banner to the end of the first-time run messages section [YOCTO #7368] Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-03-12oe-setup-builddir: small reworkMatthieu Crapet
Changes: - drop useless subshell creation in test: if ! (test -r "$BUILDDIR/conf/local.conf"); then$ - replace "source" builtin by "." (bashsism) - fix indentation 4 spaces (drop some tabs too) - fix return => exit (return is not allowed in main) - drop "sed -i" (doesn't exist in BSD sed) - for homogeneity, always use [ ] (instead of test) - replace old [ "x" = "x$VAR" ] by [ -z "$VAR" ] Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11scripts/oe-setup-builddir: Keep track of TEMPLATECONF settingGary Thomas
Keeping track of the TEMPLATECONF variable in the build tree will let this script produce the same output when listing 'conf-notes.txt' every time the script is run, regardless of whether or not TEMPLATECONF has been provided by the user. Note that the default value for TEMPLATECONF now comes from an easily customizable file $OEROOT/.templateconf Signed-off-by: Gary Thomas <gary@mlbassoc.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-13oe-setup-builddir: substitute ##OEROOT## when using templatesRoss Burton
oe-setup-builddir substitutes ##COREBASE## which seems like it should have the same value as the variable ${COREBASE}. In reality it doesn't as ##COREBASE## is substituted with the value of $OEROOT (the location of the oe-init-build-env script), whereas ${COREBASE} is set by oe-core to the parent directory of meta/. If oe-core's meta/ isn't a top-level directory then ##COREBASE## and ${COREBASE} have different values, which can lead to confusion. To resolve this, deprecate (but still substitute) ##COREBASE## and substitute ##OEROOT# for $OEROOT. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-05oe-setup-builddir: Allow $OECORENOTESCONF to not existPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <pkj@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29oe-setup-builddir: Possibility to customize text.Anders Roxell
Possibility to customize the text that is presented to the user when they execute the script. Signed-off-by: Anders Roxell <anders.roxell@enea.com> Tested-by: Maxin B. John <maxin.john@enea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-26Various typoes fixed, all comments or output strings.Robert P. J. Day
Typoes fixed: "enviroment", "editted", "spliting", "scheulder". Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-14scripts: Rename "adt-install" to "adt-installer" in user help.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-29scripts/oe-setup-builddir: Fix Yocto documentation links and add a couple of ↵Richard Purdie
other example targets This takes into account some feedback from Yocto's tech writer as mentioned in the bugzilla. [YOCTO #1182] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-16scripts/oe-setup-builddir: Add missing .sample extensions and default to ↵Richard Purdie
meta/conf for sample files Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-10scripts/oe-setup-builddir: fix typoOtavio Salvador
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2011-04-21Further cleanup of various poky referencesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-20poky-setup-builddir: Rename to oe-setup-builddir and clean up POKY variable ↵Richard Purdie
references Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>