Commit Graph

4865 Commits

Author SHA1 Message Date
Christopher Larson 114206fb4c buildstats-summary: round the floating point percentage
This was rounded in python 2, but python 3 changed the default behavior of /.
We could switch to the same behavior as previous by switching to // rather
than /, but there's value in keeping at least one decimal point, to avoid the
misleading case where it says 0% but the reuse is non-zero.

(From OE-Core rev: 35d36a4d097ce8a0fd0be2f795e3d5052d4f753c)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-12 23:10:16 +01:00
Khem Raj ea439968b6 glibc: Upgrade to latest tip of master
- libc-package.bbclass: Do not use --old-style
  This option has been dropped from latest glibc

(From OE-Core rev: 78ab1e7cdedc6a73395af5d053b49cf081416732)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-12 23:10:13 +01:00
Ross Burton 586249ac83 classes/libc-package: remove pointless copying when running localedef
localedef handles attempts to read/write the archive in parallel correctly by
creating the file atomically, gracefully handling racing to create, and has
exclusive locks when writing.  Therefore I can't see any purpose to copying the
archive to /tmp and back again when manipulating it.

(From OE-Core rev: 016e4a53e3251ffcdb3c260dd2837507b520ffa6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-10 14:12:17 +01:00
Ross Burton e2a150b1f9 libc-package: remove obsolete do_configure_prepend
This fragment dates from when this class was used for more than just glibc
locale packaging, and as glibc-locale disables do_configure it can't have been
executed.

(From OE-Core rev: 6483fbe70e52ec9a53c918fe81162fd0c566f80f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-10 14:12:17 +01:00
Paul Eggleton 23ae622a69 classes/populate_sdk_ext: exclude initramfs images from locked signatures
Tasks for image recipes cannot be locked - there's nothing to restore
from shared state to cover them and as a result, if you had "live" in
IMAGE_FSTYPES the build would fail with "taskhash mismatch" errors for
do_rootfs and do_image_complete for the initramfs image recipe, since it
had to try to run those. We should probably catch that issue earlier in
the build and produce a proper error, but for now at least exclude these
signatures from the locked-sigs.inc file so that extensible SDK
installers built when IMAGE_FSTYPES includes "live". (It turned out we
already had code to find other image tasks in the task list in order to
generate the list of install targets.)

Follow-up fix for [YOCTO #9826].

(From OE-Core rev: a7133bf6bb650b944d29d01129f36a56282acd2b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:25 +01:00
Paul Eggleton c7ab9f3ca1 classes/populate_sdk_ext: ensure tasks to build the image are included
If you build an extensible SDK for an image and IMAGE_FSTYPES includes
"live" then the extensible SDK will fail to install with a bunch of
unexpected task execution errors, matching the missing items required to
build the live image. The issue was we were still depending on do_rootfs
rather than do_image_complete. The fix was slightly more complicated
than just changing the task name as do_image_complete's dependencies are
in the form of dependencies on tasks within the same recipe (represented
in the "deps" varflag rather than the "depends" varflag).

Fixes [YOCTO #9826].

(From OE-Core rev: 2b9c092e89b421bf7fd6a7c9604a83ae420d85ba)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:24 +01:00
Ed Bartosh e8feb1976a devpyshell: python3: flush stdout explicitly
Opening text stream in unbuffered mode raises the following
exception In Python 3:
    ValueError: can't have unbuffered text I/O

Fixed by leaving std* streams in text mode and flushing
stdout explicitly.

(From OE-Core rev: 732001cb268683f5b56e251e2964ec5b694a2147)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:23 +01:00
Ed Bartosh 250955ab8c devshell.bbclass: fix double unbuffering
stdout is already unbuffered in bitbake code. Attempt to
do it again in devshell.bbclass causes this crash when
running devpyshell:
  File "scripts/oepydevshell-internal.py", line 29, in <module>
      pty = open(sys.argv[1], "w+b", 0)
  IOError: [Errno 13] Permission denied: '/dev/pts/6'

(From OE-Core rev: 875910451e1ce97d0c42b41b1140c8160ed1f40a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:23 +01:00
Paul Eggleton 4ebe0e1175 classes/cmake: enable progress for do_compile
cmake outputs percentage complete as part of its compilation process, so
we can enable BitBake's new progress scanning for do_compile here.

(From OE-Core rev: f77ea95ba5cd337f01f2a1b4fe9466feb6af9440)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:23 +01:00
Paul Eggleton a702c68c5b classes/populate_sdk_ext: eliminate double execution on install
Use the new BB_SETSCENE_ENFORCE functionality to avoid having to run
bitbake twice on installing the extensible SDK - we can now do it all in
one invocation which not only takes less time, but we should also get
more meaningful errors for some types of failure, in particular where
downloading from an sstate mirror fails.

One result of this change is that you get the errors printed on the
console during normal output rather than this going to the
preparing_build_system.log file first. In OE-Core revision
227d2cbf9e0b8c35fa6644e3d72e0699db9607fa, we changed to always print the
contents of preparing_build_system.log on failure, but now at least the
error contents of that log is duplicated. Besides, I intentionally
didn't print out the contents of that log during normal usage because
it's quite verbose - the bug that we were attempting to fix was about
not getting this information when seeing failures in the automated
tests, thus I've moved printing the log to the test handling code
instead.

Part of the implementation of [YOCTO #9367].

(From OE-Core rev: e1390c1ef85862b91b067ab24f3c06ca506155ad)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:23 +01:00
Paul Eggleton ff41cfb508 classes/testsdk: print output correctly on failure
With Python 3 we get a bytes object from the command output and not a
string, which gives some ugly formatting for error messages unless you
decode it first.

(From OE-Core rev: 798bec6fe43116b51247284eb4e415337b2e8e04)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:23 +01:00
Paul Eggleton 6677dd37ad classes/sstate: add a mode to error if sstate package unavailable
If BB_SETSCENE_ENFORCE is set to "1" and an sstate package fails to
download outside of the whitelist specified by
BB_SETSCENE_ENFORCE_WHITELIST, then fail immediately so you can tell
that the problem was caused by failing to restore the task from sstate.

Part of the implementation of [YOCTO #9367].

(From OE-Core rev: 9e711b54487c3141d7264b8cf0d74f9465020190)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:23 +01:00
Paul Eggleton e769dce794 classes/sstate: show progress during sstate object availability check
Show progress through bitbake's standard terminal UI when checking for
shared state object availability, since this can take some time if there
are a large number of tasks to be executed and/or the network connection
is slow.

Part of the implementation for [YOCTO #5853].

(From OE-Core rev: 1a064385d6921ec90b33c9064dafaab11a36267c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:23 +01:00
Paul Eggleton 40712171b2 classes/image: implement progress support for do_rootfs
Use the new task progress functionality to report progress during
do_rootfs. This is a little coarse and ideally we would have some
progress within the installation section, but it's better than
nothing.

(From OE-Core rev: 370f08d434480c1790950e40db8f7687da78cb14)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:23 +01:00
Ross Burton e0bcf333df toolchain-scripts: add sysroot/usr/share/pkgconfig to PKG_CONFIG_PATH
Otherwise architecture-independent pkg-config files such as wayland-protocols
won't be found in the SDK.

(From OE-Core rev: 1bea760f3f462fdcc3eefc0d8597688d61447ddd)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:48 +01:00
Ricardo Neri 3e74ef223c kernel-module-split.bbclass: add a prefix for module package name pattern
When splitting kernel modules into individual packages, such packages take
their names from the module name. This is OK under most of the circumstances.
However, it may lead to package naming collisions if there exists two
modules with the same name.

Situations like this can occur when building testing modules. For instance,
there exists testing versions of the modules for non-volatile memory that
are built with different linker options but bear the same module name. If
one wants to package such modules, it is be good to be able to name
packages differently. This can be done by prefixing the package name with
a KERNEL_MODULE_PACKAGE_PREFIX that can be set by the recipes that inherit
from module.bbclass.

Cc: Megha Dey <megha.dey@intel.com>
(From OE-Core rev: 4f941e8c5ee8e95291c3beff0a2798aa13f8dfc8)

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:45 +01:00
André Draszik 820a9d0cb6 classes/kernel: fix symlink logic when bundling initramfs images
If linkpath points to the a file in KERNEL_OUTPUT_DIR, rather than
outside, then symlink creation for the bundled initramfs image files
fails.

This is because in that case $linkpath.initramfs and $realpath.initramfs
are in the same directory, KERNEL_OUTPUT_DIR, and hence are the same.
Since we just created $realpath.initramfs, creating a symlink with the
same name will fail.

Given that $linkpath is not necessarily the same as the kernel image type,
just removing this symlink creation is not the right thing to do, as
in that case kernel_do_deploy() wouldn't find the bundled file.

What we really want is a symlink from the name of the initramfs-bundled
kernel image type to the real initramfs-bundled kernel image, as that is
what is actually used later in do_deploy().

This brings the code path for when $KERNEL_OUTPUT_DIR/$type is a symlink
in line with when it is not.

(From OE-Core rev: 7585ebbbe4e95870ab7475737ed5b94255351c72)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:44 +01:00
André Draszik 83444bbe2d classes/kernel: fix symlink creation in DEPLOYDIR for bundled initramfs
If multiple kernel image types have been specified, only the very first
one would receive a symlink in DEPLOYDIR.

The reason is that we're looping over the list of image types and check
if a bundled initramfs images exists using a relative path. As part of
the loop we're changing the current directory, hence all additional
iterations fail to see the files we're looking for, and hence no symlinks
are being created.

Fix by not changing the directory and adjusting the ln invocation instead.

(From OE-Core rev: 2a6ac8ca71b669b8653eb19417faf58575385a21)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:43 +01:00
Alexander Kanavin b84875f423 pythonnative.bbclass, python3native.bbclass: use DEPENDS_append instead of DEPENDS +=
Otherwise -native variants of recipes that use these classes don't get a proper python[3]-native
dependency for some reason.

(From OE-Core rev: 834514198f9e39ce323270567e3ce744f763b637)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:43 +01:00
Alexander Kanavin cf1af6b384 pythonnative.bbclass, python3native.bbclass: export STAGING_INCDIR, STAGING_LIBDIR, PYTHON variables
We patch Python's distutils modules to access STAGING_INCDIR/LIBDIR, so when
they are not set, scripts that utilize distutils (e.g. python-config) fail.
Several recipes need to export those manually to prevent such failures,
so let's do that in the class instead.

PYTHON variable is exported because otherwise autotools' python.m4
macro will pick up its own internal default, which may not be the version
that we want.

glib recipe in particular was previously using Python 2.x during build due to python.m4
defaulting to it - now it's using Python 3.x, and so needs a small fix in
deletion of *.pyc files.

(From OE-Core rev: c1e0eb62f2d89b10b187016200018830b1c77945)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:42 +01:00
Ting Liu ec64c9c02f u-boot: extend UBOOT_CONFIG format to support different binary name
When using UBOOT_CONFIG format, the final u-boot binary for each config
may have different names. Extend UBOOT_CONFIG format to support different
binary to be copied.

The new format is supposed to be compatible with old one as ${UBOOT_BINARY}
is copied by default, and images,binary can be empty.

An example format to specify it, in the machine, is:
UBOOT_CONFIG ??= "sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor"
UBOOT_CONFIG[nor] = "ls1021atwr_nor_config,,u-boot-dtb.bin"
UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_config,,u-boot-dtb.bin"
UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_config,,u-boot-dtb.bin"
UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_config"

(From OE-Core rev: 2a5c484f314ddc75cab5f0d01b0215d7fc405b6b)

Signed-off-by: Ting Liu <ting.liu@nxp.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:40 +01:00
Ross Burton e04da4b954 autotools: ensure Makefile exists in do_compile
If a recipe is using the autotools class then presumably it is using Makefiles.
However the default do_compile() is forgiving and silently handles a missing
makefile, which means that if a recipe is using a hand-coded static Makefile
(e.g. git) but doesn't use brokensep the recipe will fail in do_install.

To make debugging this easier, override do_compile in autotools so that it fails
if a Makefile isn't present.

(From OE-Core rev: 14839515301754e0b512fe3054d95dabc77ad829)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-23 14:26:14 +01:00
Saul Wold 8d56c54107 rootfs_rpm: Increase rootfs size
This doubles the amount of extra space that is provided for SMART and
RPM, as they consume more disk space during qa testing via testimage

[YOCTO #9800]

(From OE-Core rev: 2d636068d9d3a1ea2db3ace49462be13ba9ef125)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-20 12:07:49 +01:00
Richard Purdie 09d08340fe Revert "cmake.bbclass: set the modules directory correctly"
This reverts commit 642bd49964690259328f506df41a1764c5ac6226.

This broke "bitbake cmake":

| CMake Error at /home/jku/src/poky/build/tmp/work/core2-64-poky-linux/cmake/3.5.2-r0/toolchain.cmake:34 (list):
|   Syntax error in cmake code at
|
|     /home/jku/src/poky/build/tmp/work/core2-64-poky-linux/cmake/3.5.2-r0/toolchain.cmake:34
|
|   when parsing string
|
|     /home/jku/src/poky/build/tmp/sysroots/qemux86-64/usr/share/cmake-\3.5.${CMAKE_MINOR_VERSION}/Modules/
|
|   Invalid character escape '\3'.
| Call Stack (most recent call first):
|   /home/jku/src/poky/build/tmp/sysroots/x86_64-linux/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:98 (include)
|   CMakeLists.txt:19 (project)

https://autobuilder.yoctoproject.org/main/builders/nightly-world/builds/832
https://autobuilder.yoctoproject.org/main/builders/nightly-world-lsb/builds/550

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-20 08:40:21 +01:00
Jose Pardeiro 7b9e1f5ad8 cmake.bbclass: set the modules directory correctly
The CMake recipes contain a mismatch between the environmental variable
which defines where the Modules are installed and the location where they
actually are. This patch fixes the environmental variable to point to the
proper folder defined according to the cmake version.

(From OE-Core rev: 642bd49964690259328f506df41a1764c5ac6226)

Signed-off-by: Jose Pardeiro <jpardeiro@rapyuta-robotics.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-17 17:14:55 +01:00
Peter Kjellerstedt 3037e0df9b useradd-staticids.bbclass: Allow missing UIDs/GIDs to generate warnings
Previously when USERADD_ERROR_DYNAMIC was set to "1", an exception was
raised if no numeric UID/GID could be determined for a user/group. Now
it is possible to set it to either "error", which results in the old
behavior, or "warn" in which case a warning is issued instead.

For backwards compatibility reasons, it is still possible to set
USERADD_ERROR_DYNAMIC to "1" and get an exception in case of failure.

(From OE-Core rev: 58c82f79efee8e68fa63b96a32f54660afb15769)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-17 17:14:55 +01:00
Peter Kjellerstedt c99750d17e useradd-staticids.bbclass: Restore failure on missing UIDs/GIDs
A regression was introduced with commit 3149319a whereby setting
USERADD_ERROR_DYNAMIC no longer resulted in an error for users and
groups that were missing numeric UIDs and GIDs but were not mentioned
at all in any passwd or groups file.

[YOCTO #9777]

(From OE-Core rev: adc0f830a695c417b4d282fa580c5231e1f0afbe)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-17 17:14:55 +01:00
Andrew Bradford 40f3099e8e base.bbclass: p4 fetcher supports srcrev
Enable the perforce fetcher to call bb.fetch2.get_srcrev() as it can use
'SRCREV = "${AUTOREV}"'.

(From OE-Core rev: 9d6ac71e4d954d857ecb1708ab4fe4bc552244aa)

Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-17 17:08:25 +01:00
Richard Purdie 9b32dd5a00 package_deb: Avoid chdir warnings and restore cwd after packaging
dpkg-build needs to be executed in the root of the package, so save and restore
the current directory so this task doesn't modify the state.

(From OE-Core rev: c294f4ed5a02b055916cfc26a2fca672edee1208)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-16 22:44:03 +01:00
Ross Burton 792fd38885 package_ipk: restore cwd after packaging
opkg-build needs to be executed in the root of the package, so save and restore
the current directory so this task doesn't modify the state.

(From OE-Core rev: 43dac97f397143abf61fc1c105ea0e4f2fffb90b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 18:11:10 +01:00
Ross Burton 70d63061f3 classes/package: save/restore cwd in split_and_strip_files
This function uses chdir() heavily, so save and restore the cwd so that it
doesn't affect the system state.

(From OE-Core rev: d3059e5d35dcb01641e828c5182615b8fbf1f2e5)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 18:11:10 +01:00
Ross Burton e2e6fe964d classes/kernel: remove path assumptions in compile_kernelmodules
do_compile_kernelmodules was assuming that the current directory was ${B} but
didn't make that explicit, so use an absolute path to ensure this always works.

(From OE-Core rev: a26ec548aabda74acfdd1e2893b98b47bc513b15)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 18:11:09 +01:00
Ross Burton 6f7a3dc284 classes/image: don't chdir when creating symlinks
There's no need to chdir() when creating image symlinks, and using chdir()
changes the state for future tasks.

(From OE-Core rev: 2fdf06fbe986d742f6bb13e9348b50e9aab03139)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 18:11:09 +01:00
Manuel Huber 66c5a4ad62 classes/license: handle EXDEV if hard link to license fails
Hard links can still fail even if st_dev is the same for source
and destination. In case of EXDEV error, fall back to copying.

(From OE-Core rev: c00423d6bab9849e331beadf4d3cee90e04fe295)

Signed-off-by: Manuel Huber <manuel.h87@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 18:05:22 +01:00
Ross Burton 4f8f3f6cb4 classes/rm_work: use the idle I/O scheduler class
As rm_work is just cleanup it shouldn't starve more important tasks such as
do_compile of I/O, so use BB_TASK_IONICE_LEVEL to run the task in the idle
scheduler class.

(From OE-Core rev: 6025a14dbbd09b2805fe2e17ddc24f2a515cb832)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 18:05:22 +01:00
Ross Burton 280061cad0 classes/sdl: remove pointless class
This class exists purely to add a number of SDL dependencies, which should be
done directly in the recipe.

(From OE-Core rev: b2a75aad679fd97ff2b51a7a8ee03bd22be8d7a7)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 18:05:21 +01:00
Mariano Lopez 1ed0e8a0e6 update-rc.d.bbclass: Disable class when sysvinit is not in DISTRO_FEATURES
When sysvinit is not in use, update-rd.d class adds build dependencies
that won't be needed, this patch removes the build dependecies and
won't add the task to PACKAGESPLITFUNCS.

[YOCTO #9515]

(From OE-Core rev: 5b2139a79cd8c280e755923016b3a6e84413184e)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 18:05:21 +01:00
Zhenhua Luo 7028192246 image.bbclass: do exact match for rootfs type
Do exact match for rootfs type, instead of pattern match, to avoid
unexpected build error due to redundant rootfs type build.

E.g. when building ext2.gz.u-boot, both .gz.u-boot and .u-boot are matched,
the following build error will appear, actually .u-boot is not needed.
| mkimage: Can't open .../core-image-minimal-<machine>-<yyyymmddhhmmss>.rootfs.ext2.gz: No such file or directory

(From OE-Core rev: 46bc438374de74af76d288520c6252c9b7840767)

Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 08:35:02 +01:00
Ross Burton 5c94a498e8 libc-package: ensure glibc-locale package list is deterministic
If all locales are being generated then the list used is the keys from a
dictionary.  In Python 3.4 onwards the ordering of a dictionary changes for
every instance, so sort the key list.

(From OE-Core rev: 7f6d7f729df37747be0d2cd2503cddca0184fd1f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 08:35:02 +01:00
Richard Purdie 0918ac9fdd staging: Add BB_SETSCENE_VERIFY_FUNCTION2 for bitbake runqueue changes
We're about to rewrite the data structures in taskdata/runqueue in bitbake
and we 'leaked' knowledge about those structures to this single function.

Add a 'v2' function definition for use with the newer bitbake, the older
one can remain for compatibility for a while, then be removed. The function
is comparatively simple and rarely changes.

(From OE-Core rev: 2a6f88d51414993d18096f7f0dc27c0b862240bc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 08:35:01 +01:00
Peter Kjellerstedt 4c38798cae useradd-staticids.bbclass: Avoid FutureWarning about split()
This avoids the following warning with Python 3.5:

  /usr/lib64/python3.5/re.py:203: FutureWarning: split() requires a
  non-empty pattern

(From OE-Core rev: a7a783c30cc58008f0e070dad39d40038e0a5eb5)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12 23:47:19 +01:00
Peter Kjellerstedt 93698ac54a useradd-staticids.bbclass: Make sure opened files are closed
This avoids warnings about unclosed files with Python 3.

(From OE-Core rev: 77adf8341694b76cf58b7a31dda18b85b3eb87a2)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12 23:47:19 +01:00
André Draszik 9ac4c8b11c image/image_types.bbclass: fix fatal error during cpio debugfs creation
If /init is just a symlink to /sbin/init, debugfs creation
fails with the following error:

ERROR: Error: The image creation script '<...>/debugfs.create_image.cpio' returned 1:
touch: cannot touch '<...>/cpio_append/init': Permission denied
WARNING: exit code 1 from a shell command.

ERROR: Function failed: do_rootfs

The reason is that IMAGE_CMD_cpio() is run twice on the same
WORKDIR. The first run creates a symlink in WORKDIR/cpio_append/init
to point to /sbin/init, while the 2nd run then tries to 'touch'
that link, which will fail, of course since /sbin/init is not
usually writable by non-root users.

Fix this by providing knowledge to the IMAGE_CMD_xxx() scripts
with regards to the fact that they are being executed in the
context of debugfs creation. The IMAGE_CMD_cpio() can now be
intelligent in the sense that it can avoid all additional symlink
handling during the debugfs run. The symlinks do not need to
be part of the debugfs, so we can skip that part altogether
in that case.

(From OE-Core rev: 659ae1d7df28115429f6f31450fad6d1f86e3031)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12 23:47:18 +01:00
Jussi Kukkonen b0c69fe6a5 gtk-immodules-cache: Support both GTKs at same time
(From OE-Core rev: 0cb5016283a80b04a41d37e332bb324a203e2ef8)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12 23:47:18 +01:00
Patrick Ohly 21343ac500 npm.bbclass: avoid str/byte conversion problems for PKGV and SUMMARY
In Python3, str.encode() returns byte strings, which later are not
converted back to strings automatically, leading to "TypeError: Can't
convert 'bytes' object to str implicitly" in code which reads PKGV and
SUMMARY and expects to find strings there.

The npm.bbclass must use values for d.setVar() that meet that
expectation, and thus the redundant (and in Python3, harmful)
.encode() gets removed.

(From OE-Core rev: 241e094bcd9212204350f9855257474908f82a3c)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12 23:47:17 +01:00
Mariano Lopez 2228b16bef testexport.bbclass: Create tarballs for easy release
This create tarballs in the testexport directory in order
to make easier to distribute the test in another systems.

There are three tarballs, one for the metadata that is not
arch dependant, another for packages needed by the DUT
(this depends of target MACHINE), and the last one for the
SDK needed by the systems that perform the tests.

This also create only the tarballs that are needed.

[YOCTO #8481]

(From OE-Core rev: f8a0456e100b07a966cc24a78f197400c5a2ccab)

(From OE-Core rev: a91a603676b088abcb648cc558c33da6292b9be6)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-07 15:22:38 +01:00
Mariano Lopez 120f7067c8 testexport.bbclass: Add support for testexport-tarball
Add support to export the SDK tarball needed when a test
system doesn't have the required software to perform runtime
tests.

The support is when exporting the test and when running
the test on a remote system. The user of this feature just
need to set TEST_EXPORT_SDK_ENABLED to "1" and declare
the sdk packages in TEST_EXPORT_SDK_PACKAGES.

[YOCTO #7850]

(From OE-Core rev: a6041f81b81baa7564e4c712fc88de2b997e52e4)

(From OE-Core rev: 05e6c89f0f71311f8bd32cdb86a2deb789c58035)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-07 15:22:38 +01:00
Mariano Lopez cfe3efd730 testimage.bbclass: Make dependency of cpio when using RPMs
Exctraction of RPMs needs cpio, not all distros include cpio by
default, so we need to build it.

[YOCTO #8694]

(From OE-Core rev: 95cd427b3887b087533fba11c67ef9bc173f9aa5)

(From OE-Core rev: 5a4c73bd3f2bbba2ad5413367fa7ca2f625ffdd7)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-07 15:22:38 +01:00
Mariano Lopez 938f05333b oetest.py: Add install/uninstall functionality for DUTs
Add the functionality to install/unistall packages in the
DUTs without the use of the package manager. This is possible
with the extraction introduced in package manager class.

testimage and testexport bbclasses has been modified in order
to support this new feature.

[YOCTO #8694]

(From OE-Core rev: b7111d9e9d64d21f57729d1ac1865aea6e54cc8b)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-07 15:22:38 +01:00
Mariano Lopez d9b3ee8b38 lib/oeqa/otest.py: Fix import tests from other layers with python3
In python3 the functionality to import modules has been changed and
this broke the capability to add runtime tests from other layers.

This commit returns this capability to testimage and testexport.

[YOCTO #9705]

(From OE-Core rev: a26f23d3ce8f7e9f59dbc9bf27516377fd7a0a6d)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-07 15:22:38 +01:00
Martin Jansa d9e47a522a rm_work: exclude all kernel recipes
* otherwise kernel is rebuilt every single time and often it fails when
  building external modules

[YOCTO #9352]

(From OE-Core rev: 9d23daf03ece06185224f869e9b7f73789689c2d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-07 15:22:37 +01:00
Alexander Kanavin a2eb6d4867 gobject-introspection: move to Python 3
(From OE-Core rev: db702fb12f7b34928a52e522ad269ac43f1dcace)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-07 15:22:37 +01:00
Richard Purdie a7ddbea345 meta: Drop swabber
swabber hasn't been used in years and never did work well in the first
place. Remove its recipes, class and configuration.

(From OE-Core rev: e18657df0b7e45a224fae17e68c447eae94258ac)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-07 15:22:36 +01:00
Richard Purdie 04319c0340 image-buildinfo: Update to python3 syntax
(From OE-Core rev: 6e7d9dd9b5cbf46b955036876a25353fafbf264c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-05 08:19:02 +01:00
Mariano Lopez 91a7f54e08 testexport.bbclass: Update to use python3
Remove deprecated attributes in order to use python3.

runexported was changed to use python3.

[YOCTO #9702]

(From OE-Core rev: 9129af6dc421455c0253be313bf5781b913dc5fd)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-03 13:13:30 +01:00
Jussi Kukkonen 469e56b1a7 image-live, image-vm, wic: Remove fs size workaround
Since mtools has been patched to live with filesystems with sizes
not divisible by sectors-per-track, we no longer need to try to
set the size based on our guess of the sectors-per-track dosfstools is
going to use.

(From OE-Core rev: 334e32af88b310ff1ed950d127a6dedeb460f8d0)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-03 13:13:30 +01:00
Jianxun Zhang c71f5ab374 systemd: support systemd-boot as a stand-alone EFI bootloader
The "systemd-boot" is gummiboot now included into systemd project.
The old gummiboot project supported in OE is dead.

Our intention is to get a gummiboot-like EFI bootloader without
much dependency on systemd and its features.

This work is largely derived from the existing bbclass and recipes
of gummiboot and systemd.
(commit tip: ee25d0e398)

Please refer to the history up to the tip for authorship and
credit information for the original works.

To enable the systemd-boot in build, add this line
EFI_PROVIDER = "systemd-boot" in your machine conf file.

(From OE-Core rev: e9add1cd01e498d2aa52528ec52342cae48a387a)

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-03 13:13:25 +01:00
Davis, Michael 59b6a03593 syslinux.bbclass: Added configurable SYSLINUX_ALLOWOPTIONS variable
The new variable allows for images to be created without an
editable boot line in syslinux.  Default behavior remains unchanged.

(From OE-Core rev: 935578c139a260c18e437419be82d7fd7e8be81a)

Signed-off-by: Michael Davis <michael.davis@essvote.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-03 13:13:25 +01:00
Richard Purdie 3b39971748 classes/lib: Complete transition to python3
This patch contains all the other misc pieces of the transition to
python3 which didn't make sense to be broken into individual patches.

(From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:01 +01:00
Jeremy Puhlman dca3aba0f4 sanity: Switch urlparse to urllib.parse
urlparse is replaced with urllib.parse functionality in python3

(From OE-Core rev: ecfcc5dad20943b762a741546732a6c447265251)

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Richard Purdie 642a997ade classes/lib: Update xrange -> range for python3
xrange() no longer exists in python 3, use range()

(From OE-Core rev: d022b4335100612d6596cc4c4956cb98ed5873cc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Richard Purdie 44e9a0d2fa classes/lib: Update to explictly create lists where needed
Iterators now return views, not lists in python3. Where we need
lists, handle this explicitly.

(From OE-Core rev: caebd862bac7eed725e0f0321bf50793671b5312)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Richard Purdie 8587bce564 classes/lib: Update to match python3 iter requirements
python3 standardises its use of iteration operations. Update
the code to match the for python3 requires.

(From OE-Core rev: 2476bdcbef591e951d11d57d53f1315848758571)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Richard Purdie a7309d5790 classes/lib: Update to use python3 command pipeline decoding
In python3, strings are unicode by default. We need to encode/decode
from command pipelines and other places where we interface with the
real world using the correct locales. This patch updates various
call sites to use the correct encoding/decodings.

(From OE-Core rev: bb4685af1bffe17b3aa92a6d21398f38a44ea874)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Richard Purdie 297438e965 classes/lib: Convert to use python3 octal syntax
The syntax for octal values changed in python3, adapt to it.

(From OE-Core rev: 737a095fcde773a36e0fee1f27b74aaa88062386)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Richard Purdie 3c42280b8a sanity: Drop setting C locale
We really want the en_US locale as per the configuration and
previous patches. Don't set it back to C as things will break
under python3.

(From OE-Core rev: 42af63f326b03b32019c8b808b7ba07027f209b8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 15:05:47 +01:00
Stephano Cetola 79be110c1f systemd: allow add users as a rootfs postprocess cmd
Adding all the users / groups to systemd is only available for readonly
file systems. This change allows users to add them to read / write file
systems as well by specifying:

ROOTFS_POSTPROCESS_COMMAND += "systemd_create_users"

Also, add "--shell /sbin/nologin" to each user's add params.

[ YOCTO #9497 ]

(From OE-Core rev: 98a4c642444a524f547f5d978a28814d20c12354)

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 12:38:43 +01:00
Stephano Cetola af587b86f5 package.bbclass: fix strip and split logic
In order for strip and split to work together, we need to populate the
data structors if either split OR strip are not inhibited.

Original behaviour:

INHIBIT_PACKAGE_STRIP: no strip, no debug split
INHIBIT_PACKAGE_DEBUG_SPLIT: strip, no split

Behaviour after this patch:

INHIBIT_PACKAGE_STRIP: no strip, debug split
INHIBIT_PACKAGE_DEBUG_SPLIT: strip, no split
BOTH: no strip, no split, DNP data structures

(From OE-Core rev: 0df6dabdf0a61ae7b99c6a792f1eec754a7b23bd)

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 12:38:43 +01:00
Martin Jansa 37688b329e insane: return line-feeds to qa.log
(From OE-Core rev: f97c40fd6cf0a722c5355623e0392755cb0a0107)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 12:38:43 +01:00
Alexander Kanavin 0b38900710 sip.bbclass: remove
Nothing is requiring it in oe-core or meta-oe.

(From OE-Core rev: 79a98af63c0101fb49c16b762401950cf30c492a)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 12:38:41 +01:00
Alexander Kanavin 03da683a55 python3-dir.bbclass: add a separate class for Python 3
This is much cleaner than sharing python-dir.bbclass between python 2
and 3 classes, and doing confusing overrides in them.

(From OE-Core rev: 3891fcec863602a0ae6d0f3d305ea50a79a205d9)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 12:38:41 +01:00
Alexander Kanavin 78502a8010 distutils-native-base.bbclass, distutils3-native-base.bbclass: remove
These classes do not seem to be used by anything.

(From OE-Core rev: 5a149a051f91404b736a7c93b4b864f206cc7b1b)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 12:38:41 +01:00
Alexander Kanavin 4977a0743b python-native, python3-native: remove the use of exported HOST_SYS and BUILD_SYS variables
The code that utilized them was superseded by the code (in the same patch!)
that is utilizing STAGING_LIBDIR/STAGING_INCDIR, and wasn't correct in the
first place as HOST_SYS is not necessarily the same as the sysroot directory
name.

(From OE-Core rev: 8834e81a38c24a066bb4fefa93da61011d0db244)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 12:38:41 +01:00
George McCollister b426b2bc1a uboot-sign: rebuild u-boot.img with signed dtb
u-boot-nodtb.img doesn't exist so if UBOOT_SUFFIX = "img" is used
u-boot.img must be rebuilt by running make with
EXT_DTB=${DEPLOYDIR}/${UBOOT_DTB_IMAGE} then the resulting .img file must
be install to the deploy directories.

(From OE-Core rev: 4afee787e455ce1d4c002cd5c003182f1fc50028)

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:15 +01:00
Alexander Kanavin 1b71c59b12 gobject-introspection.bbclass: disable introspection for -native and -nativesdk recipes
It is not necessary for those targets, adds to the build time, and pulls
in the unneeded qemu-native dependency.

(From OE-Core rev: be18364edd5cd2c664f68120063a1e147563faab)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:14 +01:00
Jussi Kukkonen 145d28571d gnupg.org-hosted recipes: Change SRC_URI to https site
https version seems more reliable and in an informal test fetching
all gnupg recipes now takes <20% of the time it used to.

Define GNUPG_MIRROR in bitbake.conf so future tweaks to this are
easier. Replace some slower mirrors with the official ftp site
and another from gnupg.org mirror list.

Set UPSTREAM_CHECK_URI in all recipes that need it to
"https://gnupg.org/download/index.html" as the directory listings
are not up-to-date.

(From OE-Core rev: dfc9178e2f2b6873ca497d981e308e00d15280b5)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:13 +01:00
Christopher Larson 837670e8ea gummiboot.bbclass: also write startup.nsh for non-iso
wic will be needing this for its bootimg-efi plugin.

[YOCTO #9556]

(From OE-Core rev: 43ca968c5af129a990625923bc28131b8701386d)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:12 +01:00
Christopher Larson dbee7aed3d grub-efi.bbclass: also write startup.nsh for non-iso
wic will be needing this for its bootimg-efi plugin.

[YOCTO #9556]

(From OE-Core rev: ec8dc34f974ddda420bddbd195fb344e3db46cab)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:12 +01:00
He Zhe c45c94223d kernel: Make symbol link to vmlinuz in boot directory
Rename do_kernel_link_vmlinux to do_kernel_link_images and make a
symbol link to vmlinuz(if exists) for reference in arch/$arch/boot
directory.

Signen-off-by: He Zhe <zhe.he@windriver.com>

(From OE-Core rev: 6e58f54be103814b6b8a85b236510633c49e6832)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:11 +01:00
He Zhe 0437a59e3c kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time
Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.

KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE work as before.

(From OE-Core rev: 849b67b2e4820564b5e5c9bd4bb293c44351c5f3)

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:11 +01:00
Mariano Lopez 549f134970 testexport.bbclass: Stop exporting test context
Because runexported.py instance an ExportTestContext
object, there is no need to export the data in
to reconstruct the object based in a dummy class.

[YOCTO #8478]

(From OE-Core rev: f4da3832a908f79e2d0d0a886adab0aeb5e37908)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:11 +01:00
Robert Yang c358ab5d4c nopackages.bbclass: deltask foo_setscene
When deltask foo, also deltask foo_setscene.

(From OE-Core rev: 04a2ae65d3d98b9f33ab4bd8372676ad1e1de6d2)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:11 +01:00
Brendan Le Foll 899358a586 npm: add target_arch flag to npm
npm takes a target_arch flag which needs to be set to do some gyp compilations
correctly. It also doesn't use the same mapping as OE for target arch so a
small function is required to make the mapping work. Function is taken from
meta-nodejs

(From OE-Core rev: f402225311e4bbb62ba9781ab274420abaac0fb4)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:10 +01:00
Ross Burton 7b3061e5e7 sanity: check that the en_US.UTF-8 locale exists
(From OE-Core rev: 55e335d93fe74da3cce220f34bfedcfc47132806)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:10 +01:00
Randy Witt 1cdd9795dd sstate.bbclass: Don't create symlinks, download to the correct location
Previously the sstate was all downloaded to the same directory and then
symlinks were added in the directories that pointed to the siginfo and
sstate in the parent directory.

This change makes it so that now the files are just downloaded to the
correct location without the need for symlinks.

(From OE-Core rev: 55d25ed6b30ed7105d3b6421fbf2a03cea009a59)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-25 07:50:17 +01:00
Richard Purdie c7e614c438 useradd: Fix infinite build loop
http://git.openembedded.org/openembedded-core-contrib/commit/?id=642c6cf0b6a0371de476513162bd0cefa9c438b3
introduces a problem if the USERADD_PARAM variable has trailing
whitespace as the code infinitely loops causing build hangs.

Add a similar sed expression to $remaining to avoid this.

(From OE-Core rev: d6241e4c94a0a72acfc57e96a59918c0b2146d65)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-23 10:33:45 +01:00
Patrick Ohly 1974624eb9 image.bbclass: additional output in create_symlinks
When a symlink does not get created, it is useful for debugging to log
what would have been created and why it was skipped.

(From OE-Core rev: d2b4da7d21ce5295442bd2d5c760e64cf843aabb)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
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>
2016-05-22 16:11:14 +01:00
Patrick Ohly e7b5bd2ba1 image.bbclass: support duplicate compression types
When a derived distro adds a certain type, say zip, to
COMPRESSIONTYPES and later OE-core does the same, we end up with the
type being listed twice, and that would have undesired effects
(commands generated twice).

So to support such loosely coupled extension, we de-duplicated the
list of types first.

Alternatively, such a situation could also be treated as error. But that
seems unnecessary because typically commands for the same type will also
do the same thing.

(From OE-Core rev: 85855af359c2c3bfc1eaa942c95f1f7d7cc6698e)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
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>
2016-05-22 16:11:14 +01:00
Richard Purdie 3ddde5f32a meta: Update to modern exception syntax
Update older exception syntax to modern one required by python 3.
Compatible with python 2.7.

(From OE-Core rev: d13f0ac614f1d1e2ef2c8ddc71cbfcf76a8dc3f2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-21 22:26:33 +01:00
Richard Purdie 01d07f328f kernel-uimage: Fix python indentation
Use spaces, not tabs for python functions.

(From OE-Core rev: 96ed92aded49fc47c7e407d36ba4f03dafee28cd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-21 22:26:33 +01:00
Richard Purdie 88972114a6 meta/scripts: python3: rename file -> open
file() API doesn't exist in python 3, convert to open(). Also handle
some cases where files aren't closed. Compatible with python 2.7.

[Contributions from Ed and Richard]

(From OE-Core rev: 0f4ec13e11bb8abe21aba2a28547dfb9372bc377)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-21 22:26:33 +01:00
Paul Eggleton 55159ef056 classes/kernel: check OLDEST_KERNEL at configure time
If the kernel being built is older than OLDEST_KERNEL and we're building
with glibc, then the C library we're building is probably not going to
be compatible with the kernel and we should warn the user. (This is
easier to do here rather than when building glibc, because we don't
necessarily have the information we need to determine the kernel version
there, whereas we do here.)

Fixes [YOCTO #8653].

(From OE-Core rev: 2e66f57febe85a63ce2ab98eaf6318d47eb60939)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20 10:20:55 +01:00
Paul Eggleton 02587c4bad classes/kernel: fix typo
KERNEL_VERISON -> KERNEL_VERSION (in a comment)

(From OE-Core rev: 3f1d813e7183750b5189ae1ee99fd2f0bdeacac7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20 10:20:55 +01:00
Paul Eggleton fd436a2b0d classes/populate_sdk_ext: adjust variable blacklisting
* Blacklist SSTATE_DIR, DL_DIR and TMPDIR by default to avoid problems
  such as the one mentioned in [YOCTO #9605].
* Blacklist BB_NUMBER_PARSE_THREADS since we already blacklist
  BB_NUMBER_THREADS and they may be set separately.

Fixes [YOCTO #9605].

(From OE-Core rev: 3f2dcaaab0f5bc169086a8b6fd57c5606742cc4d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20 10:20:55 +01:00
Marek Vasut d3a2da45b6 kernel: fitimage: Repair misuse of shell test command
The kernel fitImage must be amended with signature if and only if
UBOOT_SIGN_ENABLE = 1 . In the current case, the UBOOT_SIGN_ENABLE
could be either 0 (default) or 1 , which test -n always correctly
interprets as non-empty string, thus always true. This does not
match the logic above though, so replace the test with check which
passes only for UBOOT_SIGN_ENABLE = 1 .

(From OE-Core rev: 158cbd737f9f6c2de756506caf919a0a3d0a05b9)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Yannick Gicquel <yannick.gicquel@iot.bzh>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20 10:20:54 +01:00
Ming Liu 5444abaaca kernel: moves KERNEL_SRC_PATH to bitbake.conf
"/usr/src/kernel" is being hard-coded in multiple recipes so far, move its
definition to bitbake.conf.

(From OE-Core rev: eb9f900527e02ca08a1de14b4ac773f513bb1ee4)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19 22:32:08 +01:00
Maxin B. John 9f447baa7c package_regex.inc: remove deprecated file
Remove this file as it has been deprecated in the previous release.
New entries should be added to recipes itself.

(From OE-Core rev: a3075bf29f0fa80489e3dd2ade65cc3a3b3d0332)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19 22:32:07 +01:00
Khem Raj 553fa35147 useradd.bbclass: Strip trailing ';' in cmd params
When there are more than 1 packages in a recipe requiring useradd
services, they are concatnated and a ';' is inserted just after
each of the users being added by the packages. A situation arises
in cases where this is controlled by PACKAGECONFIG then we add a
';' separator in the USERADD_PARAM value itself for each packagecofig
since we do not know which one will be picked, we end up in situation
where the final string returned from get_all_cmd_params() appears to be

a; ; b; c;

and then the logic which uses these cmds triggers with ';' as separator
but in this case it will fail after executing useradd 'a' because the next
cmd it will call will be just a whitespace

This is highlighted by the systemd patch to add more users as needed
by systemd 229 components.

(From OE-Core rev: e8d4356c38e3c2aacd6dc49231c73bcb7d597308)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19 22:32:06 +01:00
Martin Jansa 1e244471d0 useradd: use bindir_native for pseudo PATH
* useradd/userdel functions will fail for recipes which override their target prefix
  (e.g. to /opt/foo), because it will try to use pseudo from native-sysroot/opt/foo/bin/pseudo

(From OE-Core rev: 96189e71a86c0f4833e8e51d678208fd908bfe30)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19 09:05:19 +01:00
Mariano Lopez 20afc59704 testimage.bbclass: Remove exported test
Exported tests now have their own class, so
the code in testimage is not needed anymore.

(From OE-Core rev: bd4dbe4f5ba334690fcb6f26eb06c793ac026b55)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19 09:05:18 +01:00
Mariano Lopez b3a656374b testexport.bbclass: Split testimage class
This adds a new class that only export tests of images,
the code was taken from testimage class and most of it
wasn't modified. Just add some vars for the new class.

testexport class require testimage class to get the
test suites defined for all the images.

(From OE-Core rev: 3e4c429337966eea263b4258700843c909f496ec)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19 09:05:18 +01:00
Aníbal Limón d28ab58485 classes/base: get_lic_checksum_file_list imporve validaton of url's
When specify an URL different that supported file:// the function
returns an empty path causing an exception without notice the user
that the URL is Malformed.

[YOCTO #9211]

(From OE-Core rev: 6c28251d3d187b60ceb534055dbd8b4fffd06429)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17 14:43:29 +01:00
Richard Purdie 7db0cc27d5 sstate: Ensure we sort the value used for SSTATETASKS for determinism
This avoids 'basehash changed' errors with python 3 but could break
build determinism in general.

(From OE-Core rev: 488f88fc12eea9788e5db1de354f0118e2c58878)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17 14:43:28 +01:00
Richard Purdie 9094ea9fdd classes/oeqa: Update for print statements and file() -> open() for python3
Found some more syntax cleanups needed for python3.

(From OE-Core rev: 1181d86e8707c5b8e8d43d5e785d7d9cf01fa491)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-16 09:31:23 +01:00
Tim Orling 144c5175b8 autotools.bbclass: fix py3 SyntaxError in cfgscript print()
Update so this works with python3.

(From OE-Core rev: f533a1f78411f5537f1395496aa39f453fee581c)

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-15 09:06:00 +01:00
Alexander D. Kanevskiy 39498d0e90 image types: add bmap generation option
bmap image conversion type allows to create block map files
for sparse images. Bmap file can be used together with bmap-tools
for efficiently flash images to raw devices (hdd or usb drive)

[YOCTO #9414]

(From OE-Core rev: d3495d7b5ac90439691bafc5717a3bf1cf014737)

Signed-off-by: Alexander D. Kanevskiy <kad@kad.name>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 23:05:14 +01:00
Patrick Ohly dc939724c2 image_types: add support for zip compression
Support for the other compression format is not always readily
available on all OSes. Using zip instead of, say, xz is less
efficient, but perhaps more user-friendly for users on such OSes.

(From OE-Core rev: 27764738aa928959ca564e7299cf205c08684661)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 23:05:14 +01:00
Michael Wood 97531efe4d report-error: Replace the build directory path in the error text
Replace the TOPDIR in the output error file so that the error report once
submitted can then be more easily matched to find duplicate error
reports. This also reduces the need to manually redact any information that
might be in the error log path such as hostnames or home directories.

(From OE-Core rev: ffdc9550c109facf3a3ebdf90c1ba8153cac90dd)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 23:05:12 +01:00
Alexander D. Kanevskiy b39ddd9fe7 image_types: adjust default level of XZ compression
XZ extreme compression method usually uses a lot more CPU time with not
that often big saving on space. Same goes with -6 level of compression.
Compression level -3 usually the best balance for time/size, especially
on big images.

(From OE-Core rev: e9dbf85828e9d4e16c6a96de8931cb15bbcd78bb)

Signed-off-by: Alexander D. Kanevskiy <kad@kad.name>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 23:05:11 +01:00
Ross Burton 36912cd2e4 cmake: enable verbose builds
To help debugging build problems pass VERBOSE=1 to make so that the makefiles
print their commands, just like we do with autotools.

(From OE-Core rev: 62f95a769ec9e11c72fbf78257badbfb59f1b354)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 23:05:11 +01:00
Khem Raj 9a309684cf gcc-runtime, libgcc: Symlink c++ header and startup files in target_triplet for SDK use
We build SDKs such that gcc-cross-candian is built for only one
target *-*-linux and then use -muclibc or -mmusl to let it compile
code for other libc variants. This works fine when libc = glibc
however it does not work for c++ programs when libc != glibc since
there are c++ headers installed under ${includedir}/c++/${BINV}/${TARGET_SYS}
which is fine when gcc-runtime and gcc-cross-candian uses same --target options
gxx includedir searches in right triplet, but it fails with musl/uclibc
since gcc will look for glibc based triplet but gcc-runtime will install
them under musl/uclibc triplet.

This patch symlinks the musl/uclibc triplet to glibc triplet when libc != glibc

This fixes SDKs for musl/uclibc

(From OE-Core rev: fcaaabb401fffcda4db9a7d1f927a2a404e4776d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13 13:41:32 +01:00
Khem Raj e511478763 conf: bump minimum kernel to 3.2.0
glibc 2.24 have raised the bar for minimum supported kernel
for more details see

http://repo.or.cz/glibc.git/commit/5b4ecd3f95695ef593e4474b4ab5a117291ba5fc

(From OE-Core rev: 2722a7acb7f7d812f01fa93b764c9bb1ee725436)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13 13:41:30 +01:00
Khem Raj f99fb6a167 libc-common.bbclass: Use sed instead of grep
Squash two install cmds into one
Replace grep with sed substitution logic, optimizes
away mv cmd

(From OE-Core rev: 9a5618c4c22a617f69d184f80b91ccf2a9148026)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13 13:41:30 +01:00
Peter Kjellerstedt e839431468 staging.bbclass: Make it easier to define which dirs to stage
The directories that should be staged in the sysroot are now specified
in the SYSROOT_DIRS variable. Extra directories that should be staged
for native are specified in SYSROOT_DIRS_NATIVE. Finally, directories
that should not be staged are specified in SYSROOT_DIRS_BLACKLIST.

This also removes the sysroot_stage_libdir() function as it is no
longer used (it was just a wrapper for sysroot_stage_dir()).

(From OE-Core rev: 80e7e7f78d957b8159bede2a5cd5614d8d73039c)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13 13:41:27 +01:00
Paul Eggleton 32d80fe258 Drop unneeded LIC_FILES_CHKSUM values
With the changes to insane.bbclass we don't need LIC_FILES_CHKSUM to be
set for recipes that don't actually pull in any source.

(From OE-Core rev: fc14e794c53f94158a5e6d6a8644656875639d0c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:43 +01:00
Paul Eggleton 296c7e11f1 classes/insane: do not force LIC_FILES_CHKSUM unless SRC_URI is set
Recipes such as images and packagegroups don't actually fetch or build
any source, so there's really no point having LIC_FILES_CHKSUM set.
Forcing users to set it (as we have done for images inheriting
image.bbclass) just makes things more difficult for the user for no
discernable benefit. The easiest way to adjust this check is simply to
skip it if SRC_URI is not set since this is a pretty good indicator that
no source is being pulled in.

(From OE-Core rev: c269547ae8e90a78349f6003385137e4145e145f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:42 +01:00
Richard Purdie f49be7e7c9 update-alternatives: Fix determinism issue
getVarFlags returns a dict and there is therefore no sort order. This
means the order of the X_VARDEPS_X variables can change and hence the
task checksums can change. This can lead to rebuilds of any parts of
the system using update-alternatives and their dependees. This is a
particular issue under python v3.

Add in a sort to make the order of the variables deterministic.

(From OE-Core rev: ecd1bfed5534f83b775a6c79092c04bd13c3af0a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:42 +01:00
Richard Purdie 8a88c56968 image: Fix IMAGE_FEATURES determinism issue
remain_features uses a dict which means the order is not deterministic. This
can lead to the task hash changing depending on the state of the memory at
parse time. This is particularly noticeable under python v3.

Since the dict is helpful in constructing the data, pass the data through
sort() so the order is always deterministic.

(From OE-Core rev: b08344e28dd33e3af5596007b11185d04fce255e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:42 +01:00
Peter Kjellerstedt 88d5f563c9 metadata_scm.bbclass: Do not assume ${COREBASE} is a Git repo
The functions base_detect_revision() and base_detect_branch() try to
extract SCM meta information from the path returned by
base_get_scmbasepath(), which currently returns ${COREBASE}. However,
making the assumption that ${COREBASE} contains SCM meta information
can be false. It is true for Poky, but not necessarily other
environments. A better option is to look for the SCM meta information
based on the meta layer.

Since this works as expected for Git but not SVN, the call to
base_get_metadata_svn_revision() from base_detect_revision() was also
removed. This is not expected to affect anyone (partly based on the
comment in base_get_metadata_svn_revision()).

(From OE-Core rev: 53fd0a4a37023642a770a9fbf3cd5511d3c82af7)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:42 +01:00
Randy Witt 47c994fff0 populate_sdk_ext: Change lockedsigs task mismatch to a warning
It has been determined that it is highly likely that users might get
signatures that don't match in an extensible sdk. This doesn't
necessarily happen with oe-core, so we can set the mismatch to an error
during testing if we like.

However, for the case where users are creating their own sdks, we don't
need an error halting their progress. locked-sigs will still function as
it should.

(From OE-Core rev: 6ba86d847275126bf435f144e7d029d10e7ab17d)

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>
2016-05-11 10:33:42 +01:00
Leonardo Sandoval b86f8a0a66 populate_sdk_ext.bbclass : Show logfile in case the SDK EXT installation failed
To avoid lots of output in the SDK EXT installation phase, system redirects
it to a logfile ($target_sdk_dir/preparing_build_system.log) but in case of error,
the contents should be shown so debugging could be faster.

[YOCTO #9576]

(From OE-Core rev: 227d2cbf9e0b8c35fa6644e3d72e0699db9607fa)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:41 +01:00
Ian Reinhart Geiser e81d7a8afe classes/image_vm: allow different filesystems to be used for VM images.
This allows for things like btrfs to be used vs just ext4.
The default value of ext4 is kept so there is no functional
change unless VM_ROOTFS_TYPE is set in the inherting recipe.

(From OE-Core rev: df0b217f3df2c36a32e5c4afaec36a28bfc77bbb)

Signed-off-by: Ian Reinhart Geiser <geiseri@geekcentral.pub>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:41 +01:00
Bruce Ashfield 1ce221da64 kernel-yocto: allow branch auditing to be suspended
When working on the yocto-bsp and kernel-lab update for yocto 1.2
we found it was impossible for a end-user BSP to isolate patches
on a branch, since with the following commit:

  [kernel-yocto: enforce SRC_URI specified branch]

Any new branch would be switched to whatever was specified on the
SRC_URI and undoing the work that the yocto-bsp tool did to support
board specific patches.

To fix this, we'll keep the enforcing of branch consistency enabled
by default, but introduce a variable "KMETA_AUDIT" that when not
set will skip the check.

There's no impact for existing users, and it is only something that
other plumbing commands and tools will need to use (or care about).

[YOCTO: #9120]

(From OE-Core rev: 1d4c120edeb6e45665eafd6962a10ebb89d758eb)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:40 +01:00
Ross Burton 9b9b9832d6 image_types: fix image/compression dependency collection
As compressions can be chained (i.e. cpio.bz2.md5sum) we need to walk the fstype
list to collect the dependencies from each step.

(From OE-Core rev: 05c59ed987cdddc00e9e217032a69197e40a8448)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:40 +01:00
Christopher Larson af4e319861 image_types.bbclass: add WIC_CREATE_EXTRA_ARGS
This'll be of use to pass things like --bmap.

(From OE-Core rev: 90b2738fb07e329cb6b867fb37a929d562f27d15)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:40 +01:00
Christopher Larson 199b348d1d image-live.bbclass: make the INITRD optional
This aligns with image-vm, and makes sense for wic bootimg-efi images, which
don't actually want any of the live installer bits.

(From OE-Core rev: 3d985512acdf1d7821c410d196fe372221555524)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:39 +01:00
Robert Yang d38c92376c packagegroup.bbclass: set LICENSE and LIC_FILES_CHKSUM
* Use "??=" in bitbake.conf to set LICENSE, so that it can overrided by
  packagegroup.bbclass and recipes.

* Use "?=" to set LICENSE and LIC_FILES_CHKSUM to MIT by default
  in packagegroup.bbclass, this won't impact any packagegroup recipes
  which use non-MIT license, since they can be overrided by the recipe.

(From OE-Core rev: a4aa5d9f4adb41f3f3bf3cea62f3e69204ca0b73)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:16 +01:00
Robert Yang a8b35766d4 insane.bbclass: package_qa_check_license -> populate_lic_qa_checksum
The package_qa_check_license() was in do_qa_configure which had a
potential problem, when the recipe sets do_configure[noexec] = "1", then
the license checking won't run, which may hidden license issues. Rename
it to populate_lic_qa_checksum() and run in do_populate_lic[postfuncs] which
is more reasonable (when no populate license, no license checking).

(From OE-Core rev: b7811bbec1ba373d62ace5c4fc56918e53c69d50)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:16 +01:00
Robert Yang 0bf6d578b4 insane.bbclass: remove workdir from package_qa_check_license()
The parameter workdir is not used in package_qa_check_license()

(From OE-Core rev: 9da177c149c657dc337a1f0d241175f1496fa07d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:14 +01:00
Yannick Gicquel f088e693b2 kernel: fitimage: basic support for fitimage signature
This is an initial support of fitImage signature to enable U-Boot verified
boot. This feature is implemented by adding a signature tag to the
configuration section of the generated fit-image.its file.

When a UBOOT_SIGN_ENABLE variable is set to "1", the signature procedure is
activated and performs a second call to mkimage to sign the fitImage file and
to include the public key in the deployed U-Boot device tree blob. (This
implementation depends on the use of CONFIG_OF_SEPARATE in U-Boot.)

As the U-Boot device tree blob is appended in the deploy dir, a dependency
on 'u-boot:do_deploy' is added when the feature is activated.

(From OE-Core rev: 38d675f568ed67505896f20dd9738ce80feece08)

Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:14 +01:00
Yannick Gicquel cb565d5b40 kernel: fitimage: support device tree compiler options
This introduces a new variable to set the device tree compiler options while
calling mkimage ('-D' option). By default, this variable is not set but it can
be defined in a configuration file, as following example:

UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"

(From OE-Core rev: 9a3f541da305c75418c2eec75ade902717a01b69)

Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:13 +01:00
Yannick Gicquel 858ddd508b u-boot: deploy u-boot-nodtb and dtb files
This enable the deployment of u-boot-nodtb.bin and u-boot.dtb files.

(From OE-Core rev: 396a3fb0f55a443f73d6ddd99d8ba83412db2d40)

Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:13 +01:00
Yannick Gicquel d8ae39687a u-boot: basic support of dtb append for verified boot
This introduces a new uboot-sign.class to support U-Boot verified boot.

This part delivers the new class file, with related environment variables, and
a new task intended to run before do_install task and which performs the
concatenation of the u-boot-nodtb.bin and the device tree blob. The 'cat'
command used overrides the u-boot.bin in both DEPLOYDIR & build dir to
propagate the changes in later tasks (do_install, do_package, etc.)

(From OE-Core rev: 27e21c50ada2f5fb6296cce680da4350a229977c)

Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:13 +01:00
Ross Burton e93254b482 autotools: add default for CACHED_CONFIGUREVARS
Ensure that this variable has a default value so that we don't get debug
messages that the variable couldn't be expanded.

(From OE-Core rev: 27fd1bb7969b558864463450e1837c4400a03f9c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:12 +01:00
Stephano Cetola 36a26402fe toolchain-scripts: replace source built-in call
Some shells (e.g. dash) do not support the source built-in. This
replaces it with the dot operator.

[ YOCTO #9535 ]

(From OE-Core rev: eef010bd91933d0c4b917d12e5716aa7e16b7307)

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:12 +01:00
Robert Yang 768c796850 utils.bbclass: note for deprecated base_contains
(From OE-Core rev: 1a0e56630c5c27d8899dd0979ae0b86bbe227881)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:58:45 +01:00
Alexander D. Kanevskiy d73b756d82 image.bbclass: don't execute compression commands multiple times
In case of chained conversion methods are used via COMPRESS_CMD_*
there is chance that some of steps would be executed multiple times.

[YOCTO #9482]

(From OE-Core rev: 94f61c2682e5cfd819ac84535650c3e0a654415a)

Signed-off-by: Alexander D. Kanevskiy <kad@kad.name>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:58:44 +01:00
Ross Burton 002847ab0b autotools: warn when running intltoolize if intltool isn't a dependemcy
(From OE-Core rev: 7ba90d2083970cb2a04afb8fa2ee2d485fef4e4d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:58:43 +01:00
Andre McCurdy e7d3dcbcbb image.bbclass: don't emit redundant IMAGE_CMD_xxx functions
IMAGE_CMD_xxx commands are always inlined within do_image_xxx.

When IMAGE_CMD_xxx is defined as a function (e.g. IMAGE_CMD_btrfs,
IMAGE_CMD_cpio, etc), a redundant copy of the function will be emitted
by default. Remove IMAGE_CMD_xxx 'func' flags to prevent that.

(From OE-Core rev: 118c1ca4d8d62162e87caf287f96d90707ee5903)

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>
2016-04-29 07:58:43 +01:00
Ross Burton f095fdc408 package: ensure do_split_packages doesn't return duplicates
do_split_package() constructs a list of packages that were created as it
iterates through the files, so if multiple files go into the same package then
the package will be repeated in the output.

Solve this by using a set() to store the created packages so that duplicates are
ignored.

(From OE-Core rev: b251f8b212f16b16b88183cc9a959d8cfa24fe3c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:58:43 +01:00
Ruslan Bilovol 4e0d9d1b8f kernel-uimage: change target image to vmlinux
Commit e69525: "kernel: Build uImage only when really
needed" hardcoded target kernel image to zImage for
case if uImage is generated by OpenEmbedded buildsystem.

However not all kernel architectures support zImage
target, for example AArch64 doesn't, so building of
kernel is failing on this step.

So instead of building zImage target that may not
exist for many architectures, build vmlinux target
that exists for all architectures.

Since kernel-uboot.bbclass uses vmlinux anyway for
creating image, there is no side effect on this change.

(From OE-Core rev: ac5d4d42a5903cbcafd7247c282df1cb98f79f08)

Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:58:43 +01:00
Markus Lehtonen a9b503b268 license.bbclass: make sure that image manifest dir exists
Previously, write_deploy_manifest() was relying on
write_package_manifest() to create the subdirectory for the manifest
file. However, do_rootfs may be an empty function so that
write_package_manifest() will not be called and the manifest
subdirectory will not be created, causing a build failure. This patch
fixes that by creating the directory hierarchy inside
write_deploy_manifest().

[YOCTO #9446]

(From OE-Core rev: e2dbe5eb869b8336b91023b83d7ca866197efa73)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-22 16:28:57 +01:00
Otavio Salvador 5f84d6545e syslinux.bbclass: Remove APPEND from variable dependency
The value of APPEND is already being tracked and does impact on the
generated configuration file. This reverts the OE-Core:3c2d7ae5 commit
as it is not need anymore.

(From OE-Core rev: d396cd039ee9c5566670951a86907e8b736c2c7c)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19 21:22:03 +01:00
Mark Hatle 98558405bf image.bbclass: The wrong name is being used for the debug filesystem
[YOCTO #9487]

The debug filesystem file name is ending in "debug_tar", it should be simply
"tar".  Strip the "debug_" piece as necessary.

To avoid deleting the tar ball, when we've asked for just the tarball we need
to check 't' and not 'realt'.

The two hunks were suggested by RP.  I've implemented and verify they work
with the settings:

PACKAGE_CLASSES = "package_rpm"
IMAGE_GEN_DEBUGFS = '1'

IMAGE_FSTYPES_DEBUGFS = "tar.bz2"

IMAGE_FSTYPES_DEBUGFS = "tar.gz"

and

IMAGE_FSTYPES_DEBUGFS = "tar"

(From OE-Core rev: ca088bebfc3603ef206b20501916019f0572f955)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19 21:11:25 +01:00
Richard Purdie 38c7e2d069 image_types: Ensure rootfs dependencies cover DEBUGFS
If you configure a bz2 debugfs, pbzip2-native currently isn't built.
This patch makes sure the dependencies are added.

(From OE-Core rev: dd304a6fdc034d780e01e0055319e4a04aaad9d4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19 21:11:25 +01:00
Otavio Salvador 0c3eaa7952 syslinux.bbclass: The AUTO_SYSLINUXMENU value needs to be boolean
The python code expects AUTO_SYSLINUXMENU to be a boolean value,
otherwise the logic fails. This fixes the code comparing the value to
"1" which is the value expected by the shell script code, counterpart.

(From OE-Core rev: 5c5144806bfde7e19960fe8d841e4f6191ea5972)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19 21:11:25 +01:00
Martin Jansa c2f7da23d0 base.bbclass: Introduce PACKAGECONFIG_CONFARGS variable
* add separate variable for configuration options generated from
  PACKAGECONFIG setting, this helps other bbclasses and recipes
  to take advantage of PACKAGECONFIG mechanism, without including
  other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options
  from PACKAGECONFIG:
  EXTRA_QMAKEVARS_PRE +=
  but with
  conf/distro/include/no-static-libs.inc
  it means getting --disable-static as invalid option inside
  EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried
  to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to PACKAGECONFIG_CONFARGS
  we should also restrict EXTRA_OECONF append only to autotools.bbclass
  like I did for cmake.bbclass

(From OE-Core rev: 0ea4a47bfc27d02594d489b27c029d3d3badf3d4)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19 21:11:24 +01:00
Markus Lehtonen 98bf7dea84 license.bbclass: do write_deploy_manifest in image postprocessing
Call write_deploy_manifest() in image postprocessing phase, instead of
rootfs postprocessing. The reason being that not necessarily all
do_deploy tasks are dependencies of the do_rootfs and we might miss
something.

[YOCTO #9446]

(From OE-Core rev: 1f35b05d60f4e84554c5ee837cb071815e12c91c)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19 21:11:24 +01:00
Marek Vasut 9d2d1ae5a9 kernel: fitimage: Fix do_deploy taskhash mismatch
The kernel_do_deploy_append() uses DATETIME variable , so the taskhash
of the kernel_do_deploy() function changes if fitImage is used. The
buildsystem will complain accordingly:

ERROR: linux-yocto-4.4.3+gitAUTOINC+bcc6509084_1a72cec834-r0 do_deploy: Taskhash mismatch 49a5899a6895dcebd311dcb59870f370 verses 37c8dd3aae44134492a876f21c1b641b for /Yocto/poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb.do_deploy
ERROR: Taskhash mismatch 49a5899a6895dcebd311dcb59870f370 verses 37c8dd3aae44134492a876f21c1b641b for /Yocto/poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb.do_deploy

Fix this by excluding the DATETIME variable from the checksum.

(From OE-Core rev: 42ed25f693a4898f517c9ffc7920e5d994ac692d)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-18 16:28:21 +01:00
Richard Purdie 9ec95575e4 buildstats: Fix tracebacks for early task failures
If a failure occurs early in the task, its possible we can have a
TaskFailed before the TaskStarted event can be triggered. This in
turn causes another traceback as the directory buildstats writes
files into doesn't exist.

Ensure the directory exists so we can see the original error.

(From OE-Core rev: bd0a65ec47ebf55c549c9ef276b201b72396ce2b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-15 06:59:43 +01:00
Ross Burton 632681209d buildhistory: don't alter SDK creation stamps
This class adds functions to the SDK creation hooks, so ensure that they're
ignored in task stamps.

(From OE-Core rev: b15b977d10b5165728c1238b8d67a73719d29d60)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-15 06:59:43 +01:00
Zhenhua Luo 27e202f2d9 meta/classes/qemu.bbclass: set -cpu of ppce5500/ppce6500 to e500mc
The e5500 and e6500 cpu types are not supported by native qemu, set the value
of -cpu to e500mc. Without this change, build will fail for packages which use
qemuwrapper in compile phase due to the following error.
| Unable to find CPU definition

e.g. gobject-introspection

(From OE-Core rev: e06c5c5447350049ebd1a6245fc2dd2608b265e5)

Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-15 06:59:43 +01:00
Dan McGregor 83eac650fd package.bbclass: improve permission handling
Change fs_link_table to be keyed by path, just like fs_perms_table.
When a new entry is coming in for either table, remove any previous
entry for that path. This way later permission file entries override
earlier ones.

[YOCTO #9430]

(From OE-Core rev: b7504ece784fad997e72f4cd89cdf73f24901541)

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14 10:58:34 +01:00
Kai Kang 1e4ee30079 useradd_base.bbclass: remove flock option '-w'
Option '-w 100' of flock is failsafe to finish if dead lock occurs. It
should be impossible to occur dead lock. And option '-w' is not
supported by busybox, so remove it.

[YOCTO #9371]

(From OE-Core rev: 5cf97364685bfb86c6eeaffcebcad62ba9f93ee4)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14 10:58:33 +01:00
Brendan Le Foll 69e20cade6 npm.bbclass: Stop packagenames containing underscores from being generated
Package names cannot contain underscores yet some npm modules use them as part
of the name, replace them with hyphens in the package name.

(From OE-Core rev: fea932c79c8201e3e7649f4443874ea540e33461)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14 10:58:33 +01:00
Bill Randle c4387a8b65 image.bbclass: add DEB_{PRE, POST}PROCESS_COMMANDS to rootfs_command_variables list
Remove duplicate ROOTFS_POSTPROCESS_COMMAND in the rootfs_command_variables list.
Add DEB_PREPROCESS_COMMANDS and DEB_POSTPROCESS_COMMANDS to rootfs_command_variables
list for consistency with the RPM_ and OPKG_ versions of those variables.
Note: the package manager specific pre and post process commands
may removed entirely in Yocto 2.2 or later.

(From OE-Core rev: e951a8970b456de71f6596f061211a48adce3e3a)

Signed-off-by: Bill Randle <william.c.randle@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14 10:58:33 +01:00
Ross Burton a43991d530 rootfs-postcommands: handle broken links when writing manifest
If the manifest link is broken then os.path.exists() returns False so the link
isn't removed, resulting in the os.symlink() call failing as the file already
exists.  Prevent this by using os.path.lexists to check that the symlink itself
exists, not the target.

(From OE-Core rev: 018e3f9f215607a1d7c9fb7780236cc467f3103b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14 10:58:33 +01:00
Richard Purdie 5c8124df2e archiver: Improve debug output
Make the output from the task more informative about which directories
are being referenced.

(From OE-Core rev: 0e306a53c460302ec20192fc35930983781b7a2e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13 20:58:41 +01:00
Ross Burton 965fd3cf9a image.bbclass: use max() instead of indexing booleans
There's some code dotted around OE that uses (a, b)[foo < bar] instead of the
more idiomatic "test and a or b".  Or in this case, just max().

(From OE-Core rev: 7ee49f8a41b4b5c48fd283ac2768564c7ebb5332)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13 10:12:53 +01:00
Bill Randle 9262d2ff39 package.bbclass: handle links in sorted order
When processing links, the directories are processed in unsorted order
which can result in cases like /var/lock -> /run/lock handled before
/var/run -> /run throwing an error for /var/run because /run already exists.
Change the link processing to ensure links are processed in sorted order of
the destination.

[YOCTO #9430]

(From OE-Core rev: d71f4f54b4c22c9382bddce66c1580d875dcfef2)

Signed-off-by: Bill Randle <william.c.randle@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13 10:12:52 +01:00
Ross Burton 29cf26363f sanity: allow sftp and ssh mirrors
URLs in MIRRORS and PREMIRRORS are vetted against a hard-coded list of protocols
which were missing sftp: and ssh:, so add them.

[ YOCTO #9444 ]

(From OE-Core rev: 036b26093e3c88dbb903a4a11d29c32c7516bc02)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13 10:12:52 +01:00
Joshua Lock f5033175ef toaster.bbclass: improve package information collection
The PACKAGES variable doesn't include all packages potentially
generated by a recipe, not least of all because it doesn't include
dynamic packages created via do_split_packages() or similar.

Instead of trying to guess which packages were generated, walk
${PKGDESTWORK}/runtime to find all package information that was
written to disk. This allows us to read all information for the
complete list of packages generated by the recipe.

For example before this patch we get SinglePackageInfo events for
9 packages from ncurses. With the patch applied we get 20 events
for all of the packages created during an ncurses build.

As a bonus we also switch to using the same postfuncs for both
do_packagedata and do_packagedata_setscene as they each result
in a PKGDESTWORK with the relevant directories and files
created.

[YOCTO #9115]

(From OE-Core rev: f1f012962a18d16b1cc22bde836cbb46fe9e6088)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13 10:12:52 +01:00
Richard Purdie 380004b855 archiver: Ensure sstate-inputdir directory is created
Without this, do_archive_sources will fail for the gcc tasks where there is
common source and the other tasks are not added as dependencies. The failure
happens when trying to restore these tasks from sstate.

To fix this ensure the sources directory is created as expected by the
sstate code.

[YOCTO #9433]

(From OE-Core rev: b3afe7d9bd25a943e947de3ec064ea245173c5a8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-12 22:50:21 +01:00
Richard Purdie 5602f64ab8 archiver: Fix ASSUME_PROVIDED issues
Currently the dependencies injected by this class for recipes in ASSUME_PROVIDED
e.g. tar-native or chrpath-native are ignored. We need to use their "replacement"
names, e.g. tar-replacement-native.

This avoids broken archives and sstate failures with these recipes.

(From OE-Core rev: 2279c6d20c2a33283ce9a8d1ef91a8acdad0a20e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 09:03:58 +01:00
Richard Purdie fab626cdf3 distrodata: Exclude DATETIME reference from sstate checksum
Otherwise the task hash changes between server and worker context
leading to changing task checksums.

(From OE-Core rev: c0a701a2165e858ec13b991943cc783bc4186fb9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-11 09:03:58 +01:00
Robert Yang 7fdb0618cf image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAME
If we create hdddirect in the first time, and run bitbake to create
vmimg in the second time, then the previouse created
${IMAGE_LINK_NAME}.hdddirect may can not be found since it contains the
data string which are different. Use IMAGE_LINK_NAME to fix the problem.

(From OE-Core rev: 4aa8f67867a05bdf4a5ba90c8235740910662847)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:45 +01:00
Robert Yang 04e1978a74 image_types.bbclass: fix elf
Fixed:
| DEBUG: Executing shell function do_image_elf
| Cannot open `/path/to/tmp/sysroots/qemux86-64/usr/src/kernel/bzImage': (null)
| WARNING: exit code 1 from a shell command.

The bzImage is in DEPLOY_DIR_IMAGE

(From OE-Core rev: 24536aa578e483fc2a8594628befa4c78a05681c)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:45 +01:00
Robert Yang 513ea49657 image_types.bbclass: set nodesize for btrfs
The default value is 16K which is too big to create image for
core-image-minimal:
rootfs.btrfs is too small to make a usable filesystem
Minimum size for each btrfs device is 41943040.

Use 4K as ext2/3/4 to fix the problem.

(From OE-Core rev: a3e4dc0d800fbae3674b1657c872f70589fc893e)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:45 +01:00
Mark Asselstine 9fe3d01f27 useradd_base.bbclass: prevent variable expansion in $opts
Many user/group operations will involve hashes which will include '$'
followed by a number or even possibly an env. variable name. Passing
$opts to flock requires that we take additional precautions to prevent
the unexpected expansion of these instances.

This was found by an image which used usermod operations to set the
password hash for root. The image could not be logged-in to and
examining /etc/shadow clearly showed that $0 and other $* variables
had been expanded unexpectedly. This change returnes the behavior to
what existed prior to commit 2ebf697b46c42cee8bfa6d2e6087397f8cce385c
[useradd_base.bbclass: replace retry logic with flock].

(From OE-Core rev: d80065642c5a1c95a298b235a8d575460147ede1)

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:45 +01:00
Mark Asselstine fb8e5f903c extrausers.bbclass: drop retry count for perform_user/group* calls
Commit 2ebf697b46c42cee8bfa6d2e6087397f8cce385c [useradd_base.bbclass:
replace retry logic with flock] dropped the 3rd (retry) parameter for
these functions. These are simply being ignored now but we should
remove the retry count to avoid confusion.

(From OE-Core rev: 4ec99da681a6cd164ae177554b23c4fdf2194e2a)

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:45 +01:00
Ed Bartosh 69b3f877f6 toaster.bbclass: strip task from the target
Current code in toaster_buildhistory_dump assumes that bitbake
target doesn't contain task name. It uses target as a part of
path to the files with data that it analizes. It fails to find
files if target contains task name. Stripping task from the
target should solve this.

(From OE-Core rev: 901c4f96c87bb557e747245685b7942624915670)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:44 +01:00
Robert Yang 5e360ca135 image-live.bbclass: fix iso + efi only
When the user only builds iso + efi only, the syslinux-native which
provides isohybrid is required to build iso, so add syslinux-native to
DEPENDS.

(From OE-Core rev: dd1db8a578979a16d993a73b6f8a5720f2849932)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:44 +01:00
Randy Witt 0720425744 devtool: Create unlocked-sigs.inc containing items in the workspace
When a recipe is added to the workspace, the signatures for the tasks
will change. This means that bitbake must be told to allow the
signatures to be different if they are in locked-sigs.inc.

This is done by creating an unlocked-sigs.inc file which contains all
the recipes in the workspace each time devtool reads the workspace.

So not only will necessary things get added, previously added items will
be removed by virtue of them no longer being in the workspace.

This also makes sure that the extensible sdk picks up unlocked-sigs.inc
as part of the configuration.

[YOCTO #9195]

(From OE-Core rev: 6b2b5ffdcb8bf885a1c756ea132e9d2c55e13dcd)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:43 +01:00
Randy Witt 1cb99dd594 populate_sdk_ext.bbclass: Enable locked sigs errors
With the extensible sdk we want there to be an error if a task tries to
run without signatures that match locked-sigs.inc. This patch enables
that error.

[YOCTO #9195]

(From OE-Core rev: fad9bbba1154d68b5dc808d2976aa6484cd49c91)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:43 +01:00
Randy Witt 7e902807cb sstatesig.py: Split single locked sigs check into multiple checks
Add the SIGGEN_LOCKEDSIGS_TASKSIG_CHECK and
SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK variables to replace
SIGGEN_LOCKEDSIGS_CHECK_LEVEL.

SIGGEN_LOCKEDSIGS_TASKSIG_CHECK will no control whether there is a
warning or error if a task's hash in the locked signature file doesn't match
the computed hash from the current metadata.

SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK will control whther there is a
warning or error if a task that supports sstate is in the locked
signature file, but no sstate exists for the task.

Previously you could only have warning/errors for both controlled by
SIGGEN_LOCKEDSIGS_CHECK_LEVEL. This was an issue in the extensible sdk,
because we know sstate won't exist for certain items in the reverse
dependencies list for tasks. However, we still want to error if task
signatures don't match.

[YOCTO #9195]

(From OE-Core rev: 0fe2a5e5ffd01e926d0f3d4c78ad9910296e2d1a)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:43 +01:00
Alexander D. Kanevskiy 4127fef8ba image_types: use compress framework to produce checksums for images
Existing compress framework for producing various compressed versions
of images is powerfull enough to be extended for other uses, e.g. to
convert types of images.

It is possible to use it also to produce image checksums at the time
of image generation. This commit adds support for all supported
at the moment coreutils hashing algorithms: md5, sha1, sha224,
sha256, sha384 and sha512

Usage:
IMAGE_FSTYPES_append = " hddimg.sha256sum"

(From OE-Core rev: 1fbd27122ac4403b8688bc41d128602564a05506)

Signed-off-by: Alexander D. Kanevskiy <kad@kad.name>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 22:57:26 +01:00
Robert Yang b667f4dfdf sanity.bbclass: fix a hardcode in check_path_length()
* Fixed:
  410 -> limit

(From OE-Core rev: e5a4c3f8ea0d27ce2b3a3c33c231e28b7647f16b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 22:57:26 +01:00
Maxin B. John cbe33ecb15 useradd.bbclass: remove user/group created by the package in clean* task
At present, if a recipe is built which creates users/groups via
useradd.bbclass, those users/groups are not removed from sysroot
when the recipe/package is cleaned using clean/cleansstate/cleanall
or when a recipe is rebuild and 'unstaged' from the the sysroot.

The "userdel_sysroot_sstate()" provides that functionality.

[YOCTO #9262]

(From OE-Core rev: b5304ce438666a7418746f4ddd32703ae3188089)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 22:57:25 +01:00
Alex Franco 8109e93a26 patch.bbclass: remove useless path assignment
A path variable is assigned the value of PATH from the
environment, before the PATH is set on the environemnt
from the value of PATH in the bb datastore. This seems
to be an unnecessary leftover.

[YOCTO #8543]

(From OE-Core rev: a3c7c5148017c652661f2c5f79d90aa80dcb479b)

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 10:29:23 +01:00
Ross Burton 37f4f5b8c7 package: do_split_packages: expand variables in extra_depends
If a recipe passes for example extra_depends="${PN}-dev" to do_split_packages()
then it isn't expanded, so the check for the multilib prefix doesn't work.
Solve this centrally by expanding extra_depends inside do_split_packages().

[ YOCTO #9381 ]

(From OE-Core rev: d3875a8111f1d88dcc83219d4700784050988ca3)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 10:29:23 +01:00
Richard Purdie c1436b32cf sanity: Increase minimum git version to 1.8.3.1
The kernel tools assume git > 1.7.9.5, I'm unsure of the exact version but
the oldest in our infrastructure is 1.8.3.1. The git fetcher also currently
has nasty workarounds for git < 1.7.9.2.

Moving to 1.8.3.1 as our minimum version seems sane at this point as the oldest
we're testing/supporting.

[YOCTO #6162]

(From OE-Core rev: dbae075f62ecceadacc6d847e5697b9f3339b168)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 10:29:23 +01:00
Bjørn Forsman f7fed7ce75 license.bbclass: fix warnings when run in unprivileged "container" env
An unprivileged "container" environment like this[1] doesn't have root
account (uid 0) which causes tons of "Invalid argument" warnings:

  $ bitbake ...
  ...
  WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]'
  WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]'
  WARNING: Could not copy license file [src] to [dest]: [Errno 22] Invalid argument: '[src]'
  ...

Fix it by handling EINVAL similar to existing handling of EPERM (which
was added for when not running under pseudo).

[1]: The real environemnt is buildFHSUserEnv from NixOS/nixpkgs, but a
  demonstration of the issue can be done like this:

    $ touch f
    $ unshare --user --mount chown 0:0 f
    chown: changing ownership of ‘f’: Invalid argument

(From OE-Core rev: d00b2250a6afebd7d1373c04b4006290f0cd4043)

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 10:29:23 +01:00
Markus Lehtonen 43071a0d67 externalsrc: avoid race in temporary git index file
Use a unique tempfile as the temporary git index file when determining
the git hash of the source tree. A fixed filename was obviously causing
races (with the git index.lock file) under oe-selftest where multiple
bitbake instances were run against the same source tree at the same
time.

(From OE-Core rev: f81c641022c26a9b89fac769e0f2889eaec5d32f)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06 10:29:23 +01:00
Paul Eggleton b13184cccc classes/buildhistory: fix grammar in comments
Fix a minor grammatical error in the comments here.

(From OE-Core rev: ddc60aea113e587f27df03645620d6eb677ff28a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05 14:33:57 +01:00
Paul Eggleton e5c0a9f067 classes/buildhistory: fix filtering of depends-nokernel.dot
For images we produce a number of filtered dependency .dot files for
readability, the first of which is depends-nokernel.dot which filters
out just the kernel itself (not kernel modules). Unfortunately the
filter specifications hadn't been updated for the dash-to-underscore
removal or the 4.x kernel upgrade, thus the filtering wasn't actually
doing anything.

(From OE-Core rev: ec1077bed0c1538084bceeafb957abe725b13b76)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05 14:33:57 +01:00
Paul Eggleton 4d364f27e7 classes/buildhistory: optimise getting package size list
Invoking oe-pkgdata-util in turn for every package in the list was slow
with a large image. Modify oe-pkgdata-util's read-value command to take
an option to read the list of packages from a file, as well as prefix
the value with the package name; we can then use this to get all of the
package sizes at once. This reduces the time to gather this information
from minutes to just a second or two.

Fixes [YOCTO #7339].

(From OE-Core rev: 51c24904cc1bc823bccc3f179b8d7a192dace168)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05 14:33:57 +01:00
Richard Purdie 7833eb4587 image-vm: Exclude DISK_SIGNATURE_GENERATED from task signature
Otherwise the task hash changes between server and worker context
leading to changing task checksums.

(From OE-Core rev: b5ab6111dbf21d2fc6a6e4aeaa9f105e3e0a23ac)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03 15:51:37 +01:00
Richard Purdie 85ff4ffb8e populate_sdk_ext: Exclude BBTASKDEPDATA from task signature
Otherwise the task hash changes between server and worker context
leading to changing task checksums. The dependency data here is
tracked by other pieces of the signature.

(From OE-Core rev: 1962571a7358fb9c9af2d6cfd1a01673b0d18193)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03 15:51:37 +01:00
Bruce Ashfield 6b8f8a47bd kernel-yocto: enforce SRC_URI specified branch
During the simplication and cleanup of branches and kernel meta data
handling, the ability to force build a branch that didn't match the
meta data was dropped.

There are valid uses cases when a different branch should be built
(testing, development, etc), so we restore the capability with this
change.

If after the kernel meta data is processed the current branch does
not match the SRC_URI specified branch, a warning is generated
about the impending branch switch and that the user should double
check that they are building what they expect.

  WARNING: After meta data application, the kernel tree branch is standard/base. The
  WARNING: SRC_URI specified branch standard/gt. The branch will be forced to standard/gt,
  WARNING: but this means the board meta data (.scc files) do not match the SRC_URI specification.
  WARNING: The meta data and branch standard/gt should be inspected to ensure the proper
  WARNING: kernel is being built.

Reported-by: Steve Sakoman" <steve.sakoman@intel.com>
(From OE-Core rev: d91a668bc0f6c2cfc52174b4039c7ea0d84e8d4d)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03 15:51:37 +01:00
Bill Randle a2bf9e39b6 insane.bbclass: avoid false positives on library location
package_qa_check_libdir() reports that the file libsoletta.so.0.0.1-gdb.py
in /usr/share/gdb/auto-load is in the wrong location. Before generating
a warning for files in non-standard locations, check that the file is an
actual elf file (and hence a real library file).

[YOCTO #9215]

(From OE-Core rev: a3ad36b9a435e7c3d97f114809561198b8abe6cf)

Signed-off-by: Bill Randle <william.c.randle@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03 15:51:36 +01:00
Robert Yang 1f2f43c5b0 grub-efi.bbclass: use GRUB_ROOT rather than APPEND for root device
Use APPEND for grub's root device may cause confusion, for example, when
building efi + pcbios, there maybe be two root=/dev/ram0, one of them
would be carried to the installed target, and the target would fail to
boot. Use GRUB_ROOT to fix the problem, and remove SYSLINUX_ROOT from
APPEND will fix the problem.

[YOCTO #9354]

(From OE-Core rev: 1f46fe7d501644c83f81dc4cc3310073c804f797)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03 15:51:35 +01:00
Richard Purdie 370a50a27b base: Fixup PACKAGECONFIG incorrect mappings
PACKAGECONFIG doesn't work in cross-canadian recipes at the moment as
DEPENDS are prepended with mlprefix.

A recipe is either nativesdk, native or target so adjust the if
statements accordingly, use inherits_class for more accurate recipe
classification and add cross-canadian support.

(From OE-Core rev: 4a172868a9423afb8a602413ef4935423ce51a5d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03 15:51:35 +01:00
Ulf Magnusson dea34232b8 classes/packagegroup: Refactor code to be simpler
This makes the code a bit shorter and more readable.

(From OE-Core rev: f092f99a0d7116ba4347b22f3f81b4eac4808e62)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03 15:51:35 +01:00
Freudiger Raphael 25102393b4 image: Fix debugfs image type recursion loop
The debugfs prefix is striped from t, but not from baset.
Therefore baset never matches t.

(From OE-Core rev: 2862cbf74925cb084d3f9c206d3448112ba6a0aa)

Signed-off-by: Freudiger Raphael <raphael.freudiger@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03 15:51:34 +01:00
Andre McCurdy 0012b9057f base.bbclass: avoid duplicate call to d.getVar('LICENSE', True)
Reuse the 'license' variable, instead of calling
d.getVar('LICENSE', True) again.

(From OE-Core rev: 32a1df86877cd8e70baccd858847fa927508f159)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-01 07:14:30 +01:00
Andre McCurdy efe73cb5a7 base.bbclass: drop obsolete HOSTTOOLS_WHITELIST_GPL-3.0
base.bbclass sets 'check_license' to False (and therefore skips
license checking completely) for native, nativesdk, etc recipes
(ie anything which could potentially be classed as "host tools"),
so supporting a dedicated whitelist of GPLv3 host tools is not
necessary.

(From OE-Core rev: 8fc8b60005e7641861324c8541fb45058e7aab8e)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-01 07:14:30 +01:00
Robert Yang 88ea0b9613 image-vm.bbclass: remove invalid code
It has been done in syslinux.bbclass.

(From OE-Core rev: 4bbd512c4eef6c449d99dbe35271dafc6e7bfe03)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:38 +01:00
Robert Yang 4d1df2cfe8 image-live.bbclass/image-vm.bbclass: remove duplicated code
Move the common code to live_vm_common.bbclass and remove duplicated ones.

(From OE-Core rev: 4a70cc59a0350f06d4cc48c12c3053a39191ba07)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:37 +01:00
Robert Yang d6d75260fa bootimg.bbclass: merge it into image-live.bbclass
They are doing the same things: create live images, merge them into one
bbclass makes it easy to understand.

(From OE-Core rev: bfd4d95210b3f841aa2e7c5a06ac89667523438d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:37 +01:00
Robert Yang 723fa563a0 boot-directdisk.bbclass: merge it into image-vm.bbclass
They are doing the same things: create virtual machine images, merge
them into one bbclass makes it easy to understand.

(From OE-Core rev: c314fda9d739560b6a08e627e7aabf105d97c8c4)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:37 +01:00
Peter Kjellerstedt aa13b97286 image.bbclass: Make unneeded packages for a read-only rootfs configurable
Previously the list of packages that are considered unneeded for a
read-only rootfs was hardcoded. This made it impossible to, e.g., have
shadow installed on a system with a read-only rootfs, but where /etc
is mounted writable.

This also lists ${VIRTUAL-RUNTIME_update-alternatives} rather than
update-alternatives (as was previously the case) since this should
actually remove the intended package.

(From OE-Core rev: e3b881d4168e5b02ff00f5c470ba472ab8bbc747)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:37 +01:00
Paul Eggleton 2aec71e028 oe-publish-sdk: exclude sstate-cache if publishing minimal SDK
If SDK_EXT_TYPE is set to "minimal" then the SDK won't contain many
sstate artifacts, and you're required to set up an sstate mirror in this
case anyway so there's no point publishing the "stub" sstate-cache
directory from within the SDK since it won't be useful for update
purposes and may be confused with the real sstate-cache.

There is however a possibility that people might publish the real
sstate-cache directory under the same output directory provided to
oe-publish-sdk, thus deleting it after extracting (as we were doing with
other files we wanted to clean up at the end) would be problematic,
besides which extracting it and then deleting it is wasteful. Thus,
introduce a "-p" command line option to the SDK installer that we can
use to tell tar not to extract the items we don't want when publishing.
This has the added benefit of mostly keeping references to these in the
place they belong i.e. in populate_sdk_ext.bbclass.

(From OE-Core rev: 774b85d42db1d81936d4e4af4f6fb2c57cb51d2c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:37 +01:00
Paul Eggleton 591b97c6be classes/populate_sdk_ext: support setting vars from environment at build time
When running bitbake you may pass in values of variables from the
external environment (making use of BB_ENV_EXTRAWHITE), and you may
choose to do this when building the extensible SDK, for example:

  MACHINE=qemuarm bitbake -c populate_sdk_ext core-image-minimal

You would naturally expect those settings to be reflected in the
extensible SDK itself; however they were not, since we were only
considering local.conf and auto.conf. Check the variables mentioned in
BB_ENV_EXTRAWHITE to see if any are different than the values set in
local.conf/auto.conf and add lines setting them in the SDK's local.conf
if so.

Fixes [YOCTO #9339].

(From OE-Core rev: 2bfed75c48a6f6596ded9cb64cb96f00510f914e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:36 +01:00
Robert Yang b75505ec33 image-live.bbclass: DEPENDS on syslinux
The mkisofs requires syslinux/isolinux.bin which is provided by
target syslinux, for pcbios, the depends is already there, but for
EFI, it isn't, so add the depends.

(From OE-Core rev: e9adedd32a7f2015e58efe2f460a99e8d745b4c6)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:36 +01:00
Richard Purdie 2123a7ef28 sanity.bbclass: Use pythonexception to raise real exceptions without backtraces
If the sanity code encounters a version change is doesn't understand, the current
output is unreadable and confusing for the user, particularly due to the presence
of the backtrace.

Use improved functionality in bitbake to improve this and correctly pass python
exceptions around.

[YOCTO #9291]

(From OE-Core rev: a0860e308645f17dbf4b9005b2fc0e9869d730bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 09:15:04 +01:00
Richard Purdie 1b2df6e942 uninative: Switch md5sum -> sha256
There are various concerns about md5 so use sha256 instead.

(From OE-Core rev: a88603cb2ffd4f995e16349a389902eb884252e5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 09:15:03 +01:00
Robert Yang 71db079bc5 archiver.bbclass: addtask do_deploy_archives_setscene
There was a do_deploy_archives_setscene, but no addtask.

(From OE-Core rev: 81db27c208468dc460e9d8f0063ad24b2b37dc97)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-30 21:24:02 +01:00
Khem Raj ab20659288 siteinfo: Fix musl 64bit targets
Found that ssize_t was being wrongly computed for mips64 musl
because it was using wrong cache files.

alias them to glibc versions, musl doesn't _yet_ have target
incompatibilities to note in siteinfo thankfully.

Add musl aliases for aarch64 and ppc64 targets

(From OE-Core rev: d3867743e7028046454dc135efeefadfa382f463)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-29 23:20:13 +01:00
Patrick Ohly 0883affe7b buildhistory.bbclass: create image directory when needed
buildhistory_get_imageinfo() assumed that the buildhistory directory
for the image had already been created earlier. That assumption is not
true for special images (like the virtual swupd images from
meta-swupd) where the entire traditional do_rootfs/do_image is
skipped.

Creating files-in-image.txt still makes sense for such images, so
support them by creating the directory also in
buildhistory_get_imageinfo().

(From OE-Core rev: 723328319ee53235969ec9cce7ff5d7729dcf8d7)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-29 23:20:13 +01:00
Hongxu Jia 55cd35bd18 conf/bitbake.conf package.bbclass: fix dbg package not contain sources while -fdebug-prefix-map used
Tweak DEBUG_FLAGS to use "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
as source target path in DWARF. While use gdb to debug binary, it could
work with sources in dbg package.

While -fdebug-prefix-map is used for compiling, we do not need invoking
debugedit to edit DWARF at do_package time, but list where sources files
are.

The copydebugsources uses the list to copy sources to dbg package. It
works whether -fdebug-prefix-map used or not.

[YOCTO #9305]

(From OE-Core rev: ecb56a6ae0c870af680da03db9d39703b525fc98)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:51 +01:00
Markus Lehtonen e2b919c1f4 externalsrc: remove nostamp from do_configure
Extend the srctree_hash_files() function in externalsrc.bbclass to
handle non-Git source trees.  If the source tree is not a git
repository, srctree_hash_files() now simply adds the whole source tree
as a dependency, causing bitbake to basically hash every file in it.
Hidden files and directories in the source tree root are ignored by the
glob currently used. This has the advantage of automatically ignoring
.git directory, for example.

During the first bitbake run preparing of the task runqueue may take
much longer if the source tree is not a git repository. The reason is
that all the files in the source tree are hashed.  Subsequent builds are
not significantly slower because (most) file hashes are found from the
cache.

[YOCTO #8853]

(From OE-Core rev: a797abe08bfe4144e120c984d1718c2cc3d87c0a)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:50 +01:00
Markus Lehtonen bbfc210051 externalsrc: do not use do_configure[nostamp] for git srctrees
Be a bit more intelligent than mindlessly re-compiling every time.
Instead of always using 'nostamp' flag for do_compile run a python
function to get a list of files to add as 'file-checksums' flag. The
intention is to only re-run do_compile if something in the source tree
content changes.

This python function, srctree_hash_files(), works differently, depending
if the source tree is a git repository clone or not. If the source tree
is a git repository, the function runs 'git add .' and 'git write tree'
to get a hash of the working tree and writes this hash into a file under
the .git directory. This file containing the hash is then returned as
the file for the task to depend on. Hash is changed if any changes are
made in the source tree causing the task to be re-run. A trick is used
to parse the recipe every time so that the hash file gets updated.

If the source tree is not a git repository behaviour remains the same.
In this case srctree_hash_files() currently sets the 'nostamp' flag for
do_compile causing it to be re-run every time.

This method of tracking changes source tree changes to determine if
re-build is needed does not work perofectly, though. Many packages are
built under ${S} which effectively changes the source tree causing some
unwanted re-compilations.  However, if do_compile of the recipe does not
produce new/different artefacts on every run (as commonly is and should
be the case) the re-compilation loop stops. Thus, you should usually see
only one re-compilation (if any) after which the source tree is
"stabilized" and no more re-compilations happen.

[YOCTO #8853]

(From OE-Core rev: a26becdf981b35d7ef8524f9e65c25a74b842f1d)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:50 +01:00
Mariano Lopez 9ee403b310 archiver.bbclass: Just archive gcc-source for all gcc recipes
It is pointless to archive several times the gcc source.
This change will archive gcc source once, for the gcc-source-{PV}
recipe.

[YOCTO #9327]

(From OE-Core rev: 2f53fb2ae561e2eb599682ba95ce83ad1b4b7ada)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:50 +01:00
Jussi Kukkonen cef8bc9e80 gio-module-cache: Add class for Gio modules
The new class uses gio-querymodules tool on postinst and postrm.
This regenerates the module cache which is useful to avoid loading
modules that are not needed at runtime: If a Gio module is not
listed in the cache file it will always get loaded.

* Add a postinst-intercept 'gio-module-cache': it runs
  gio-querymodules using qemuwrapper. This is required because the tool
  actually loads the modules to generate the cache.
* Add a gio-module-cache class that adds postinstall and postrm
  scripts. In the sysroot population case use the new intercept.
* Inherit the new class in glib-2.0, glib-networking and gconf.

Fixes [YOCTO #9241].

(From OE-Core rev: 168cf5502a2dda78348cc9679e37bed0c69c0208)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:49 +01:00
Ed Bartosh d6cb46cafd image.bbclass: run wicenv task only for wic images
Currently do_wicenv task is run for all images. However, its
result is used only to produce wic image. It's better to
run this task only for wic images. If another rootfs is
required to produce wic image, dependency to its do_wicenv
must be added to the wic image recipy.

Stopped running do_wicenv for all images. Added explicit
dependency to this task in wic-image-minimal recipe.

[YOCTO #9095]

(From OE-Core rev: b81c176fb2f1ee818b6049c39ef353a7d7d5e078)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:49 +01:00
Joshua Lock 036167693a rootfs-postcommands: don't write manifest when IMAGE_MANIFEST empty
Return early in write_image_manifest () if the IMAGE_MANIFEST
variable is unset. This allows us to prevent writing of the
manifest where we prevent images being created for a recipe by
unsetting IMAGE_FSTYPES.

(From OE-Core rev: 54387be24d6a157574496f1b20b21c7fc2a51d3e)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:49 +01:00
Alexander Kanavin abd5b24ff7 bitbake.conf: rename 'gobject-introspection-data' machine feature to 'qemu-usermode'
The new value is more general and better reflects what having the feature really means.
Introspection data, then, is built only if 'gobject-introspection-data' is in
DISTRO_FEATURES and 'qemu-usermode' is in MACHINE_FEATURES.

(From OE-Core rev: 9927a3d72e2272d8e3dc4785ba02e27802ee1c6c)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:49 +01:00
Khem Raj f3a92ff7d3 kernel.bbclass: consider .csp firmware files
Fixes kernels which package sb16 firmware e.g.

directories were installed but not shipped in any package:
  /lib/firmware/sb16
  /lib/firmware/sb16/ima_adpcm_playback.csp
  /lib/firmware/sb16/ima_adpcm_init.csp
  /lib/firmware/sb16/mulaw_main.csp
  /lib/firmware/sb16/ima_adpcm_capture.csp
  /lib/firmware/sb16/alaw_main.csp

(From OE-Core rev: 826bc56e77bd9a53f6bc19548549f6d92de09911)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:48 +01:00
Alex Franco 201d9d37f0 icecc.bbclass: replace icc with icecc
Make this class more clear and consistent, and avoid
confusion with the Intel C compiler (icc); the changes
affect function names, and calls to those functions

[YOCTO #8934]

(From OE-Core rev: daf59103c26ca8f1be7229f73a5b496d862e1f1e)

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:48 +01:00
Alex Franco da00f6cc42 icecc.bbclass: expand package arch
Expanding PACKAGE_ARCH might be necessary as it is being
checked against to determine if this is allarch

[YOCTO #8934]

(From OE-Core rev: 45c59ffb742568e4f0d8cf53e4dfba5198bdc9f0)

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:48 +01:00
Alex Franco 3f1702cc1f icecc.bbclass: add icc_is_allarch inherit check
Additional check for inheritance of allarch.bbclass, for when
checking that PACKAGE_ARCH == "all" is not enough to be sure
a recipe is "allarch"; e.g. nativesdk-buildtools type recipes

[YOCTO #8934]

(From OE-Core rev: 0f9a3b445186b58d2c1f731da94c6b3a05494369)

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:48 +01:00
Paul Eggleton 39170fe6f1 classes/sanity: use proper multi-line string literals
A python string literal isn't meant to be split over multiple lines
unless it is explicitly multi-line. Use three quotes to indicate that.

(From OE-Core rev: 8cdb505bb3d9748be1744f36cbbfb4f62fa20b67)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:48 +01:00
Ross Burton 07f0af3d33 uninative: don't try to relocate static binaries
patchelf will understandably error out if there isn't a .interp section to
relocate, so don't try to relocate static binaries.

(From OE-Core rev: 2a1803e64174825d9392094ae6e680a1ac96eb4a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26 07:34:58 +00:00
Ross Burton 10b6037624 uninative: ensure patchelf errors are visible
(From OE-Core rev: 9840bfbe7d860bdb7ad9ac444a82f95510d48c2d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26 07:34:58 +00:00
Mariano Lopez d7cf2c3230 archiver.bbclass: Fix tar name for git repositories
When archiving the original source, the git repositories have the name as
they are in the $DL_DIR plus the source revision; i.e.
"git.yoctoproject.org.linux-yocto-4.4.git.89419d8b90_dadb436904.tar.gz".
This change set the tar name to $PF.tar.gz instead, to have consistency with
the others archives created by the class.

(From OE-Core rev: 3f903cb767150e316337929d72559cad6931039a)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:17 +00:00
Mariano Lopez 2cb4cb7a6c archiver.bbclass: Fix gcc-source corner case
Bitbake couldn't add the task ar_configured when
trying to archive the configured source for
gcc-source-${PV} recipes. This is because the task
depended in the do_configure and this task doesn't
exist for gcc-source.

This fix allows to archive configured gcc-source recipe.

(From OE-Core rev: 5be5eae2e1630a151a9f5866d60325d439150ced)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:17 +00:00
Mariano Lopez c29eea0df8 archiver.bbclass: Fix use of ARCHIVER_WORKDIR and ARCHIVER_OUTDIR
Currently do_unpack_and_patch() and do_ar_configured() are using
the ARCHIVER_OUTDIR as the ARCHIVER_WORKDIR, this lead to have
duplicated files inside the tars when using the archiver class
for patched and configured source.

(From OE-Core rev: 09dfc99a813090043262529beb6d900900e983dc)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:17 +00:00
Mariano Lopez 8b7ee6ebeb archiver.bbclass: Don't expand python functions in dumpdata
Currently the dumpdata task expands python data in the datastore, in
some functions this causes a silent error and the task will fail.

The change also rewrite the function to make a bit clearer.

(From OE-Core rev: e3239ade430ff48e00dce47066abe8fcb990af61)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:17 +00:00
Bill Randle e33124f828 sanity.bbclass: check host tool dependencies on change in NATIVELSBSTRING
When a user upgrades their host distro, it may no longer have all the
required tools installed, but this won't be caught by bitbake resulting
in possible build errors. Rather than check for installed tools on every
startup, use the NATIVELSBSTRING change as indicator to rescan for host
tool dependencies. Store the NATIVELSBSTRING in the sanity_info file.

[YOCTO #8585]

(From OE-Core rev: e838b581397bbea9a0f4d74648fcc250073db1ae)

Signed-off-by: Bill Randle <william.c.randle@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:16 +00:00
Brendan Le Foll 959b7f204e package.bbclass: Treat .node files same as .so when checking what to strip
Typically in a node/npm compiled modules the module is named .node. This is a
binary module without a wrapper so it can actually be relatively large if
unstripped.

(From OE-Core rev: d14bc2667575bc0e29b9e90d80c01703639b76f1)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:16 +00:00
Robert Yang e0bc781ce0 bootimg.bbclass: only inherit syslinux when pcbios
syslinux.bbclass should not be seen when use efi.

(From OE-Core rev: f994eef0aeae861857756d3cc05c49cca17bd12b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:16 +00:00
Robert Yang 1b1de89304 grub-efi.bbclass: make it can build vm and live together
* Make it can build vm and live (e.g., iso + vmdk) together as we did
  for syslinux.
* GRUBCFG -> GRUB_CFG as other GRUB_FOO vars

(From OE-Core rev: e38039e43f22d55a443064efa91752e2943fda79)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:16 +00:00
Robert Yang 4ebaeb281b bootimg.bbclass: fix settings for grub-efi.bbclass
Fixed:
- Found potential conflicted var LABELS ...
  Set LABELS to "boot install" would build out broken images when build
  vm + live together, use set_live_vm_vars() to fix the problem.

- Use ROOT and LABEL in boot-directdisk.bbclass and image-foo.bbclass,
  they are not only used by syslinux.bbclass, but also grub-efi.bbclass,
  add "SYSLINUX_" prefix would mislead users.

(From OE-Core rev: d7d1e0193c94abb1cd2daf1c298c8c1788f3616d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:16 +00:00
Bill Randle 421289cbcc sanity.bbclass cleanup
Limit search for a version var name to start at the beginning of a line,
otherwise, if the var name is used in a comment, that comment line will
be replaced, rather than the desired assignment line.
Move bblayer update message into function where it's actually updated,
rather than assuming all successful config file update are to the
bblayers.conf file.
Replace a stray tab with spaces for consistency.

[Fixes YOCTO #9318]

(From OE-Core rev: 7c1e53bb802f021f06231243077d0e007a64274c)

Signed-off-by: Bill Randle <william.c.randle@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:15 +00:00
Robert Yang 3e5c5fe330 gpg_sign.py: get rid of pexpect
The python-expect is not installed on the distro such as Ubuntu by
default, and we can get rid of it.

Use RPM_GPG_PASSPHRASE to replace of RPM_GPG_PASSPHRASE_FILE which is
more straightforward.

(From OE-Core rev: 4a8a74c62836a20610daf029d4cec0b3087758b2)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:14 +00:00
Paul Eggleton 11c1d30152 devtool: add: delete externalsrc files on npm recipe do_install
The npm class just installs whatever is in ${S}; if you're using
externalsrc in conjunction with it the symlinks (oe-workdir and oe-logs
by default) plus singletask.lock will end up in the final package, which
isn't really right. Introduce a variable so we know the path the files
will be installed into within npm.bbclass, and append to do_install
within the workspace bbappend to delete the files.

(From OE-Core rev: 766845e06db9d7d595e836ea1364c16fa132a413)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Paul Eggleton 58d2e5625f classes/populate_sdk_ext: parse metadata on minimal SDK install
Instead of skipping the build system preparation step within the
extensible SDK install process when SDK_EXT_TYPE is "minimal", run
bitbake -p so that the cache is populated ready for the first time
devtool is run.

(From OE-Core rev: 6b38a991a3475fb82889428b94563968c7570473)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Paul Eggleton 50addfb97b classes/distutils*: don't hide logs when setup script fails
We need to see the output of the setup script in the error message
because what we are having bbfatal print here doesn't completely
describe what went wrong, thus we should use bbfatal_log here and not
bbfatal.

(From OE-Core rev: 970a02061b474a238f57cd0cc4db7b62e36dfa3d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Paul Eggleton 0ec30c7a68 classes/packagegroup: drop complementary -ptest if ptest not in DISTRO_FEATURES
If ptest isn't in DISTRO_FEATURES, there won't be any -ptest packages
and thus no need for the -ptest package for the packagegroup either.

(From OE-Core rev: 52f9b12601c02f1585438f890f847b4596170362)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Paul Eggleton d96ea299b3 classes/packagegroup: fix dbg/dev/ptest complementary packages
OE-Core commit 8981ed20234c42dc1f5cdef802ebe7214bd55238 (from 2013)
caused a regression where -dbg/-dev/-ptest packages weren't generated
for packagegroups because we weren't setting ALLOW_EMPTY for them.
Break out the code for adding complementary groups to its own
conditional so we can set ALLOW_EMPTY at the same time.

(From OE-Core rev: 340e9d619c881f320070474d5c4674dcaeabad35)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Markus Lehtonen 62ddde6ebe externalsrc: use shared stamp directory if B=S
We have a common build directory for all target architectures if
externalsrc is used and ${B}=${S}. In this case we also need to have a
common stamp directory. The reason is that e.g. changing MACHINE will
basically "invalidate" the artefacts in ${B} (wrt. to the new MACHINE)
but old stamp files with matching hashes from an earlier build might be
available in the machine-specific stamps directory and tasks would not
be correctly re-run.

Previous attempt in f44f12af346888bdeb3ae01a275cb5dd4396b505 to handle
this correctly was faulty as it threw some spurious warnings and caused
do_configure to be re-run in every build if that would not be necessary.

[YOCTO #8950]
[YOCTO #9237]

(From OE-Core rev: f5031fb37ceef83c85f0dfec773da75c05b2a631)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:29 +00:00
Andre McCurdy ac347da759 gobject-introspection.bbclass: wrap comments at 80 columns
Whitespace and comment updates only, no functional changes.

(From OE-Core rev: 738393ea98baec364d3da117a1307a39d348b660)

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>
2016-03-20 23:12:29 +00:00
Patrick Ohly cad415dc2f sanity.bbclass: allow customizing config file update error messages
The default file pattern may be amiguous and "meld" might not always
be the preferred tool, so allow distros to override those parts of the
error messages.

(From OE-Core rev: 98fc50436dfa5d0e5bee0930154a5563ffc8151d)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:28 +00:00
Patrick Ohly 96a5cb41fd sanity.bbclass: fix success message when config file was updated
The code now iterates over different config files, but always printed a
message about conf/bblayers.conf for each file.

(From OE-Core rev: af55727fc1920c4c23476304f57a3720835ec203)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:28 +00:00
Patrick Ohly 805aca8192 sanity.bbclass: expand error messages for version checks
The ${WORKDIR} variable was not getting expanded (anymore?), leading to
less helpful error messages like:

   Exception: NotImplementedError: Your version of bblayers.conf has the wrong LCONF_VERSION (has 7, expecting 8).
   Please compare your file against bblayers.conf.sample and merge any changes before continuing.
   "meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample"

   is a good way to visualise the changes.

   ERROR: Execution of event handler 'check_sanity_eventhandler' failed

After adding expansion, embedding ${LCONF_VERSION} and ${LAYER_CONF_VERSION}
in the error message seems a bit more readable and consistent.

(From OE-Core rev: 7fd08497cf780018fa144a870bdea0e7a69dae20)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:28 +00:00
Kai Kang 57a525ca72 useradd_base.bbclass: replace retry logic with flock
When perform useradd during populate sysroot, it locks files passwd.lock
and group.lock at same time. And then it meets a dead lock issue
randomly.

Use flock to reslove it by using an universal lock directory for all the
user and group related operations.

[YOCTO #9022]

(From OE-Core rev: 2ebf697b46c42cee8bfa6d2e6087397f8cce385c)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:27 +00:00
Patrick Ohly 5d06f00471 image.bbclass: track ROOTFS_POSTUNINSTALL_COMMAND in do_rootfs vardeps
The list of variables influencing do_rootfs was not updated when
introducing ROOTFS_POSTUNINSTALL_COMMAND. As a result, making changes
in commands listed there or the variables they depend on did not trigger
a re-run of do_rootfs.

(From OE-Core rev: 66b461ce9df7ed06d7651b9b54a49a950b97a1d4)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:26 +00:00
Richard Purdie 637b3c8259 uninative: Add a fix for icu-native to use the correct ABI
If no -std= option is passed to icu's configure, it defaults to CXX11.
This isn't what we want for uninative, so pass an explicit option
which selects an older ABI on newer versions of g++.

This avoids the __cxa_bad_array_new_length@CXXABI_1.3.8 symbol
being used.

(From OE-Core rev: ac59063bee0e32d0737340974f657341717a6abe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12 22:11:48 +00:00
Paul Eggleton 0eb52b91a7 classes/buildhistory: record a few more variables for extensible SDK
We've recently added SDK_EXT_TYPE and SDK_RECRDEP_TASKS and these will
have an effect on the size and functionality of the SDK, so record them
in sdk-info.txt.

(From OE-Core rev: 1be0ae80f97bdee758232ec5397c09d73d57e1e0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12 22:11:48 +00:00
Ricardo Ribalda Delgado cbb4c5b0f1 package-deb: Ignore circular dependencies
If a package depends on itself apt-get fails to install it with the
error attached to this patch.

This patch checks for this conditions and notifies the user so the
recipe maintainer can fix his RDEPENDS variable.

root@qt5022:~# apt-get install perl-module-cpan
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  perl-module-cpan
0 upgraded, 640 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5964 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
E: Internal error: MaxLoopCount reached in SmartUnPack (2) for
perl-module-cpan:amd64, aborting
E: Internal error, packages left unconfigured. perl-module-cpan:amd64
root@qt5022:~# apt-get install perl-modules

(From OE-Core rev: d8bf148c3b740254ed23d52cf244f0f6e9c7a4ab)

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12 22:11:47 +00:00