Commit Graph

3725 Commits

Author SHA1 Message Date
Michael Jones d3b221d183 image.bbclass: remove comment that readonly only works for sysvinit
Should have been removed with
92f956d tweak read_only_rootfs_hook to also support systemd based systems

(From OE-Core rev: e8bd2783870e71b42c902a31bd6521d564915e99)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-05 18:01:06 +00:00
Jackie Huang 8403b75108 Revert "qt4*.bbclass: disable build qt on mips64 with 64 bits userspace"
This reverts commit 17890ebd637da0b3bf78804002d8b4f0ace078d2.

qt4 is upgraded to 4.8.6 and this is fixed by:
c889b40 qt webkit: add support for MIPS64 platforms

so revert the commit.

(From OE-Core rev: 28abbcc5cc4fcea23528027ef2c0faebcd9474c8)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-05 18:01:05 +00:00
Paul Eggleton 8ad1d1d6f6 kernel-yocto.bbclass: fix shell syntax error
Spaces aren't valid around = in an assignment statement (not even with
bash).

(From OE-Core rev: fb419b1a3f5dbc5e5019be9d09c4acdbeb460c19)

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>
2014-12-05 18:01:05 +00:00
Cody P Schafer 60d504b431 cmake: supply CMAKE_AR in toolchain file
(From OE-Core rev: 79144da00f005b5a3ab8f7404730216cfc684616)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-05 18:01:04 +00:00
Laszlo Papp 1ecad61a9d toolchain-script: Add support for ccache builds with the SDK
It is necessary to have an SDK for developers who build their software with
ccache to speed up the compilation. Without resolving this, unfortunately the
compilation will fail for them.

(From OE-Core rev: 1d31ddb856a80ba9da1a64ed5d701dc0f7351ef7)

Signed-off-by: Laszlo Papp <lpapp@kde.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:24:00 +00:00
Hongxu Jia 5030c7fb3e compress_doc.bbclass: support update-alternatives
While doc file make use of update-alternatives to fix confliction,
we should reconfigure update-alternatives for doc compression.

Such as util-linux-doc:
...
update-alternatives --install /usr/share/man/man1/last.1 last.1
  /usr/share/man/man1/last.1.util-linux 100
...
was updated by doc_compress to
...
update-alternatives --install /usr/share/man/man1/last.1.bz2 last.1.bz2
  /usr/share/man/man1/last.1.util-linux.bz2 100
...

(From OE-Core rev: ba4dd1afc2476259eff52f8a68fba1344e0f0474)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:23:59 +00:00
Hongxu Jia 887ffa0d7e compress_doc.bbclass: improve manual file detection
The previous detection missing the following manual file:
...
gawk-doc/usr/share/man/man3/readfile.3am
libpcap-doc/usr/share/man/man3/pcap_dump_open.3pcap
...

We use re to imporve it.

(From OE-Core rev: 886685d207bd5e6e2e236a7c5591f62f5de26090)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:23:59 +00:00
Merten Sach 97d5b997cf metadata_scm: Fix crash due to uncaught python exception
Function base_get_metadata_svn_revision was crashing due to an uncaught
IndexError exception.

The except notation without parentheses is legacy syntax. It is the equivalent
to 'except IOError as IndexError' which is not what we want here.

The change catches both exceptions.

(From OE-Core rev: 33bea949bae54ddc89aa83cf07d7b1ee62e2b393)

Signed-off-by: Merten Sach <msach@mailbox.tu-berlin.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:23:59 +00:00
Khem Raj ec4781194c package.bbclass: Create empty key/value if not there for shlib_provider
When we use ASSUME_SHLIBS,e.g.

ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"

then we end up with errors like below when using shlibs2 (dizzy+)

File: 'package_do_shlibs', lineno: 216, function: package_do_shlibs
     0212:            dep_pkg = dep_pkg.rsplit("_", 1)
     0213:            if len(dep_pkg) == 2:
     0214:                lib_ver = dep_pkg[1]
     0215:            dep_pkg = dep_pkg[0]
 *** 0216:            shlib_provider[l][libdir] = (dep_pkg, lib_ver)
     0217:
     0218:    libsearchpath = [d.getVar('libdir', True),
d.getVar('base_libdir', True)]
     0219:
     0220:    for pkg in packages.split():
Exception: KeyError: 'libEGL.so.1'

This is because the entry which is being populated does not exist
so lets create it if its not already there.

Change-Id: I9e292c5439e5d1e01ea48341334507aacc3784ae
(From OE-Core rev: a64f81fcef42172f788cec7a63bb4672eac99f94)

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>
2014-12-03 12:23:58 +00:00
Ross Burton e89a5d046e uboot-config.bbclass: don't skip defaultval
This field is now internal and won't be seen.

