| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
This includes a simple test which creates a layer setup using
custom references, and subsequently modifies the resulting layers
setup using a different custom reference.
(From OE-Core rev: 36701e78cf239261ad21cf58db2934c3c8a5e3e6)
Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
builds
This is another piece of the puzzle in setting up builds from nothing
without having to write custom scripts or use external tools.
After layers have been fetched and placed into their respective locations by
oe-setup-layers, one would surely want to proceed to the actual build, and here's how:
1. Without arguments the tool reads available layers
from .oe-layers.json file (written out by oe-setup-layers or a fallback under scripts/),
prints what templates it has found, and asks the user to select one, as seen below.
This will land the user in a shell ready to run bitbake:
=============================================
alex@Zen2:/srv/work/alex$ ./setup-build
Available build configurations:
1. alex-configuration-gadget
This configuration will set up a build for the purposes of supporting gadget.
2. alex-configuration-gizmo
This configuration allows building a gizmo.
3. poky-default
This is the default build configuration for the Poky reference distribution.
Re-run with 'list -v' to see additional information.
Please choose a configuration by its number: 1
Running: TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/configuration-gadget . /srv/work/alex/poky/oe-init-build-env /srv/work/alex/build-alex-configuration-gadget && /bin/bash
You had no conf/local.conf file. This configuration file has therefore been
created for you from /srv/work/alex/meta-alex/conf/templates/configuration-gadget/local.conf.sample
You may wish to edit it to, for example, select a different MACHINE (target
hardware).
You had no conf/bblayers.conf file. This configuration file has therefore been
created for you from /srv/work/alex/meta-alex/conf/templates/configuration-gadget/bblayers.conf.sample
To add additional metadata layers into your configuration please add entries
to conf/bblayers.conf.
The Yocto Project has extensive documentation about OE including a reference
manual which can be found at:
https://docs.yoctoproject.org
For more information about OpenEmbedded see the website:
https://www.openembedded.org/
This configuration will set up a build for the purposes of supporting gadget.
Please refer to meta-alex/README for additional details and available bitbake targets.
==============================================
2. It is also possible to list available configurations without selecting one using
'setup-build list' or to select and setup one non-interactively with 'setup-build setup'.
3. The full set of command line options is:
$ ./setup-build --help
usage: setup-build [-h] [--layerlist LAYERLIST] {list,setup} ...
A script that discovers available build configurations and sets up a build environment based on one of them. Run without arguments to choose one interactively.
positional arguments:
{list,setup}
list List available configurations
setup Set up a build environment and open a shell session with it, ready to run builds.
optional arguments:
-h, --help show this help message and exit
--layerlist LAYERLIST
Where to look for available layers (as written out by setup-layers script) (default is /srv/work/alex/.oe-layers.json).
$ ./setup-build list --help
usage: setup-build list [-h] [-v]
optional arguments:
-h, --help show this help message and exit
-v Print detailed information and usage notes for each available build configuration.
$ ./setup-build setup --help
usage: setup-build setup [-h] [-c configuration_name] [-b build_path] [--no-shell]
optional arguments:
-h, --help show this help message and exit
-c configuration_name
Use a build configuration configuration_name to set up a build environment (run this script with 'list' to see what is available)
-b build_path Set up a build directory in build_path (run this script with 'list -v' to see where it would be by default)
--no-shell Create a build directory but do not start a shell session with the build environment from it.
4. There's an an added hint in oe-setup-layers about how to proceed (as it is really not user-friendly
to fetch the layer repos successfully and then exit without a word), and a symlink to the script
from the top level layer checkout directory.
5. The selftest to check layer setup has been adjusted to run a basic check for template
discovery and build setup. The revision of poky to be cloned has been bumped to 4.1,
as that's the first version with a default template in a standard location.
(From OE-Core rev: 1360b64e88cda7dddfb0eca6a64f70c13dafb890)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
| |
(From OE-Core rev: 7117e3d08570202c79d618d4fb6a67895b1df564)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is beneficial for setting up builds, as this list can be used
to determine reliably where the actual layers are, and discover
available configurations from them.
Also adjust the selftest to check the presence of that file rather
than any specific layer in a hardcoded location.
Sample output (paths are written relative to the file for relocatability
and ease of reading):
{
"layers": [
"meta-openembedded/meta-filesystems",
"meta-openembedded/meta-gnome",
"meta-openembedded/meta-initramfs",
"meta-openembedded/meta-multimedia",
"meta-openembedded/meta-networking",
"meta-openembedded/meta-oe",
"meta-openembedded/meta-perl",
"meta-openembedded/meta-python",
"meta-openembedded/meta-webserver",
"meta-openembedded/meta-xfce",
"poky/bitbake/lib/layerindexlib/tests/testdata/layer1",
"poky/bitbake/lib/layerindexlib/tests/testdata/layer2",
"poky/bitbake/lib/layerindexlib/tests/testdata/layer3",
"poky/bitbake/lib/layerindexlib/tests/testdata/layer4",
"poky/meta-poky",
"poky/meta-selftest",
"poky/meta-skeleton",
"poky/meta-yocto-bsp",
"poky/meta"
],
"version": "1.0"
}
(From OE-Core rev: 82743f4f767f8016564be0d9d6c0d8fe9e067740)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python 3 interprets string literals as Unicode strings, and therefore
\s is treated as an escaped Unicode character which is not correct.
Declaring the RegEx pattern as a raw string instead of unicode is
required for Python 3.
(From OE-Core rev: 9002850f0c2e409d3bc629e36bb360b96326bb64)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
License-update: formatting, years
Upstream has completely overhauled the build system
(cmake -> meson) and available options. Add the most
important ones that require external dependencies;
there's plenty more if someone finds them useful.
(From OE-Core rev: bbcfef76c3d412f1a79c77f8712aff36190bf7fa)
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>
|
|
|
|
|
|
|
|
|
|
|
| |
setUpLocal runs before every testcase, setUpClass runs only once in
the beginning.
(From OE-Core rev: 0c23e711c277562cf32093851e43bf93a7cb61dc)
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Using a tag is not actually robust enough, e.g. poky-contrib
checkouts do not come with any tags. So let's use a revision
matching yocto-4.0, that ought to be present.
(From OE-Core rev: 1246aa8e4c9e6fce2f7700cd8e8ad9566a21d6e3)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
restore the layers
This does a basic run-through of the bitbake-layers plugin, and the resulting json layer config
and the layer setup script that uses it. Only poky is actually fetched by the script.
(From OE-Core rev: 84ddd6fc6effbb74499409da7e85c09c8a1ff9ea)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Defines a common schema for layer setup that can be consumed by tools to
know how to fetch and assemble layers for end users. Also includes an
example of the layer setup that constructs poky/meta-intel/imaginary product layer
for reference.
The schema can be used to validate a layer setup file with the commands:
$ python3 -m pip install jsonschema
$ jsonschema -i meta/files/layers.example.json meta/files/layers.schema.json
(From OE-Core rev: 72740b5dd635579e373b4bfe6ccacfe6a02aa998)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Alex: I made the following modifications to Joshua's original commit:
- moved the files from meta/lib to meta/files
- the example json showcases a multi-repo, multi-layer setup
instead of just poky - closer to a typical product
- added oe-selftest that validates the example json against the schema using python3-jsonschema-native
- the schema is modified so that:
-- all lists (sources, layers, remotes) are replaced by objects keyed by 'name' properties of the list items.
This allows using them as dicts inside Python, and makes the json more compact and readable.
-- added 'contains_this_file' property to source object
-- replaced 'remote' property with a 'oneOf' definition for git with a specific
'git-remote' property. 'oneOf' is problematic when schema validation fails:
the diagnostic is only that none of oneOf variants matched, which is too non-specific.
-- added 'describe' property to 'git-remote' object.
-- removed description property for a layer source: it is not clear how to add that
when auto-generating the json
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
template into a layer
This is the reverse of setting up a build by pointing TEMPLATECONF to a directory
with a template and running '. oe-init-build-env': this takes the config files from build/conf,
replaces site-specific paths in bblayers.conf with ##OECORE##-relative paths, and copies
the config files into a specified layer under a specified template name.
In many or perhaps most cases such static prefabricated configurations (that require no
further editing) are just enough, and I believe they should be offered by the
official configuration management. On the other hand, generating build configurations with a
sufficiently versatile tool is a far more complex problem, and one we should try to tackle
once we see where and how static configs fall short.
Tooling to discover and select these templates when setting up a build will be provided later on.
How to use:
alex@Zen2:/srv/work/alex/poky/build-layersetup$ bitbake-layers save-build-conf ../../meta-alex/ test-1
NOTE: Starting bitbake server...
NOTE: Configuration template placed into /srv/work/alex/meta-alex/conf/templates/test-1
Please review the files in there, and particularly provide a configuration description in /srv/work/alex/meta-alex/conf/templates/test-1/conf-notes.txt
You can try out the configuration with
TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/test-1 . /srv/work/alex/poky/oe-init-build-env build-try-test-1
alex@Zen2:/srv/work/alex/poky/build-layersetup$
(From OE-Core rev: f319534dc8fc68dfe120d129154a509f0cd6a3b0)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
| |
Where there isn't a copyright statement, add one to make it explicit.
Also add license identifiers as MIT if there isn't one.
(From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
| |
(From OE-Core rev: 80090c31164d62a169431ab71c4aaee5475b6f40)
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
| |
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
These IDs refer to testopia which we're no longer using. We would now use the test
names to definitively reference tests and the IDs can be dropped, along with their
supporting code.
(From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Placing the layer in meta means the directory is in an unclean state
which may influence other tests. Use our build directory instead
since we 'own' that. This helps keep oe-selftest parallelisation
clean.
(From OE-Core rev: f2d32bdf3f27a9ef62fe3abb7fdd2e04ab84b5f3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
Adds a test that creates a layer, adds it to bblayers.conf, then ensure
that it appears properly in bitbake-layers show-layers.
(From OE-Core rev: 828462d2c39fe6f4d188b5eb129f7b2969e1ee18)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
New framework has different classes/decorators so adapt current test cases to
support these. Changes include changes on base classes and decorators.
Also include paths in selftest/__init__.py isn't needed because the
loader is the standard unittest one.
(From OE-Core rev: ddbbefdd124604d10bd47dd0266b55a764fcc0ab)
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|