Age | Commit message (Collapse) | Author | Files |
|
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>
|
|
Added couple of hopefully useful comments to the code.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Removed <image>.bbappend before generating it again as
it may cause tinfoil to fail due to its wrong content.
It's safe to do as <image>.bbappend is regenerated anyway.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added logger calls to show if image is modified by the
plugin or not.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added notification callback to <image>.bbapend to notify
user that image is modified by build-image plugin.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Filtered out non-target recipes and recipes with
recipe name != package name in build-image plugin.
Isolated all logic of getting recipes in _get_recipes
function.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Made parser help message and description more clear in
build-image plugin.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Used logger variable name instead of LOG as it is used the rest
of the devtool code.
Pylint complains about 'logger' being invalid constant name,
but it's better to be consistent in naming.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
This reverts commit 69c63728dae38d5b1cc9874268f235a07e04d3db.
Moved add_md5 back to standard.py as it's not used in
any plugin anymore.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Moved standard.py:_parse_recipe -> __init__.py:parse_recipe and
standard.py:_get_recipe_file -> __init__.py:get_recipe_file
to be able to call them from other modules.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
It doesn't make sense to use it as image recipe is not
in workspace. It means that we can't do 'devtool reset'
for the recipe, which is a main point of using add_md5.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
If bitbake image is referenced in .ks file and --size is not used
there wic uses ROOTFS_SIZE variable to set minimum partition size.
ROOTFS_SIZE is calculated in meta/lib/oe/image.py when rootfs is
created. The calculation is done using other image parameters:
IMAGE_ROOTFS_SIZE, IMAGE_ROOTFS_ALIGNMENT, IMAGE_OVERHEAD_FACTOR
and IMAGE_ROOTFS_EXTRA_SPACE.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This option is used to point wic to the directory with .env
files containing list of bitbake variables and their values.
If this option is used wic will get bitbake variables from
files instead of parsing 'bitbake -e' output.
The main reason for this is to support new mode, when bitbake
runs wic to produce wic images. In this case wic can't run bitbake
again as it's locked, so it will get variables from .env files.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Added functionality of getting variables from <image>.env files to
BitbakeVars class. env files will be parsed if the directory with
env files is known, i.e. when vars_dir attribute is set.
Otherwise 'bitbake -e' output will be parsed.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Set BitbakeVars.default_image when wic is called with -e option.
This makes get_bitbake_var API to use provided image as a default
source of variables.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
New attribute is used when bitbake variable is requested without
specifying image name. The attribute should be set from outside,
for example when wic is called with '-e <image>' option.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Moved code that parses one line of 'bitbake -e' output
to separate method _parse_line.
This method will be also used later to parse lines of .env files.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Moved code of getting bitbake variables into separate class.
Created singleton object of this class in the module namespace.
Preserved existing API get_bitbake_var.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If get_wic_plugins_help is called from wic main module
it calls git_bitbake_var at some point. This fails when
wic is called from bitbake as 'bitbake -e' can't be
run.
Moved call of this method to help.py in order to call it
later, when BitbakeVariables singleton is properly initialized
to get variables from .env files.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Renamed variable help -> hlp as 'help' is a name of Python
built-in function.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Renamed __exec_cmd -> _exec_cmd as double underscores cause
strange behaviour when function is called in class method.
Python complains that __exec_cmd method(!!!) of the same class
doesn't exist.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
If $TCPSERIAL_PORTNUM is empty string causes an error because
expands the expresion to,
$TCPSERIAL_PORTNUM == "" -> == ""
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Implemented new plugin to build image from workspace packages.
Plugin creates <image>.bbappend file, adds
all workspace packages to the image using IMAGE_INSTALL_append
variable in bbappend file. After that it runs 'bitbake <image>'.
(From OE-Core rev: 00bc43868da3ea2a4532215d3abef8e150c7b2e5)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Moved _add_md5 function from standard.py to __init__.py to
be able to call it from other modules.
(From OE-Core rev: ee38bb20dc7ba21dac782d8d13383f81dfedef55)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If this is not the case, sometimes the additional tcpserial will be
enumerated as ttyS0, which is not what we want. Because then it would be
the console, and qemurunner would not log things properly.
Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The option was added so that the qemurunner could start a second tcp
serial port without adding machine conditional logic to qemurunner.
The issue that made this necessary was that when "virt" is passed to
qemu-system-aarch64, the normal mechanism for specifying a tcp serial
port does not work. This is because the hardware for the "virt" machine
is hardcoded in the device tree blob and the addition devices must be
virtio devices.
So runqemu can specify virtio for qemuarm64 whereas it seems all other
qemu machines work with the "-serial tcp*" option.
Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We have "recipetool create" (or "devtool add" which wraps it) instead
which works pretty well now, is written in Python and thus can call
into BitBake/OE code easily, and can do things that create-recipe can't;
any future improvements should go into recipetool and therefore I think
we'd rather people used it instead.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Add kickstart file for generating a hybrid bootable iso image using
isoimage-isohybrid plugin, the output image is HYBRID_ISO_IMG-cd.iso,
the label is HYBRIDISO, and the rootfs.img file is an image with ext3
file system, and uses grub as bootloader for EFI boot and
syslinux for legacy boot.
Signed-off-by: Mihaly Varga <mihaly.varga@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This plugin creates a hybrid, legacy and EFI bootable ISO image.
The generated image can be used on optical media as well as
USB media.
Legacy boot uses syslinux and EFI boot uses grub or gummiboot (not
implemented yet) as bootloader. The plugin creates the directories
required by bootloaders and populates them by creating and
configuring the bootloader files.
The plugin adds an image file to the iso which
contains the directory tree of the rootfs folder specified by the
--rootfs argument or by the IMAGE_ROOTFS bitbake variable.
Using the isohybryd tool, the created .iso image is enhanced by a MBR
for booting from disk storage devices, consequently the provided
iso image could be copyed directly by dd comand onto USB drive or
could be burned to an optical media by using a suitable image burner.
The plugin depends on parted, e2fstools, syslinux, grub, cdrtools,
dosfstools and mtools program.
Some of the functions in this plugin were inspired from bootimg-efi.py
and bootimg-pcbios.py plugins implemented by Tom Zanussi.
Signed-off-by: Mihaly Varga <mihaly.varga@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Let's have the caller do this and then the function is a bit more
flexible (e.g. we can choose to parse with bbappends or not); fix up
calls to this function appropriately (of which there are only two, both
within devtool).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
If a recipe is BBCLASSEXTENDed (e.g. to -native), its PN value and the
name of the bbappend will be different; we were assuming them to be the
same when reading in the workspace, leading to us seeing the base recipe
name everywhere afterwards.
Also add a test so we ensure this doesn't regress in future.
Fixes [YOCTO #8157].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Ensure that the "patches" subdirectory is removed from the right
location when S == WORKDIR (e.g. devtool extract makedevs).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
In case the user has set up externalsrc outside of devtool, force
EXTERNALSRC to blank for the recipe when extracting so that the original
source URI is still in SRC_URI and we're still able to extract it. (This
isn't a problem with devtool itself because the bbappends within the
workspace layer that apply externalsrc are explicitly filtered out when
devtool parses a recipe).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
qemu-directdisk.wks creates a raw disk image
that a qemux86* machine can boot from.
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Made create-pull-request POSIX compatible:
- Replaced /bin/bash -> /bin/sh in shebang.
- Replaced usage of pushd/popd with generic shell commands.
- Tested on zsh and dash.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Major changes in 0.2.0:
- implemented UUID support
- fixed support of GPT partition tables
- implemented running bitbake from wic
- implemented image compressing
- started testing with oe-selftest. implemented 17 test cases
- used native tools (parted, mkfs, mtools, etc)
- usability and documentation fixes
- code clenup
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fixed pylint warnings.
Increased pylint score from 8.02 to 9.40.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Removed unused global variable wks_vars and 2 unused functions
get_wks_var and add_wks_var.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
exec_native_cmd was modified to report recipe to build
native programs.
Pairs executable->recipe are hardcoded as it's not possible
to obtain this information automatically.
[YOCTO #7631]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Included full console output and example of the .wks file
into the 'wic help overview' content.
Used qemux86-64 machine instead of crownbay to make example
working without cloning additional layers.
[YOCTO #7940]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Made command line specification less confusing.
Reformatted usage output.
[YOCTO #7938]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
create-pull-request -d path creates empty patches if directory
is specified as a path, i.e. ./bitbake or ./bitbake/ or full path.
It behaves expected way only if script is run with -d bitbake, i.e.
relative dir name doesn't contain '\'.
Fixed this unwanted behaviour by changing directory and running
git format-patch in it with --relative, without specifying
relative path as a parameter.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
ip list can return devices in the form tapX@NONE. If it does so,
ensure we handle that case correctly. Newer distros appear to do
this in some cases.
[YOCTO #8129]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In theory the code reduces the tap device number to an integer. This
patch adds error checking to ensure that does happen and that the script
exits if something unexpected happens.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
When reconfiguring the branch to something not already fetched,
action_pull fails with
error: pathspec '<new branch name>' did not match any file(s) known to git.
It is the "git checkout" which fails like that. To solve this,
try the faster "git checkout + git pull" first and only if that fails,
fall back to the slow "git fetch + git checkout".
In the conf.hard_reset case, do the checkout always after the git fetch.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The git operations can fail, for example when the branch is unknown
or misconfigured.
Better move the info message and extend it such that it is printed
first and provides the necessary context, because otherwise the
CalledProcessError exception gets dumped without mentioning for which
component it occurred.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The 2to3 symlink conflicts with its Python 2 equivalent in package
python-2to3.
The Python 3 version of the tool is still available as 2to3-3.4.
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
robotparser has been moved to urllib.robotparser in Python 3, and gets
packaged as part of python3-netclient alongside the rest of urllib.
This causes python3-modules to depend on an empty/missing
python3-robotparser package.
robotparser.py is relatively small and has no dependencies outside
urllib, so it makes more sense to eliminate the python3-robotparser
package than to alter the manifest for python3-netclient.
Part of the fix for [YOCTO #8048].
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This options allows to generate patches against relative directory by
using git format-patch --relative option.
See more details about --relative option in git diff manual page.
For example generating bitbake patchsets from poky can be
done this way: create-pull-request -u contrib -d ./bitbake
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|