(From OE-Core rev: cce39741bb9d1b0166c7fd63506f96abaa0d8af6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:23:56 +00:00
Ross Burton cd904146d6 base.bbclass: don't skip defaultval
This field is now internal and won't be seen.

(From OE-Core rev: 9a715be3b2b4396495f2f8c10dc28b33f206efe4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:23:56 +00:00
Aníbal Limón 21924451c1 distrodata_class: checkpkg make usage of latest_versionstring methods in bitbake fetcher
Because methods for get latest version of upstream package are now available
into bitbake removes duplicated code and make use of it.

Compatibility testing was made running distrodata class and the result files
can be found at:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=1813

[YOCTO #1813]

(From OE-Core rev: 68ddb28a68ceb59cd1ed322c16143827ce1ac712)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:57 +00:00
Alexandru DAMIAN c5ebca28b7 toaster.bbclass: use the openembedded-core name
Fixing the bug where the openembedded-core name was registered
as "meta" in toaster.

[YOCTO #6962]

(From OE-Core rev: ab9f17893c4b004906ec232da300915145c125e0)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:56 +00:00
Peter A. Bigot f363c2087d useradd.bbclass: set PSEUDO_PASSWD consistent with root directory
When installing into a sysroot this class examines $D/etc/passwd for
content, then invokes useradd to make changes.  Under pseudo useradd
attempts to look up user information in directories specified by
$PSEUDO_PASSWD.  For opkg multilib installs $D is not always the same as
$IMAGE_ROOT, and the user might already be in the IMAGE_ROOT files,
causing a failure during rootfs population.

Fix this by ensuring the files pseudo looks at when doing useradd stuff
are the same ones that useradd.bbclass will be manipulating.

(From OE-Core rev: ec3417ad825c52f5137d38b91d8fcb4637a50f4c)

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-25 13:03:30 +00:00
Peter A. Bigot d1434d97f5 image.bbclass: search both rootfs and native staging for passwd files
When pseudo is configured to disallow fallback to the build host
/etc/hosts and /etc/group, the selection of ${IMAGE_ROOT} for
PSEUDO_PASSWD is insufficient as the necessary files will not be
available until base-passwd has been installed and its pkg_postinst
script run.  Fall back to the ${STAGING_DIR_NATIVE} version of those
files until the rootfs versions are available.  (The native copies are
never modified by the build; the ones in ${STAGING_DIR_TARGET} are
updated and may contain settings not consistent with what would be
created by post-install useradd/groupadd commands invoked in the image
rootfs.

(From OE-Core rev: 8c653bafaa32126c54400bb56b9a94f07cd33197)

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-25 13:03:29 +00:00
Tobias Olausson 3092f33296 spdx.bbclass: improved error handling and code cleanup
The spdx task now writes a meaningful error message in case of error in
communication with the FOSSology server. Also the coding style is now more
consistent and some unneccessary calls/functions are removed.

(From OE-Core rev: 094e27c881d06e428f18788463627da736c66911)

Signed-off-by: Tobias Olausson <tobias.olausson@pelagicore.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20 14:08:14 +00:00
Otavio Salvador 7bc2e2a312 toolchain-scripts.bbclass: Export KCFLAGS to ensure sysroot is provided
When building the U-Boot the lack of a proper sysroot can trigger
following error:

,----
| arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc
| make[2]: *** [examples/standalone/hello_world] Error 1
| make[1]: *** [examples/standalone] Error 2
| make: *** [examples] Error 2
`----

Guillaume Fournier has posted a very complete analysis of the
problem[1].

1. https://lists.yoctoproject.org/pipermail/meta-freescale/2014-November/011270.html

The use of KCFLAGS makes the build of U-Boot work out of box, now that
it uses the Linux kernel build system.

Reported-by: Guillaume Fournier <gfournier@brioconcept.com>
(From OE-Core rev: 50437f9c187f1a884825a8d1ec12da47a5e58670)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20 14:08:10 +00:00
Mark Hatle bb213d8e60 meta-environment: Fix config-site with a multilib config
[YOCTO #6951]

The TOOLCHAIN_CONFIGSITE_SYSROOTCACHE value was defaulting to the nativesdk
path and not the associated target path.  Set the value in toolchain-scripts
to the target path.

Be sure to set the MLPREFIX within the meta-environment script as multilibs
are processed.

Update the config_site file name to use -BPN- not PN.  Otherwise the
environment processing can't find the correct filename.

(From OE-Core rev: 1f05aaa4944ddac6c2b3ba440effdf1eaf732656)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 15:38:33 +00:00
Jason Wessel da6a4f6c2b ncurses, busybox, cml1.bbclass: Fix menuconfig display corruption
Previously there was a change to the ncurses compile to make it more
like the typical way it was compiled on a host system.  This fixed a
whole class of host machines, but masked the real underlying problem
with the display corruption issues and menuconfig.

The corner case that led to the discovery that the wrong curses.h file
was getting used was when there was no curses libraries at all on one
of the development hosts.  What had happened before was that
/usr/include/curses.h on the host system had to match closely enough
to the curses.h in the sysroot and then linking against the sysroot
version of curses.so was ok (meaning no display corruption).  But on
some systems with ncurses.h vs curses.h such as SuSE hosts, there were
still issues.

If we fix the root of the problem and force the mconf and lxdialog to
use the correct headers and libraries from the sysroot there is no
further issues and the menuconfig target works properly.  It also
means we can back out the custom compilation flags to the ncurses
recipe because they are no longer needed.

For the kernel part of the menuconfig / nconfig changes it will be
merged separately and this is all based on:

https://lkml.org/lkml/2013/3/3/103

(From OE-Core rev: 889e02659dd396feba24f0b0ee6b4043c3f3735a)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-09 10:21:23 +00:00
Alejandro Hernandez ed3e25379c image-buildinfo.bbclass: new class, writes build information to image
Writes build information to target filesystem on /etc/build such as enabled
layers, their current status and commit.

squashspaces was moved to oe/utils.py to make it available to different classes
and avoid code duplication.

[YOCTO #6770]

(From OE-Core rev: c9cc652e88ddedddf8a2f23fb9b8c024616526d7)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-09 10:21:22 +00:00
Richard Purdie 593f14b2e3 package/prserv: Merge two similar functions into one
Having these two separate functions handling PR values seems pointless,
and worse, there are impossible code branches mixed within them.

Merge them into one function and tweak comments so at least you
don't have to read both functions to figure out what is going on.

This does restructure the conditionals to try and aid readability.

(From OE-Core rev: 865d001de168915a5796e5c760f96bdd04cebd61)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-09 10:21:19 +00:00
Richard Purdie d01b8d556e base: Make PRINC warning an error
Apparently 1.5 years of warnings isn't enough to get anyone to take any
notice. We therefore make this an error so people can ignore it for
another 6 months whereafter we can finally give up and remove the
obsolete code.

(From OE-Core rev: 0c21d06dea96ca5f19ac2e3136c66da582036a11)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-09 10:21:19 +00:00
Richard Purdie e6cbda6419 base: Improve makefile clean handling, introduce CLEANBROKEN variable
It turns out we have quite a number of Makefiles out there without a
clean target. Rather than have all cases code an empty do_configure, add
a CLEANBROKEN variable which when set to "1" will disable the attempt to
"make clean".

This patch also adjusts various recipes which either have this problem
fixed, or have been reported to have make clean failures.

(From OE-Core rev: 45b7d3add14eafc25da62bab68d4ae133f8dcb57)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-09 10:21:19 +00:00
Peter A. Bigot 5fa2ce0773 image_types.bbclass: whitespace and reorder
Use a multi-line value to set IMAGE_TYPES and put all the compressed
versions of a format on one line.  Other than moving ext2.lzma this is
just whitespace.

(From OE-Core rev: dd93b3a950d063f4e3020362c636006f51fb5782)

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:22 +00:00
Chong Lu c60fa73007 insane.bbclass: add condition for build-deps
Add condition for build-deps, then we can use it in INSANE_SKIP.

(From OE-Core rev: 1cb62dbb1ecedc6232be3509a2887e92def2b8db)

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:20 +00:00
Alexandru DAMIAN 6e055bbc2e toaster.bbclass: read elapsed time from the stats file
We read the elapsed time fromt the build stats file, instead
of computing it independently.

[YOCTO #6833]
[YOCTO #6685]

(From OE-Core rev: 4f5a4ec0cdaf078463f04be4a6683816e9b78d5f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:19 +00:00
Pascal Bach d6fd3030f9 image_types.bbclass: Make ubi depend on ubifs
The ubi command assumes the ubifs file is present.
This makes sure this is really the case.

(From OE-Core rev: 0a947408f32d7ab10d2004e7d9332296b82191a3)

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-04 10:27:11 +00:00
Jackie Huang 8c051c8c31 license.bbclass: canonicalise the licenses named with 'X+'
If INCOMPATIBLE_LICENSE=GPLv3, GPLv3+ should be excluded
as well but not now since there is no SPDXLICENSEMAP for
licenses named with 'X+', we can add all the SPDXLICENSEMAP
settings for licenses named with 'X+' in licenses.conf,
but it's more like a duplication, so improve the canonical_license
function to auto map for 'X+' if SPDXLICENSEMAP for 'X' is
available, so GPLv3+ becomes GPL-3.0+.

(From OE-Core rev: 1d6dab1dbbbfbcb32e58dba3111130157ef2b24f)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-04 10:27:11 +00:00
Ross Burton 028a39431e systemd: don't add files and dependencies from units Conflicts
Adding dependencies and moving files based on Conflicts tags in unit files isn't
right, mainly as it means that systemd depends on systemd-binfmt, because the
latter ends up containing the shutdown.target unit.

(From OE-Core rev: 02767aac492cedf6ccd02648b8e65751cc23c11c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-04 10:27:11 +00:00
Hongxu Jia 8619d93726 multilib.bbclass/package_manager.py: fix <multilib>-meta-toolchain build failure
There is a failure to build lib32-meta-toolchain:
...
|ERROR: lib32-packagegroup-core-standalone-sdk-target not found in the base
feeds (qemux86_64 x86 noarch any all).
...

In package_manager.py, the variable 'DEFAULTTUNE_virtclass-multilib-lib32'
is used to process multilib image/toolchain. But for the build of lib32-
meta-toolchain, the value of 'DEFAULTTUNE_virtclass-multilib-lib32' is
deleted. In 'bitbake lib32-meta-toolchain -e', we got:
...
|# $DEFAULTTUNE_virtclass-multilib-lib32 [2 operations]
|#   set? /home/jiahongxu/yocto/build-20141010-yocto/conf/local.conf:237
|#     "x86"
|#   del data_smart.py:406 [finalize]
|#     ""
|# pre-expansion value:
|#   "None"
...

The commit 899d45b90061eb3cf3e71029072eee42cd80930c in oe-core deleted
it at DataSmart.finalize
...
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Tue May 31 23:52:50 2011 +0100

    bitbake/data_smart: Change overrides behaviour to remove
       expanded variables from the datastore
...

We add an internal variable 'DEFAULTTUNE_ML_<multilib>', assign it with the
value of 'DEFAULTTUNE_virtclass-multilib-lib32' before deleting.

For rpm backend in package_manager.py, we use DEFAULTTUNE_virtclass-multilib
-lib32 first, if it is not available, and try to use DEFAULTTUNE_ML_<multilib>

[YOCTO #6842]

(From OE-Core rev: 9c59d3d8b538d3a98ff4b5e5b189a4a23a85da2d)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-04 10:27:09 +00:00
Hongxu Jia facfeb0b44 multilib.bbclass: fix incorrect TARGET_VENDOR in multilib image
While building multilib extended images such as libXX-core-image-minimal,
the WORKDIR has the same dir with the building of core-image-minimal.

$ ls tmp/work/qemux86_64-poky-linux/ -al
...
drwxrwxr-x  3 jiahongxu jiahongxu 4096 Oct 13 16:01 core-image-minimal
drwxrwxr-x  3 jiahongxu jiahongxu 4096 Oct 16 11:11 lib32-core-image-minimal
...

While image class is inherited, it did not assign OVERRIDES with
'virtclass-multilib-libXXX', so the reason is variable TARGET_VENDOR was
not override for multilib in that situation.

It refers what did for PN and MLPREFIX, and manually do the multilib
override for TARGET_VENDOR in RecipePreFinalise handler.

[YOCTO #6844]

(From OE-Core rev: 7ca012fb3addb11ba3f899efa0619ddd8d3c6946)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-04 10:27:07 +00:00
Hongxu Jia 150f0f5fff classes/image: remove obsolete MULTILIB_VENDORS
In oe-core commit 03c5f39b4d7dd8c81e0a130b7d5884e5af039a24,
it removed obsolete codes about variable MULTILIB_VENDORS.

We clean up the rest obsolete codes related with
MULTILIB_VENDORS

(From OE-Core rev: 43a1c2dc08b4291e042b6c9ef981bd094ea2c477)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-04 10:27:07 +00:00
Richard Purdie c1f4b1f766 cmake: Try and improve cleaning of builds when B==S
Currently if B==S for a cmake recipe, the build will not reconfigure. This patch adds
code to remove the generated cmake files, meaning cmake will then be forced to regenerate
them. This forces cmake to see configuration changes it may not otherwise see.

(From OE-Core rev: 01f4ed0cfbc60859aabfa5bff33ed966117a05d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:11:51 +00:00
Richard Purdie 6bd2d9d395 base.bbclass: Enable using 'make clean' for rebuilds
When something rebuilds say due to ${baselib} changing or some
other key variable, software is often not rebuilt due to the
fact that make detects no dependency change.

By running "make clean" when these changes occur, we can at least try
and ensure the correct rebuilds happen. We use the same checksum check as
autotools to decide if things have changed or not.

(From OE-Core rev: d06f2c089e01b7c67699800a7a54a4225233da93)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:11:51 +00:00
Richard Purdie 444ae98131 autotools: Use make clean for builds not supporting B != S
If the build doesn't support B != S, we can try running "make clean" instead
to try and clean up previous objects if the hash for the task has changed.

This tries to ensure that when variables like ${baselib} change, the changes are
correctly accounted for.

(From OE-Core rev: c2f761e2010857e2a2aad1dccf06ec39d15c1c86)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:11:51 +00:00
Khem Raj 55d66edd36 mklibs: Fix loader for mipsel
Additionally treat ld.so to be searched in sysroot

Change-Id: I8b4acb821d9855a1163c7149bc8e369c7c438856
(From OE-Core rev: 4cf539e67333ba2c3fe924b092e104da53e68ca0)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:01:21 +00:00
Richard Purdie 6476f0bf3d rm_work: Speed up rootfs/populate_sdk removal
Commands like bitbake X -c rootfs or bitbake X -c populate_sdk do not
trigger rm_work to clean up the directories afterwards since it
traditionally hooks onto do_build. This change means those two tasks now
clean up after themselves. We use the cleandirs function attribute to
handle this.

[YOCTO #6413]

(From OE-Core rev: 6bf06d80c2ce03dfdedac5ad8cf42ef8e36b0ecb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:01:21 +00:00
Bruce Ashfield 11dafe8447 kernel-yocto: fix branch validation for AUTOREV, non machine_meta kernels
The simplication of do_validate_branches missed a case where a custom
kernel can supply SRCREV="${AUTOREV}", and not use SRCREV_machine at all.

In this case, we will incorrectly try and test the tree for a non-existent
commit, and break the build.

By simplying the condition of the check to look for an empty SRCREV_machine,
we can skip manipulating the tree and testing for a SRCREV.

(From OE-Core rev: 212a4bd9b086365c022842a2ac6a2a25bd486002)

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>
2014-10-24 17:36:17 +01:00
Ross Burton ac638b7bd1 native.bbclass: use BUILD_* variables
Instead of replicating the logic for the host compiler naming from bitbake.conf,
use the BUILD_* variables directly.

Also change BUILD_CPP to use gcc -E (which native.bbclass previously used), as
some recipes (e.g. grub-efi) use ${CPP} with multiple input files, which gcc -E
can handle but cpp can't.

(From OE-Core rev: 9237d18964ff0bf76f5c37fca21ab3974d81d0d2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-24 17:36:16 +01:00
He Zhe 4c222d3a67 kernel.bbclass: Create modules directory even if there is no modules installed
During kernel_do_install it needs to make symbol link at
${D}/lib/modules/${KERNEL_VERSION}/build, but there will not be
${D}/lib/modules/${KERNEL_VERSION} if there is no modules installed for current
image, which will result in a build failure.
Add "mkdir -p ${D}/lib/modules/${KERNEL_VERSION}" here to avoid this failure
and the need of similar changes in other scripts that also expect it to exist.

(From OE-Core rev: f2f72f8ff623d24fffbb1b0ad40bc08f05ff31dd)

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>
2014-10-24 17:36:16 +01:00
Joe Slater 1a0485040c archiver: fix truncation of src_rev
In trying to eliminate AUTOINC+ from revision strings,
we accidently truncated the strings to almost guarantee
information from SRCREV_FORMAT, when supplied, would be
lost.  So, we now only delete any AUTOINC+'s from the string.

(From OE-Core rev: 83c6930cdfac5a7759c4786172a5c70226e6adc4)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-24 17:36:15 +01:00
Tobias Olausson f348071efd spdx.bbclass: improved stability, fixed SPDX compliance issues. Changes are reflected in licenses.conf.
The previous version could crash on dead links in the rootfs, or if the manifest directory did not
exist. The generated files were also not compliant with the SPDX specification, for example file
entries did not always start with the FileName tag, time stamps were incorrectly formatted etc.

Stability issues are addressed by added checks, originally written by Johan Thelin
<johan.thelin@pelagicore.com>, who never upstreamed them. I've also added an option for getting full
SPDX output from FOSSology, i.e. not only for all files, but for the package as well, including
license references. License refs are required in order to process the output by SPDXTools. For that
reason, this option defaults to true.

(From OE-Core rev: 5d3a4f4f57e4d8581fd88a14324f94e93104a690)

Signed-off-by: Tobias Olausson <tobias.olausson@pelagicore.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-24 17:36:15 +01:00
Peter Urbanec 754288c387 sstate.bbclass: Fix up white space lost in last commit.
Commit e9672387 split one long line into a multi-line string, but in
the process white space between words was lost. This results in badly
formatted output when this message is printed.

(From OE-Core rev: b145374c0a498de0160a9b81f50ce0066ab14862)

Signed-off-by: Peter Urbanec <openembedded-devel@urbanec.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-18 16:14:04 +02:00
Wenzong Fan 0d761fc4ff sstate.bbclass: specify func dirs for sstate_hardcode_path
For some recipes that inhrient cmake, the ${B} may be removed by
cmake_do_configure() while sstate_hardcode_path() running, this
causes build errors:

  Exception: OSError: [Errno 2] No such file or directory: \
  '/path/to/build'

The function sstate_hardcode_path() called command:

  $SSTATE_SCAN_CMD which extended as "find ${SSTATE_BUILDDIR} ..."

So the proper function dirs could be ${SSTATE_BUILDDIR}.

(From OE-Core rev: a949943e622b08485fc7632a0a743bc009079c67)

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-18 16:14:04 +02:00
Andreas Oberritter c0b0f695f5 package_deb: skip pre/postrm scripts on upgrade, write only one shebang
Trying to upgrade busybox removing symlinks but update-alternatives
need these links (sed, cut, tail, etc) in order to work.

Adding test to avoid this scripts on upgrade fix the problem, same
solution are found in package_rpm class.

[YOCTO #6768]

(From OE-Core rev: 7b9161dd0c475cca6ea7eb507f7c3c51869eb493)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-11 08:11:03 +01:00
Khem Raj b2f1250f6d package_do_shlibs: Look for provider in the path thats in shlib_provider dictionary
shlib2 code puts the information about path where a provider
will be found. e.g.

{'/usr/lib/llvm3.3': ('libllvm3.3-llvm-3.3', '3.3')}

This is obtained from new shlib2 pkgdata from

llvm3.3/3.3-r0/pkgdata/shlibs2/libllvm3.3-llvm-3.3.list

However when we search for NEEDED libraries we ignore the
key above which is the path where the provider library is installed
and instead just seach in libdir and base_libdir and hence
libraries which are not in above standard search paths gets
ignored even if they appear in DT_NEEDED sections

and a note is emitted

NOTE: Couldn't find shared library provider for libLLVM-3.3.so, used by
files: ....

IMO this note should actually become an error since if we do
not have all DT_NEEDED libraries in image the system is dysfunctional.

This patch extracts this libpath from key and add it to seach paths
when looing for a provider of a shared library

[YOCTO #6798]

Change-Id: Ie5f08632e37ba8d3439c8aaae33bc68b8996792f
(From OE-Core rev: bf8472274ac1e9a35f8cbc82357da6c95b396759)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-10 22:40:45 +01:00
Richard Purdie f8d5bfb052 toolchains-scripts: Add support for target environment scripts
In a similar way to the previous script which adds support for native
environment scripts, this adds support for target environment scripts
too.

(From OE-Core rev: 2d9466734f0c0c90724820bc36992b2800ffa4d0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-10 16:44:33 +01:00
Robert Yang d3a5658519 sstate.bbclass: split the too long line
The too long line would cause "git send-email" report errors:
patch contains a line longer than 998 characters

Though we can use "--no-validate" to force the send.

(From OE-Core rev: e96723879eb3352a5bdea7b3e1a576edf9550e5a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-10 16:44:32 +01:00
Robert Yang a2001341cf sstate.bbclass: the second bb.fatal not work
The code:
bb.fatal("foo1")
bb.fatal("foo2")

Would make the second one not work, use bb.error for first one to fix
the problem.

(From OE-Core rev: 33a87187a8520e190bcade76cc965aa58faaa85a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-10 16:44:32 +01:00
Otavio Salvador ee0ab903f8 toolchain-scripts.bbclass: Allow sourcing of subscript for environment
Sometimes we require extra environment settings to be available on the
environment for proper SDK work. This were done, in past, using
'_append' tasks however with the split of the environment in a
canadian package this has been broken.

The easier and more flexible solution is to use environment subscripts
which are sources by the main script. These are now looked at:

 $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh

and sourced.

(From OE-Core rev: 457291f2ca084d1f43c0cca2175b448a22761887)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-10 16:44:31 +01:00
Mark Hatle 09a51b9976 package_ipk.bbclass: Fix SRC_URI whitespace handling
The SRC_URI may contain whitespace, but be otherwise empty.  This can happen
in the case:

MYSRC = ""
MYSRC_arm = "file://myarm.patch"
SRC_URI += "${MYSRC}"

Unless we strip blank spaces, to determine if it is empty, we can end up
generating a "Source: " line which in invalid.  This leads to the error:

  invalid Source: field is speified in the generated CONTROL file

(From OE-Core rev: 16cedc3bce6fc37543e9ef053cd7c589e523ca1c)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06 16:03:13 +01:00
Otavio Salvador 533a852edd package.bbclass: Reverse runtime symlinks should be tied to package generation
In case a package is not generated (is empty and does not has allow
empty flag set) the package data regarding reverse runtime dependency
shouldn't be done.

This were causing a false-positive in the meta-fsl-arm layer, when
building mesa, as:

,----[ Error during build of MX53 in meta-fsl-arm ]
| ERROR: The recipe mesa is trying to install files into a shared area
|  when those files already exist. Those files and their manifest
|  location are:
|    /.../build/build/tmp/sysroots/imx53qsb/pkgdata/runtime-reverse/libopenvg-dev
|    Matched in manifest-imx53qsb-amd-gpu-x11-bin-mx51.packagedata
| Please verify which recipe should provide the above files.
`----

Fixes [YOCTO: #6795]

(From OE-Core rev: 9ef8728514b02dd2e18e87645298d9ec2e8a785a)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06 15:15:52 +01:00
Richard Purdie 07ad00ec89 cross-canadian: Disable the packagedata stamp-extra-info
Similarly to native/cross disable this since otherwise the packagedata
can be marked as machine specific and if you switch machines
which share an architecture, you'll get toolchain overlapping files
errors.

(From OE-Core rev: 96d557be3dedd6aea6199b3d28fbb7f5549fad69)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06 15:15:51 +01:00
Nitin A Kamble 3224472c68 kernel.bbclass: enable a link for external module building
Even though the kernel-dev package provides the required support for
building external kernel modules on the target, some commonly used scripts
and utilities fail as they are not finding the kernel module build support
files at the desired location.

Create the /lib/modules/<kernel-version>/build link on target pointing to
the sources provided by the kernel-dev package, to fix the issue.

Fixes Bug:
[YOCTO #2968]

(From OE-Core rev: aafa4bc896eb944aa4fc406807dd7e02f4b9b7ba)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06 15:15:51 +01:00
Alejandro Hernandez ff89dfb570 kernel: Added bc-native as DEPENDS
The makefile checks for bc during for compilation

[YOCTO #6781]

(From OE-Core rev: c067e52cffe002de3b39aa1bced308dd532859c1)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06 15:15:50 +01:00
Richard Purdie 4572e4cdc7 sstate: Add rpm allarch to overwrite whitelist
The packagegroup allarch rpm files for multilib can overwrite each other since
they are in theory indentical (in contrast to the other backends). We therefore
need to whitelist this to avoid build failures now this overwrite failure
is fatal.

(From OE-Core rev: d59ade0ca2cf629937434fa423dfbf35ce1209fc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-30 14:10:36 +01:00
leimaohui 0d3aac7776 spdx.bbclass: Add SPDX-specific source tree variable.
Add SPDX-specific source tree variable for recipes where $S is a subdirectory of
the source tree.

[ RB - add a comment for SPDX_S ]

(From OE-Core rev: 41784ad0588b4aba6897d6e9e0efd0314ab19747)

Signed-off-by: leimaohui <leimaohui@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-30 14:10:35 +01:00
Darren Hart 78b44ce53d kernel-yocto.bbclass: Fixup shell condition test syntax error
A warning is issued when run about an unexpected operator due to a
syntax error with an extra if empedded in the shell conditional. Remove
the extra if.

(From OE-Core rev: f0566e127abc7bb90588b2a8bee12ad3e7d35b3e)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-30 14:10:34 +01:00
Ross Burton 202ae5af74 base.bbclass: add SRCREV to do_fetch() hash
Without this changing just the SRCREV won't re-fetch unless you embed the SRCREV
into PV.

The downside here is that every hash changes, so this causes a full rebuild.

(From OE-Core rev: a414b17e1d783ad68a2d0f7d5922967449c05797)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-30 14:10:33 +01:00
Richard Purdie 78a2c81427 staging: Exclude MULTI_PROVIDER_WHISTLIST from do_populate_sysroot
If you switch between multilib and non-multilib builds, pretty much
everything rebuilds due to the use of MULTI_PROVIDER_WHITELIST
in do_populate_sysroot. It doesn't need to do this so exclude
that variable for checksum purposes.

(From OE-Core rev: 7f3a44ff30d07083ee8c4e2b7ac91dc6a9c8857b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-30 14:10:33 +01:00
Robert Yang 3ad2f855a7 sstate.bbclass: update the timestamps after install
Update the sstate file's timestamps after it is installed, it will be
very useful for removing the old sstate file, especially, it's not easy
to remove when use the shared SSTATE_DIR, we can easily remove them with
this change, for example:

$ find state-cache -type f -ctime +10 -exec rm -f {} \;

Will remove the sstate file which isn't used by recent 10 days.

We can use the -atime, but it is not always available, for example,
when mounted with "-o noatime".

The touch is a very light weight action, and the
scripts/sstate-cache-management.sh also requires this.

(From OE-Core rev: bbee747466a6947319cff2ffd676abf9432c16ae)

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>
2014-09-29 12:12:44 +01:00
Ross Burton 5761032745 gnomebase: fix indentation
(From OE-Core rev: 103ded50380916d210e293913eebb173f014063e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:12:43 +01:00
Richard Purdie 5cc591748e sstate: Change overlapping files warning to a fatal error
When files overlap in the sysroot, something bad usually happened. We've had
two independent cases recently where a couple of months after one of these
warnings was shown, builds failed due to corruption.

This change moves the warning to become a fatal error. The complaint I've had
about this is that we need to tell the user what happened and more importantly
how to recover from it. If we could recover from it, great but the trouble is
we simply don't know what happened.

As a compromise, we can document several of the possible scenarios in the error
message. We don't normally go to this level of detail however in this case, I'm
lacking other viable alternatives.

I do believe it is important to stop as corruption occurs rather than letting the
build contunue into territory that is not deterministic amongst other things.

The complex message is followed by a simpler one in case the long message is too
much for the user.

(From OE-Core rev: 179ac7de03977b6e440409eddb2166819e07286a)

(From OE-Core rev: 4b503f25f1ef8f554d3c76d88399db379dc818cc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:12:42 +01:00
Richard Purdie 4ebd2e4915 update-rc.d/systemd: Remove OVERRIDES dependency
Taking run-postinsts and building for two machines which have different
OVERRIDES leads to two different sets of stamps for an allarch package.

We don't need to depend on OVERRIDES in these classes, the end resulting
variables are good enough. We can therefore exclude the dependency
and allow a single package to be generated for run-postinsts.

(From OE-Core rev: fdc949154e64afb41dd4db3a97be74a15963128d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 21:38:59 +01:00
Richard Purdie 2cbab459e4 uninative: Add uninative - a way of reusing native/cross over multiple distros
These patches are the start of a new idea, a way of allowing a single set of
cross/native sstate to work over mutliple distros, even old ones.

The assumption is that our own C library is basically up to date. We build
and share a small tarball (~2MB) of a prebuilt copy of this along with a
patchelf binary (which sadly is C++ based so libstdc++ is in there). This
tarball can be generated from our usual SDK generation process through
the supplied recipe, uninative-tarball.

At the start of the build, if its not been extracted into the sysroot, this
tarball is extracted there and configured for the specified path.

When we install binaries from a "uninative" sstate feed, we change the
dynamic loader to point at this dynamic loader and C librbary. This works
exactly the same way as our relocatable SDK does. The only real difference
is a switch to use patchelf, so even if the interpreter section is too small,
it can still adjust the binary.

Right now this implements a working proof of concept. If you build the tarball
and place it at the head of the tree (in COREBASE), you can run a build from
sstate and successfully build packages and construct images.

There is some improvement needed, its hardcoded for x86_64 right now, its trivial
to add 32 bit support too. The tarball isn't fetched right now, there is just a
harcoded path assumption and there is no error handling. I haven't figured
out the best delivery mechanism for that yet. BuildStarted is probably not
the right event to hook on either.

I've merged this to illustrate how with a small change, we might make the
native/cross sstate much more reusable and hence improve the accessibility
of lower overhead builds. With this change, its possible the Yocto Project may
be able to support a configured sstate mirror out the box. This also has
positive implications for our developer workflow/SDK improvements.

(From OE-Core rev: e66c96ae9c7ba21ebd04a4807390f0031238a85a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:31:18 +01:00
Carlos Rafael Giani 5ceb02d694 kernel.bbclass: use one package split for all firmware filename extensions
(From OE-Core rev: dd5313228879487ca2b11fc5d38fb821a2a810a5)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-22 13:04:23 +01:00
Richard Purdie 955bf632a7 populate_sdk_base/meta-environment: Remove overlap from the two
Currently we have the horrible situation where meta-environment packages
the toolchain environment files and they get included in the SDK but are
broken, then, the SDK code overwrites them with good versions. This is
suboptimal.

This change fixes the code in meta-environment to create working
files and adds in the multilib support from populate_sdk_base, then
we remove the code in that base bbclass and rely on the packages
being installed if/as/when needed. This removes the duplication
and the broken versions of the files, hopefully making all well.

[YOCTO #6608]
[YOCTO #6613]

(From OE-Core rev: 063355e5965439c7b3253d692d7ab0ed1189d123)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-22 13:04:23 +01:00
Philip Balister 3e6df77b23 cmake.bbclass : Add support for cmake projects that use .S files.
UHD and GNU radio use the cmake build system. The toolchain file made
from cmake.bbclass does not set the variable needs by cmake projects
that use .S files. UHD added some .S files and these changes are required
to build recent UHD.

(From OE-Core rev: 43ce4b804d433662fe77c6f5298060ba74a0e639)

Signed-off-by: Philip Balister <philip@balister.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-22 13:04:21 +01:00
Hongxu Jia 7450ba4053 sstate: set SIGGEN_LOCKEDSIGS_CHECK_LEVEL default to error
(From OE-Core rev: 65020364bd089afbb83cd216e7ae2f837077bfc5)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-17 22:00:26 +01:00
Richard Purdie c5cc4993f0 sstatesig/sstate: Add support for locked down sstate cache usage
I've been giving things some thought, specifically why sstate doesn't
get used more and why we have people requesting external toolchains. I'm
guessing the issue is that people don't like how often sstate can change
and the lack of an easy way to lock it down.

Locking it down is actually quite easy so patch implements some basics
of how you can do this (for example to a specific toolchain). With an
addition like this to local.conf (or wherever):

SIGGEN_LOCKEDSIGS = "\
gcc-cross:do_populate_sysroot:a8d91b35b98e1494957a2ddaf4598956 \
eglibc:do_populate_sysroot:13e8c68553dc61f9d67564f13b9b2d67 \
eglibc:do_packagedata:bfca0db1782c719d373f8636282596ee \
gcc-cross:do_packagedata:4b601ff4f67601395ee49c46701122f6 \
"

the code at the end of the email will force the hashes to those values
for the recipes mentioned. The system would then find and use those
specific objects from the sstate cache instead of trying to build
anything.

Obviously this is a little simplistic, you might need to put an override
against this to only apply those revisions for a specific architecture
for example. You'd also probably want to put code in the sstate hash
validation code to ensure it really did install these from sstate since
if it didn't you'd want to abort the build.

This patch also implements support to add to bitbake -S which dumps the
locked sstate checksums for each task into a ready prepared include file
locked-sigs.inc (currently placed into cwd). There is a function,
bb.parse.siggen.dump_lockedsigs() which can be called to trigger the
same functionality from task space.

A warning is added to sstate.bbclass through a call back into the siggen
class to warn if objects are not used from the locked cache. The
SIGGEN_ENFORCE_LOCKEDSIGS variable controls whether this is just a warning
or a fatal error.

A script is provided to generate sstate directory from a locked-sigs file.

(From OE-Core rev: 7e14784f2493a19c6bfe3ec3f05a5cf9797a2f22)

(From OE-Core rev: 884d4fa3e77cf32836f14a113c11489076f4a84d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-17 22:00:25 +01:00
Robert Yang 563ea5b3d9 sstate.bbclass: fix sstate_hardcode_path()
The "grep -e (x|y)" doesn't work, for example:
$ echo xy | grep -e '(x|y)'
No output

We can use "grep -E" (extended regexp) or "grep -e x -e y" to fix it.
It only affected the cross recipes.

(From OE-Core rev: 62722de6d0ec00608eacc2cb0396362aced00047)

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>
2014-09-16 22:13:52 +01:00
Richard Purdie 40e1c38dbf license: Improve disk usage
Currently copies of the license files are made which wastes disk space
and adversely affects performance. We can link these instead in most
cases for small performance gains.

(From OE-Core rev: 0b0f3631fd22f731b6aeedb73965e367b695028b)

(From OE-Core rev: fe00d4f479c4fb5e4be5dda616a4de0a257ef6c3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-16 22:13:51 +01:00
Richard Purdie 57edf5991a sstate: Fix incorrect return value handling
The use of [ and && here means $? is reset and the exit 1 error
interception wasn't working, leading to "file changed as we read it"
errors from sstate_create_package when heavily using hardlinks.

Fix this by placing $? into a variable.

(From OE-Core rev: 6e51f900b76b06c09a3d6927f8db7398e2c035ed)

(From OE-Core rev: 75040a098e11927e6872e3a2a6286fe3ed0c7f47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-16 22:13:51 +01:00
Paul Eggleton 429802fe66 classes/populate_sdk_base: enable adding custom commands to SDK install script
Add an SDK_POST_INSTALL_COMMAND variable which allows additional
commands to be added towards the end of the SDK install script, for e.g.
additional processing that needs to be done as part of installing the
SDK.

(From OE-Core rev: 10df0718d6a626d99beb68cde8d914ee0820d7eb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-11 18:02:55 +01:00
Otavio Salvador c2c8c0283f packagegroup.bbclass: Use immediate expanded PACKAGE_ARCH value
When the PACKAGE_ARCH is dependant of a override, the expanding is
done too late triggering the false-positive error of wrong inclusion
order.

To fix this we use immediate expansion operator to evaluate the
PACKAGE_ARCH value in order to choose to load 'allarch' class or not.

(From OE-Core rev: 2c9b1d304daade7b0907320aeb9c522e7ab9dcab)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 15:38:57 +01:00
Carlos Rafael Giani 3a7769329e kernel.bbclass: handle .dsp firmware
A few firmware files use this filename extension, like korg/k1212.dsp .
Create respective packages.

(From OE-Core rev: 4a4877c2e7cdcb8a1d0a54add600c0cd4e92e647)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 15:38:54 +01:00
Paul Eggleton a41d97a23b classes/buildhistory: fix for sstate class change
SSTATEPOSTINSTFUNCS is now set with = in sstate.bbclass, and because
the line here in buildhistory.bbclass ends up being parsed before that
we now need to use _append or the value we are adding will be wiped out.
This fixes buildhistory no longer recording package information since
OE-Core revision 9d659c6f20fa4a141b491c62a3ef0dfb1f896d9c.

(From OE-Core rev: b5c05b474554925524073023f3aac2532c87537f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 13:52:31 +01:00
Martin Jansa 7efad8a1b5 qemu.bbclass: add -r ${OLDEST_KERNEL} parameter
* in some cases (e.g. with external toolchain which doesn't respect our
  reasonably old version set in OLDEST_KERNEL) it's possible to have libc
  which requires newer kernel than what we have on builders, qemu supports
  -r param to use different uname than what's returned by host system.
* change qemu_run_binary to pass -r ${OLDEST_KERNEL} and add the same to
  QEMU_OPTIONS which are used by qemuwrapper-cross
* maybe we should eventually convert all qemu_run_binary usages always include
  qemuwrapper-cross dependency and always call qemu through that (it
  seems very strange that qemu_target_binary is called from qemuwrapper
  and for allarch recipes it can return qemu-allarch as qemu binary).

  qemu_run_binary is used by:
  meta/classes/gtk-immodules-cache.bbclass:            ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \
  meta/classes/qemu.bbclass:def qemu_run_binary(data, rootfs_path, binary):
  meta/recipes-core/systemd/systemd_213.bb:         ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
  meta/recipes-graphics/pango/pango.inc:    ${@qemu_run_binary(d, '$D','${bindir}/${MLPREFIX}pango-querymodules')} \

  and qemuwrapper directly by:
  scripts/postinst-intercepts/update_font_cache:PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir}\
  scripts/postinst-intercepts/update_pixbuf_cache:PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir}\

(From OE-Core rev: 1f0bff320077f4d9f2ee51096a1438e8cae9dd0d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 11:33:25 +01:00
Hongxu Jia 5f26c0292b sstate: Add extra intercept functions SSTATEPOSTCREATEFUNCS
In some cases we do either need to add extra sstate manipulation
functions, or change the existing modification functions. This patch
parametrizes it to SSTATEPOSTCREATEFUNCS after sstate_create_package

(From OE-Core rev: ed5fb9c69fcf0f6e8e98f72ac753c66119468ea5)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 11:33:23 +01:00
Robert Yang 60bfdb0f19 insane.bbclass: add QA check: file-rdeps
The ipk or deb can't depend on file such as "/bin/bash" or
"/usr/bin/perl", so it knows nothing about the pkg depends bash or perl,
thus there would be dependencies problems when we run "apt-get
install/remove <pkg>" on the target, this check can help us find the
issues and then fix them manually.

* Benefits:
  - Help to fix file rdepends issues for ipk and deb
  - Help to fix abnormal rdepends.
  - Help to check whether the rdepends is OK or not after build each
    recipe (don't have to install to the image), for example, a recipe may
    generate 10 binary packages, only a part of them will be installed to
    the image by default, we can know whether the rdepends are OK or
    not for the ones which are installed, but can't know the ones which
    are not installed, this patch can help check all the 10 binary
    packages' rdepends.

* Basic designs:
  - Get all the RDEPENDS on the chain.

  - Get the pkg's FILERPROVIDES from oe.packagedata.read_subpkgdata()
    and save to set filerdepends.

  - Get each RPDEPENDS' FILERPROVIDES, RPROVIDES and FILERPROVIDESFLIST,
    and save to set rdep_rprovides.

  - Do the set "filerdepends -= rdep_rprovides" and QA issue if
    filerdepends is not null.

[YOCTO #1662]

(From OE-Core rev: cd5e0f01cdb4e7c759c01cf3f87952a20253737c)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 11:33:22 +01:00
Fabrice Coulon b02da021b1 useradd-staticids.bbclass: Fix for Bug 6633
When using the useradd-staticids.bbclass under meta/classes,
this error occurs:
"<username> - <username>: Username  does not have a static uid defined."
There was a problem with the regular expression for parsing parameters,
it was sometimes returning an empty string.

I have fixed this by skipping empty strings.

(From OE-Core rev: f249ef32709069a2680b92dc5a5b4f6545d014b7)

Signed-off-by: Fabrice Coulon <fabrice@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 16:00:28 +01:00
Ronan Le Martret 2f42ef8d8f package_rpm: Add optional improved directory handling
During spec generation, ideally directories should not be auto
packaged under the %file section of rpm packages but take ownership of
specific directories.

* packages only empty directories or explict directory.
   See:
       - http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html
       - "The %dir Directive"

* This will prevent the overlapping of security permission.
   For example, in Tizen the directory /etc have smack label 'System::Shared'
   So Only one package should own and set the label of /etc to prevent
   the overwriting of the smack label.

Existing behaviour is maintained if DIRFILES is not set. If it is set,
the modified behaviour is used. If can be set to an empty value by
core recipes to trigger the modified behaviour.

[RP: Modified to allow optional usage of DIRFILES]
(From OE-Core rev: 0e33d232916125ba5305ced7200cc00f8b5f7b22)

Signed-off-by: Ronan Le Martret <ronan@fridu.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 16:00:28 +01:00
Chen Qi ee05cc8359 update-rc.d: fix logic in populate_packages_updatercd
The 'and' logic for the check is wrong. To make things clear, please
see the example below.

Say that we have a recipe A, which has a sysv-init style init script named
initA and no corresponding service file. The recipe inherits update-rc.d,
but it doesn't inherit systemd.bbclass. The DISTRO_FEATURES has 'systemd'
inside it, but it doesn't have 'sysvinit'. Now if we build an image, with
the 'and' logic in the check, the symlinks for initA would not be installed
into /etc/rc?.d directory.
This is incorrect. Because there's no corresponding service. The symlinks
in /etc/rc?.d/ should be created so that the service would be correctly
started at boot time.

The logic should really be 'or' in the check. This is actually what the code
was when it was originally written.

Several different situations are listed below to prove the correctness of the
'or' logic.

If 'sysvinit' is in DISTRO_FEATURES, the initA script would always be installed
with corresponding preisnt/postinst generated and added.

If 'sysvinit' is not in DISTRO_FEATURES, we have three situations.
1) A has initA and A.service.
   In such situation, systemd.bbclass would set INHIBIT_UPDATERCD_BBCLASS,
   so no preinst/postinst about update-rc.d would be added and the symlinks
   for initA would not be created.

2) A has initA, and the functionality of initA is not implemented internally
   in systemd.
   In such situation, symlinks for initA would be installed.

3) A has initA, and the functionality of initA is implemented internally in
   systemd or in some other recipe.
   Examples for such situation are alsa-state and keymaps in OE.
   In such situation, we need to set INHIBIT_UPDATERCD_BBCLASS in the recipe
   so that there would be no preinst/postinst scripts about update-rc.d added.

(From OE-Core rev: 6272c81509bbdb5d602056ceaa6f2c02bbf47a41)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 11:09:04 +01:00
Hongxu Jia b15a7036c5 classes/compress_doc.bbclass: compress man/info pages
A distribution compression policy should be established, and used by all
packages. It compressed man pages in ${mandir} and info pages in ${infodir}

1. The doc will be compressed to gz format by default, which is configured
in ${DOC_COMPRESS}

2. It will automatically correct the compressed doc which is not
in ${DOC_COMPRESS} but in ${DOC_COMPRESS_LIST} to the format
of ${DOC_COMPRESS} policy

3. It is easy to add a new type compression by editing
local.conf, such as:
...
DOC_COMPRESS_LIST_append = ' abc'
DOC_COMPRESS = 'abc'
DOC_COMPRESS_CMD[abc] = 'abc compress cmd ***'
DOC_DECOMPRESS_CMD[abc] = 'abc decompress cmd ***'
...

[YOCTO #1238]

(From OE-Core rev: 5c833e188bbf25c35c24f78eaa761a191d6b5801)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 11:09:03 +01:00
Richard Purdie c5dc66430e package_rpm: Add builddir macro to define source directory
This allows its usage in other RPM macros so files in ${S} can be found.

(From OE-Core rev: 649ddd4b17e8a1f94ca9f4bc3a71560437c61909)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 11:09:02 +01:00
Richard Purdie 2668104a5c package_rpm: Add custom extension support for spec generation.
Add hooks to allow customisation of the rpm spec files. Since python functions
aren't visible in the data store, one variable is used to trigger the call to
a separately named function. A dummy function is not provided since this then
triggers various class ordering complexities which are best avoided.

Ultimately this will be replaced by a refactor of the code to generate the
spec file using a python class.

This allows the tizen layer to add hooks for the security manifests for
example.

(From OE-Core rev: 03ac91815013c0e85c4694b3ab849257e658aeba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 11:09:02 +01:00
Khem Raj 4e4e80e4f2 image-swab.bbclass: Account for eglibc -> glibc move
(From OE-Core rev: 9942fe4b36e2a18510cb0805ddb7be71d72a75a2)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 18:03:04 +01:00
Robert Yang 051f6a19f9 native.bbclass: deltask package_qa
The native recipe doesn't need package_qa, and it has a race issue with
do_unpack which requires the clean dir of ${S}, then causes error:

NOTE: recipe opkg-utils-native-0.1.8+gitAUTOINC+eae0d8fa44-r0: task do_package_qa: Failed
ERROR: Task 283 (virtual:native:/path/to/opkg-utils_git.bb, do_package_qa) failed with exit code '1'

(From OE-Core rev: 6ad0979a6064755fd6d86b568bd3cbbcdd3d4e37)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 17:17:11 +01:00
Bruce Ashfield 92c1ece6c3 kernel-yocto: replace --is-ancestor with basic git porcelain commands
--is-ancestor is a relatively new git option [commit 5907cda1, Aug 30 2012].
To support build machines with older versions of git installed, we can use
the basic porcelain commands to acheive the same check.

merge-base: "--is-ancestor A B" can be replaced with:

    if test "$(git rev-parse --verify A)" = "$(git merge-base A B)"

(From OE-Core rev: 2ddfffe52720d1df70b04131eac553776da7bc73)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:41 +01:00
Bruce Ashfield 9a3292efcb kernel-yocto: convert echo statements to bb* equivalents
Use the bbinfo, bberror, bbfatal equivalents to the existing echo statements
within the kernel-yocto processing. This makes us consistent with the other
messages from the build system.

(From OE-Core rev: 1686d69de08bcecd39942802df18c4f0ca029ffe)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:41 +01:00
Bruce Ashfield 63f2e18987 kernel-yocto: allow custom non-meta, SRCREV format builds
When custom respositories are built (like a pure kernel.org
repo), the machine_meta SRCREV format is not applicable. As
such, we shouldn't check for the meta branch and we shouldn't
only check SRCREV_machine based revisions.

(From OE-Core rev: bf555ee3305114483aa5083cde1accd23b46a39e)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:40 +01:00
Bruce Ashfield ba7614b0e6 kernel-yocto: clean overly complex branch checkout
Since the git fetcher ensures that branches exist, we no longer need to
validate the branch and have a conditional checkout of the source.

We can remove some checks and ensure that whenever we exit the
do_kernel_checkout routine that a branch is always checked out.

(From OE-Core rev: 2ffa3f8be6996877cd552ff22260de35c19c413d)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:40 +01:00
Bruce Ashfield 2aa75224b5 kernel-yocto: use show-ref instead of branch -a
It's better to check a branches existence via show-ref versus the end
user branch commands. So we make the switch.

Also as part of this change, we move the conversion of remote branches
to local branches above the meta branch checking. This is required to
ensure that the branch is local for the show-ref check.

(From OE-Core rev: 04bd4cee625574cfa67679b6b2a150a21106c5bf)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:40 +01:00
Bruce Ashfield 4ee454d356 kernel-yocto: simplify branch SRCREV validation
The checking of machine and meta branch SRCREVs was inconsistent and
didn't allow a mixed AUTOREV machine/meta branch combination. By
simplifying the checks and changing the logic, we can now allow this
combination.

(From OE-Core rev: e272cfbba87a98393d6c22bd96c7f1cb6902170a)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:40 +01:00
Bruce Ashfield 3b3fe047a4 kernel-yocto: remove KBRANCH_DEFAULT
KBRANCH_DEFAULT was introduced as a way to trigger the enforced build
of a particular branch of the tree. With the fetcher now enforcing
SRCREVs existing on a branch, we can simply validate that the SRCREV
is reachable from the final branch and no longer care about enforcing
a given branch.

(From OE-Core rev: fbacbb0ca79cdae33803fdd3158671488b9bbcbe)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:40 +01:00
Bruce Ashfield 95bfc6ab51 kernel-yocto: remove branch existence checking in do_validate_branches
Now that the fetcher will enforce branch existence, we no longer need to
confirm that a branch exists, and that it was the branch requested to
be built.

We know the branch exists and we'll confirm that the specified SRCREV
is going to be built after we've patched the tree.

(From OE-Core rev: 93a7c7bd8e860e621af7174ef10d571b0d8622b2)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:40 +01:00
Bruce Ashfield 254bc3a283 kernel-yocto: remove SRC_URI kbranch validation
We no longer need to check if the KBRANCH matches the branch specified
in the SRC_URI. This is taken care of by the fetcher at the beginning
and SRCREV ancestor validation after patching.

(From OE-Core rev: a9b6550d3e2f5bf21fd05a17bca3e57c5b74e057)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:40 +01:00
Bruce Ashfield 8a5b1c771a kernel-yocto: remove containing branch check
The bitbake fetcher now enforces that a commit is contained by a branch,
so this code can be dropped from do_validate_branches.

(From OE-Core rev: 9e473d348d9e0db34e03446065c6c48d36964e1e)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:39 +01:00
Bruce Ashfield 7097cdf14a kernel-yocto: move SRCREV validation to patching phase
Rather than attempting to condition the entire tree to machine SRCREV (since
we don't know what branch will be built), we can instead wait until patching
has completed and then confirm that we are indeed building a decendant of the
specified SRCREV. The result is a much simpler check, and no mangling of the
tree.

(From OE-Core rev: 97075af9e9a691276cd417f1181ca73223f52d1c)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:39 +01:00
Bruce Ashfield 4e96983a3a kernel-yocto: use cat-file instead of git-show
Parsing the output of git show is error prone, since it changes based on
the type of issue with bad comit IDs. Since the output is no longer used
in the case of a valid ref, we can switch to git-cat-file and  simply
check the return code.

(From OE-Core rev: 228c05013fe691321ec00467d8d0c0bb64dd175c)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:39 +01:00
Bruce Ashfield 6b294a0489 kernel-yocto: remove redundant SRCREV check
do_validate_branches checks to ensure that a valid machine SRCREV was
set. A test against an empty SRCREV is done in two separate locations,
we only need one, since the first check immediately returns and the
second check never hits.

At the same time, we can stop referring to the same commit hash by
3 different names. Instead we assign to a local variable at the
top of the routine, and refer to it at all times.

(From OE-Core rev: 05508339882c7cc1fe3f1f67f72314fdcab979b7)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 14:35:39 +01:00
Jate Sujjavanich d8f60bb81c useradd: Add setscene dep on pseudo-native
A recipe will sometimes be rebuilt unnecessarily if it adds users via
useradd and the pseudo-native task has not been populated.

This patch adds the correct dependency.

(From OE-Core rev: 2bb244e9e18124b3b86195e0e10b2ebd40cd4f81)

Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 23:44:37 +01:00
Peter Kjellerstedt 9f36a3c445 package: Correct two typos in a comment
This quite coincidentally invalidates the sstate for do_package which
is needed due to the correction of oe.utils.multiprocess_exec().

(From OE-Core rev: 9972f0686794a01582fd1a15889dcbd89bc5cf72)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 23:44:37 +01:00
Richard Purdie e50ebcc502 testimage: Add parselogs to the default tests for sato images
(From OE-Core rev: d373d4332a03eb71c1112b8dd51052e56ca4fa59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 23:44:37 +01:00
Tim Orling 00317221bf classes/cpan_build.bbclass: add EXTRA_CPAN_BUILD_FLAGS
Some packages have additional configuration options that are currently
not accessible through cpan_build.bbclass. Similar to cpan.bbclass, add
EXTRA_CPAN_BUILD_FLAGS to pass the optional parameters to perl Build.PL.

(From OE-Core rev: bef6c3f4ebcd19ea3845aab27a165c370102b62c)

Signed-off-by: Tim Orling <TicoTimo@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 23:44:36 +01:00
Richard Purdie 859ad9402c populate_sdk_base: Remap TOOLCHAIN_HOST_TASK variable
Currently this variable isn't passed through the magic rename
mangling. This means that if you try adding "nativesdk-eglibc"
to an image directly, you can't since the package is renamed
by debian.bbclass and nothing sees the renaming.

This is annoying since I wanted to exactly that. This code
change passes it through the standard renaming function, the
tricky part is that we have to set PKGDATA_DIR to point to
the correct sysroot during the call. We create a copy of the
 datastore for the purposes of the call to do this.

(From OE-Core rev: d2fbc55d6863a767e69092bac686c02c3ec34650)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Robert Yang 9c0d4f5ba2 cpan.bbclass: matches more lines
Fixed:
- There might be a space between "#!" and "/pat/to/usr/bin/perl", e.g.:
  "#! /usr/bin/perl", now also matches it.

- There might be the lines like the following in the body:
  eval 'exec /path/to/usr/bin/perl-native/perl -S $0 ${1+"$@"}'

  Now we only check "#! */path/to/usr/bin/perl" to make sure it is a
  perl script, but match and fix the lines in both header and body.

(From OE-Core rev: 0d2e2ac137465885a1d55103010ccfdec579f1ce)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:43 +01:00
Richard Purdie 347f9c6bc3 sstate: Add extra intercept functions
In some cases we do either need to add extra sstate manipulation
functions, or change the existing modification functions. This patch
parametrises them to SSTATECREATEFUNCS and SSTATEPOSTUNPACKFUNCS and
abstracts the "hardcoded path" functions into separate functions using
these new variables.

We may use this new functionality to improve binary relocating using
patchelf for example, this at least lets us have the hooks to be able to
experiment.

(From OE-Core rev: 9d659c6f20fa4a141b491c62a3ef0dfb1f896d9c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:42 +01:00
Corneliu Stoicescu e04172d8bd classes/testimage.bbclass: add more fields to the sdk TestContext
In order to use hasFeature and hasPackage methods in sdk test modules, we need specific fields to be set in the TestContext object.
Adding pkgmanifest, imagefeatures and distrofeatures to the TestContext.

(From OE-Core rev: cd342b399b2d78724032cdd7042968d3238cd548)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27 12:12:31 +01:00
Corneliu Stoicescu 475e976272 classes/populate_sdk_base.bbclass: add a manifest for target sdk
Similar to the way BSP images have rootfs a manifest, the toolchain now also has a manifest file created alongside the sdk image.

(From OE-Core rev: 3d42fd1f050a1382b15c3c4d59fd02d0ed7091b2)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27 12:12:31 +01:00
Joe Slater a9b080405e archiver.bbclass: add revision to git tarfile name
When archiving original source, insert the first 10
characters of srcrev, after stripping off any
AUTOINC+, into the filename for tarfiles created
from directories.

(From OE-Core rev: 36726049a6a452f85d7cc849d57ad6af05d6d3ea)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27 12:12:30 +01:00
Khem Raj d09e6d8830 native/nativesdk: Clear MACHINEOVERRIDES
In cases where we override variables e.g PACKAGE_ARCH
conditionally and use a MACHINEOVERRIDE to qualify the
override like

PACKAGE_ARCH_<MACHINE> = "some target PACKAGE_ARCH"

This would also be effective if this recipe is
BBEXTENDED to native or nativesdk which is undesired
This particular issue will cause wrong sysroot to be
used for nativesdk case since PACKAGE_ARCH would have
been modified and eventually changing value of
STAGING_DIR_TARGET which we use as --sysroot option
to cross and cross-canadian built SDK gcc

(From OE-Core rev: 6907da7eb44dca812dbb9e214357ee96e9ff738a)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27 12:12:29 +01:00
Christopher Larson 8491ca52b8 sanity: refactor mirrors checks to be more pythonic
- Use clearer variable names
- Use variable unpacking to reference elements by name rather than index
- Sacrifice a small amount of time (iterate over protocols twice per entry
  rather than once) for clarity: use readable generator expressions with any()
  rather than maintaining state.

(From OE-Core rev: 9d31e1e6ce07991fe360e67295311e62a55603af)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27 12:12:29 +01:00
Christopher Larson af6d66852f sanity: fix support for regex schemes in mirrors check
(From OE-Core rev: c8afcb9cab9d610892db9c41b29685583f3b5773)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27 12:12:29 +01:00
Christopher Larson d68255d14b sanity: handle both \n and \\n in mirror vars
(From OE-Core rev: 3e203e91afa48557eb754dd554944012f7f0c0a2)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27 12:12:29 +01:00
Martin Jansa e601c8b160 buildhistory: Restore parsing time optimalization
* it was added in:
  http://git.openembedded.org/openembedded-core/commit/meta/classes/buildhistory.bbclass?id=540a2a30be21c3eca4323efbe91e7dcfc31a4c97
* then accidentally removed in:
  http://git.openembedded.org/openembedded-core/commit/meta/classes/buildhistory.bbclass?id=6db6c74f2876df7a183990426bb4262972966441

(From OE-Core rev: cbd868c34718e8fd2a41f5382da71ee959ea4e71)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 10:26:00 +01:00
Richard Purdie 1a76648ec9 package: Disable runtime mapping of RPROVIDES/RCONFLICTS/RREPLACES
It doesn't really make sense to run the remapping code on these
variables. If specific renaming is needed, it should be applied
manually. This means that the debian RPROVIDES of the original package
name can be preserved. There was also a bug report about this on the
OE-Core mailing list recently where someone else ran into this problem
too.

(From OE-Core rev: a0cd18ff5405b63b8296b8ef1fc2a488b906f576)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:45 +01:00
Richard Purdie ff6ab056c7 package: Don't remap names in packagegroup recipes
For package groups, use the original package names and don't use the
remapped (e.g. debian) naming.

(From OE-Core rev: afde71e8784144f05cebb0bdeeff6b3184819362)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:44 +01:00
Richard Purdie 3694f05ef0 debian: Set RPROVIDES to include the original packagename when renaming
Currently its hard for a packagegroup recipe to depend on something who's name
can change unpredictably. We therefore add in RPROVIDES for the original
package name so that these are also available to use as dependencies.

(From OE-Core rev: 3409c4379559afbb1d1d29045582995147a33bbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:44 +01:00
Richard Purdie 9541ec7b55 allarch: Add warning about packagegroup
Since we want to start including this class conditionally, detect cases
where packagegroup files use the old ordering and inform the user they
need to update this.

(From OE-Core rev: 30aaada4b79fc1acad5fdaba98071b63c52b9e05)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:44 +01:00
Richard Purdie 4f3f34deaf packagegroup: Make allarch inherit conditional
Make the allarch inherit conditional on PACKAGE_ARCH being left as
all. The one downside to this approach is that recipes need to set
PACKAGE_ARCH *before* inheriting the class in order to avoid the inherit.

The advantage is that we could start to detect the use of the
allarch inherit in the sstatesig code for improved task checksums.

(From OE-Core rev: 9c826962ec8fa45c2b035427442b90a41517144e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:44 +01:00
Robert Yang 0ae7b58060 sanity.bbclass: check the format of MIRRORS
Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS:
* Each mirror shoudl contain two memebers.
* The local "file://" url must use absolute path (file:///).
* The protocol must in protocols list.

(From OE-Core rev: c8c213bb25b137cf70ba8ce9a45e60065d926735)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 23:01:57 +01:00
Robert Yang eb34d6650b sanity.bbclass/kernel.bbclass: minor fixes
Fixed:
- Remove an unused line
- Remove unneeded code after d.getVar(), we don't need the "or ''" after
  d.getVar() unless we need a string.
- typo: PREMIRROS -> PREMIRRORS.

(From OE-Core rev: 7849e50107a27b0ff2aaac47480ac1a0a79533dc)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 23:01:57 +01:00
Peter Seebach 65fa712ae9 libc-common.bbclass: rename ALL the packages
The DEBIAN_NAMES feature renames some of the libc packages to
"libc6*" names --but only some. A previous patch added the -dbg
package. However, this doesn't cover other packages (such as
the -doc package), and it didn't take multilibs into account.

(From OE-Core rev: 64362a8f7ad7534515a9448445606581f3c572f6)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 23:01:57 +01:00
Richard Purdie b4ad9de91e bitbake.conf/debian.bbclass: Move AUTO_LIBNAME_PKGS definition to class file
Might as well move this default to the class which uses it allowing
for easier reading/understanding of the class.

(From OE-Core rev: 177aec177306e68bcd822dee6b29a7efbd558a91)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Richard Purdie 9412254f23 package.bbclass: Fixup for using common function
We may as well use the common function for this rather than
duplicating the code.

(From OE-Core rev: 20979854c52607212c16e0b01cf610c80d8b524e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:41 +01:00
Jian Liu 181bcbe2c7 archiver: delete the tail slash in directory name
If directory names in SRC_URI ended with "/", function
do_ar_original() in layers/oe-core/meta/classes/archiver.bbclass
will generate a tar file whose name is ".tar.gz".
So delete the "/" at the tail of the directory names before use the names.

(From OE-Core rev: a539e823d002fefe129e3045f893d1237fadb87f)

Signed-off-by: Jian Liu <jian.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:41 +01:00
Yang Shi 35318696ad kernel: Prevent from installing so files into source dir
vdso build could generate so files, avoid installing such so files into kernel
source dir, otherwise the below package QA error might be hit:

ERROR: QA Issue: File '/usr/src/kernel/arch/x86/vdso/vdso64.so' from
linux-yocto was already stripped, this will prevent future
debugging! [already-stripped]

(From OE-Core rev: daff14bf44c59542c8b8f1a455dcc59586be7e59)

Signed-off-by: Yang Shi <yang.shi@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:26:10 +01:00
Paul Eggleton 76070017cd classes/autotools: avoid error if recipe is first in task dependency tree
If the recipe being built is listed first in BB_TASKDEPDATA (i.e. item
0) this is still valid and should not trigger an error.

(From OE-Core rev: 945c98969bcfe5516b89ac6dfbe4552fb5d68a48)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:26:09 +01:00
Paul Eggleton be02588097 classes/sstate: ensure do_package_qa_setscene doesn't pull in do_package_setscene
If we have done do_package_qa_setscene we do not also need
do_package_setscene. This means we can again for example rebuild an image
without needing do_package sstate packages to be present.

(From OE-Core rev: a0f584ac3d5a94dec121b684206ecd40c968f7fc)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18 21:47:58 +01:00
Martin Jansa 3223a704f9 buildhistory: rename build-id to build-id.txt and add more info
* use .txt extension like other reports (e.g. image-info.txt) it's
  also useful when looking at the file from web server which doesn't
  have text/plain as default content-type
* include whole BUILDCFG_HEADER/BUILDCFG_FUNCS instead of just layer
  info
* this makes it easier for distro to include more fields without the
  need to modify buildhistory.bbclass
* currently it adds following fields:
  Build Configuration:
  BB_VERSION        = "1.23.1"
  BUILD_SYS         = "x86_64-linux"
  NATIVELSBSTRING   = "Gentoo-2.2"
  TARGET_SYS        = "x86_64-oe-linux"
  MACHINE           = "qemux86-64"
  DISTRO            = "shr"
  DISTRO_VERSION    = "2013.07-next-20140725"
  TUNE_FEATURES     = "m64 core2"
  TARGET_FPU        = ""

(From OE-Core rev: 6db6c74f2876df7a183990426bb4262972966441)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18 21:47:58 +01:00
Corneliu Stoicescu c8de46cb06 meta/classes/testimage.bbclass: add testsdk task and enable functionality for it.
- add new testsdk task for meta-toolchain testing.
- enable the get_tests_list method to work with sdk tests.
- add default TEST_SUITES value for meta-toolchain package

NOTE: Original patch made by: Richard Purdie <richard.purdie@linuxfoundation.org>

(From OE-Core rev: b78bc50904d53d5091729de481b99cc3ac4aaa1e)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18 08:55:54 +01:00
Richard Purdie 59b0f7f01b chrpath: Drop warning from darwn builds
This was old debug which can safely be removed for less noisy builds.

(From OE-Core rev: d0be4b37743492fc9c178fd6f9ef73a5eb2fd9c3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-17 10:01:36 +01:00
Richard Purdie 7095d8da4b crosssdk: Clear MACHINEOVERRIDES
Without this, things like arm* can make it into OVERRIDES when we're
building a compiler to build binaries for another architecture like
x86. This can can lead to build failures dependning on the
exact configuration and overrides.

For example:

MACHINE=imx53qsb bitbake gcc-crosssdk-initial-x86_64 -e | grep EXTRA_OECONF

was showing an armv7 configuration option to gcc.

(From OE-Core rev: 859ac3fdb75303f9f0b4bf1d8d83db0069f0a27b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-16 08:22:45 +01:00
Robert Yang c4f51a048f image.bbclass: image_types.bbclass is a must
The image_types.bbclass is a must since we use this in image.bbclass:

[snip]
python () {
    deps = " " + imagetypes_getdepends(d)
    d.appendVarFlag('do_rootfs', 'depends', deps)
[snip]

The imagetypes_getdepends() is defined in image_types.bbclass. Use "+="
to replace "?=" since it is a must, so that the user can use
"IMAGE_CLASSES = foo.bbclass" in local.conf to add their own image
class.

NOTE: the IMAGE_CLASSES_append = " foo" doesn't work since we use this
in image.bbclass:
 IMAGE_CLASSES += "image_types"
 inherit ${IMAGE_CLASSES}

I think that it is because inherit takes effect before append?

Another way to fix the problem is:
IMAGE_CLASSES ?= ""
inherit image_types ${IMAGE_CLASSES}

But it seems that we need another name for IMAGE_CLASSES, for example
IMAGE_CLASSES_EXTRA, and also need update the doc, which would make it
complicated.

(From OE-Core rev: c225613d997ef40dedf64b880b5ca4ae89adfded)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:51 +01:00
Mike Looijmans c23b321b44 Support image type "squashfs-lzo"
Add "squashfs-lzo" to the image types. LZO compression support has been
in both kernel and squashfs tools for many years, but OE never enabled
it.

(From OE-Core rev: ab659b1c1e13fd6863893abff86990d88aa36790)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:51 +01:00
Peter Seebach cb1ab746dd multilib_global.bbclass: PREFERRED_PROVIDERS for multilibs
The code in base.bbclass to spread PREFERRED_PROVIDERS values
to multilibs doesn't work for things which rely on TARGET_PREFIX,
such as virtual/${TARGET_PREFIX}gcc. This is because the expansion
of TARGET_PREFIX produces the wrong value if executed prior to
the assignment of TARGET_VENDOR_virtclass-multilib-libxx, which
will always happen since that assignment doesn't happen until recipe
parsing, but the PREFERRED_PROVIDERS expansion is happening
around ConfigParsed.

To solve this, we make a couple of changes. First, the creation
of the TARGET_VENDOR override values is moved into a new ConfigParsed
event handler in multilib_global. Second, the preferred_ml_updates()
function's code is moved into that function too. It seems safe to
assume that PREFERRED_PROVIDER values only need to be spread to
other multilibs when multilibs are in use.

I don't think this directly affects any use cases that don't involve
third-party or alternative toolchains.

(From OE-Core rev: 513f72274460e54fd35dda5ef70fa42ba2b284f8)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:50 +01:00
Peter A. Bigot 14a2d1eaa1 sdk: change EXTRA_OECONF_FPU to EXTRA_OECONF_GCC_FLOAT
This variable is used to ensure the proper version of --with-float=FOO
is passed to gcc's configure script.  gcc also has a --with-fpu=FOO
option that means something different.  To avoid confusion, change the
names to be consistent.

(From OE-Core rev: c17d883fa99b6967d83c3796d22fc0c1dbe704e6)

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:50 +01:00
Martin Jansa b8a001dc24 cmake: drop -fpermissive
* it was dropped from default CXXFLAGS in:
  commit 24dd8e129447013ee98609f3892ec414b1b21340
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Sun Mar 2 17:38:33 2014 +0000

    bitbake.conf: Drop -fpermissive

    Drop the -fpermissive C++ compiler flag. We've had this around for years, most
    code should have been fixed long ago. Its possible some recipes may fail
    however we can (and should) just use the flag where needed.

* I haven't build world with this yet, but maybe it's time to
  drop it here as well at least for consistency

(From OE-Core rev: 578124aedd3dbffd79ea01862d57223ffaa7216a)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:49 +01:00
Maciej Borzecki a346777b83 cml1.bbclass: fix diffconfig diff command
Commit 6a7b989933 introduced a typo in
command, a whitespace was missing between --new-line-format and path to
original file. As a result, diffconfig task did not work, diff failed
with exit status 2, resulting in empty fragment.cfg.

(From OE-Core rev: 8c75aa7c30cc5a796962d099896ca2a9a16c3a06)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:47 +01:00
Richard Purdie 82b7504691 populate_sdk_base: Move toolchain installation script to a separate file
It makes sense to move the script to a separate file, making the bbclass
clearer and allowing the end user to more easily customise or replace
it. There are no functionality changes, just the addition of some
substitution variables.

(From OE-Core rev: f99732a29689c65083ad09abb302f372042c8cd4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:46 +01:00
Richard Purdie 2501287c69 rootfs_*: Refactor common depends/lockfile task flags
(From OE-Core rev: 96427656ef73bb50753a33ec6ad5e73de711ceb3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:46 +01:00
Richard Purdie e6837f785c classes: Combine rootfs_<pkgtype> and populate_sdk_<pkgtype>
There is no real reason to have these separate files any longer. It does
mean in meta-toolchain type recipes some extra variables are defined but
it also means the common code can be grouped and maintained together
which I believe is more beneficial. We therefore merge the classes.

(From OE-Core rev: 2cf42b49003494e1b10775523c9a2547eaf16ea4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:46 +01:00
Robert P. J. Day a3d0a7bdc2 base.bbclass: Remove old-style definition of do_build() task.
(From OE-Core rev: f31316b96a97e72d866f12a8e4bb33eaaa54b923)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 11:27:33 +01:00
Martin Jansa a1fa222d48 test-dependencies, insane.bbclass: improve the message
(From OE-Core rev: b73e6159aed1a9768d02d12e7894ca0f1e72be69)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 11:27:32 +01:00
Robert P. J. Day 23ff42e8a0 core-image.bbclass: Correct comment about packagegroups.
Default core image actually includes packagegroup-base-extended, not
just packagegroup-base.

(From OE-Core rev: 1e567d497713c31e03b58c9997058fc4c0181e5a)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:07 +01:00
Robert Yang 0065258234 boot-directdisk.bbclass: use local HDDDIR
Use $HDDDIR rather than ${HDDDIR} in build_boot_dd(), otherwise may
errors:
- Set these in local.conf:
  IMAGE_FSTYPES += "live"
  IMAGE_FSTYPES += "vmdk"
  AUTO_SYSLINUXMENU = "1"
  NOHDD = "1"

$ bitbake core-image-sato
  DEBUG: Executing shell function build_boot_dd
  install: cannot create regular file
  `/path/to/core-image-sato-1.0/hddimg//vesamenu.c32': No such file or directory
  WARNING: exit code 1 from a shell command.

This because it uses the ${HDDDIR} which is set in bootimg.bbclass, use
local HDDDIR which is set in build_boot_dd() will fix the problem.

(From OE-Core rev: 1891c39a359e983bb8fd7992b7b5a1aaac11baf7)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:05 +01:00
Nitin A Kamble bfa36a2188 code cleanup for INITRD variable handing
* Remove an unnecessary check
* Instead of ignoring, report the errors

(From OE-Core rev: 7afc6df6f0d0bbe0c5cb8ec021d430d6d9714941)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-06 10:27:00 +01:00
Chong Lu 268688a489 oelint.bbclass: Check for ${PN} or ${P} usage
Check for ${PN} or ${P} usage in SRC_URI or S.
We should use ${BPN} or ${BP} instead to avoid breaking multilib.

[YOCTO #5427]

(From OE-Core rev: d5a1999a7dc216b8182440cf9e8489ec79a6606e)

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-06 10:23:40 +01:00
Chong Lu 207e94d4e1 oelint.bbclass: add patch checking
Check that all patches have Signed-off-by and Upstream-Status.

[YOCTO #5427]

(From OE-Core rev: a2b6be10daca733ba4e557bd2d831c60589e9ffd)

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-06 10:23:39 +01:00