Commit Graph

3050 Commits

Author SHA1 Message Date
Mark Hatle 0bc564af07 image.bbclass: Move runtime_mapping_rename to avoid conflict w/ multilib
[YOCTO #4993]

Move the runtime_mapping_rename into a prefunc for the do_rootfs function.
Otherwise doing it in the python section could occur BEFORE the multilib
classes renaming.

If the package 'b' is a kernel module, then lib32-b and b should both
point to the same package.  The runtime_mapping code will do this
automatically.

Before if you ran: bitbake lib32-<image>

It may do:

start PACKAGE_INSTALL (a b c)
remap  (a b c)
MULTILIB naming (lib32-a lib32-b lib32-c)

What we want is:

start PACKAGE_INSTALL (a b c)
MULTILIB naming (lib32-a lib32-b lib32-c)
remap (lib32-a b lib32-c)

(From OE-Core rev: 836662c9a9c175521dbcd29cdfc0a7c144d8770f)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-13 23:06:01 +01:00
Stefan Stanacar bc4b98bd4c classes/testimage: create a link for qemu boot log
The full name for the log is confusing when there are multiple files.
Also move the ssh log path stuff where it's needed.

(From OE-Core rev: 1dbef61a0776ec6c9ac9209442bb4c346e706d7d)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-13 23:05:59 +01:00
Martin Jansa 5c7b8fc342 buildhistory: use bb.utils.mkdirhier instead of os.makedirs
* Multiple do_fetch[prefunc] can happen at the same time and
  if not os.path.exists(pkghistdir):
    os.makedirs(pkghistdir)
  isn't safe
* Use bb.utils.mkdirhier which doesn't raise error when directory exists

(From OE-Core rev: 9aac194d7db79129dcbed29cfb89c57dccf33729)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-12 13:09:50 +01:00
Martin Jansa 560dac6e7d buildhistory: use package_qa_handle_error for version-going-backwards
* this way it's easier for distro to select if such issue should be
  error, warning or ignored and also it gets recorded in qa.log

(From OE-Core rev: 44624853de8c88abdcae2ccd0902b390ff546d4c)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-12 13:09:50 +01:00
Otavio Salvador de17b597fa base.bbclass: Fix PACKAGECONFIG usage comment
(From OE-Core rev: eb54badb971eff34dcbf8c111bf1ab9deae3a149)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 12:39:59 +01:00
Javier Viguera 9b6fd47010 kernel.bbclass: fix typo
(From OE-Core rev: 8e8ea9294078526a4bb3ade54482cf4d2213b497)

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 12:39:59 +01:00
Fathi Boudra 6eb01bf03b libc-package.bbclass: Add armeb architecture to locale_arch_options
Fix gconv build failure on ARM big-endian architecture:
ERROR: locale_arch_options not found for target_arch=armeb
ERROR: Function failed: unknown arch:armeb for locale_arch_options

(From OE-Core rev: a714cdf431635c4a344d3a135a71061e5629eed8)

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 12:39:54 +01:00
Ross Burton 60a8903ab2 buildhistory: add a note when committing to buildhistory
If there's been a lot of changes the commit to buildhistory can take a
significant amount of time, so print a note so there's some indication of
progress.

(From OE-Core rev: ccd911ba8887f5c9a72d5178617c2a3ee73264ff)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 12:39:54 +01:00
Paul Eggleton ac60aa8cf7 classes/sanity: fix some grammatical errors in messages
(From OE-Core rev: e2cccd73e480318461641d8bc26d538178ff628a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-03 10:33:13 +01:00
Paul Eggleton 9aba9225d3 classes/sanity: check for suid root command evility
Some users have been found to have an unnamed third-party piece of
software installed which sets chmod, chown and mknod as suid root as
part of its installation process. This interferes with the operation of
pseudo and can result in files really being owned by root within the
build output, and therefore breaks the build, apart from being a
security issue. Check for this and bail out if it is found.

Reported-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>

(From OE-Core rev: 08d61529f3c7a48ec82e1f8c9c28c7b2e5238934)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-03 10:33:12 +01:00
Emilia Ciobanu 683f454bd2 distrodata.bbclass: Include PRSPV variable in upstream version checking
The PRSPV variable is used for the packages that have different
representation for a same upstream and local version (e.g 2.0 vs 20).
In this case, the system is using PRSPV instead of PV when comparing
the local and upstream versions.

The packages that are using this modification are the following:
	* zip
	* unzip
	* docbook-sgml-dtd-3.1-native
	* docbook-sgml-dtd-4.1-native

(From OE-Core rev: 1d709d61da99f0e8a897f40a9d2a14bfaa1ee77e)

Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:57 +01:00
Emilia Ciobanu 280b9a3b57 distrodata.bbclass: Remove whitespaces
(From OE-Core rev: 2275dd9507fa7b8c3e62ffcf8b9b16120f16fe8f)

Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:57 +01:00
Muhammad Shakeel 3b9b8d571d systemd: Remove init.d dir if systemd unit file is present and sysvinit not a distro feature
If systemd is supported DISTRO_FEATURE and sysvinit is not and also if
systemd_unitdir contains anything then no need to keep init.d scripts
for sysvinit compatibility.

(From OE-Core rev: 823c90ad344ca2205f3055e2dcae08c6616f29b7)

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:56 +01:00
Wenzong Fan d8e4a4bfc1 ccache: allow CCACHE_DIR to be overriden
Use weaker assignment for CCACHE_DIR to allow users to override it
if desired.

(From OE-Core rev: 61e864e2d020c820cf90807b48babee3b24f9446)

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:54 +01:00
Paul Eggleton f629afe153 classes/rootfs_rpm: implement BAD_RECOMMENDATIONS for RPM
Add support for the BAD_RECOMMENDATIONS variable that can be used to
prevent specific packages from being installed via an RRECOMMENDS
relationship when using the RPM backend. (Previously this
functionality was only available when using ipk packaging.)

In the process this moves the defaulting of BAD_RECOMMENDATIONS (as
empty) to bitbake.conf since it is no longer specific to the ipk
backend, as well as unifying some of the code that creates the
configuration for smart for use on the host and target.

Fixes [YOCTO #3916].

(From OE-Core rev: 4e85129a7d47baf3e32b815cbc277bff84e085a0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:09:15 +01:00
Paul Eggleton face212d60 classes/image: ensure BAD_RECOMMENDATIONS supports pre-renamed package names
Use runtime remapping on BAD_RECOMMENDATIONS just as we do with
variables such as IMAGE_INSTALL, so that we're specifying the name prior
to any renaming e.g. that done by debian.bbclass. Note that this is a
change in behaviour for renamed packages, however this is the correct
thing to be doing; a search of existing layers suggests this shouldn't
cause widespread incompatibilities.

(From OE-Core rev: aea9d379ea217c78b64a81853ec3744188158008)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:09:15 +01:00
Martin Jansa dc03e67699 gettext: disable nls when INHIBIT_DEFAULT_DEPS is set
* for example in gcc-runtime DEPENDS_GETTEXT from gettext.bbclass isn't
  used because gcc-runtime recipes also set INHIBIT_DEFAULT_DEPS,
  explicitly disable NLS when DEPENDS_GETTEXT is empty
* this is causing undeterministic build
  if you compare i586-oe-linux/libstdc++-v3/config.log in WORKDIR when building
  gcc-runtime before and after building gettext-native you'll see that msgfmt
  isn't found in one of them and gcc-runtime-locale-{de,fr} packages
  aren't created, there is only one file in them:
  gcc-runtime-locale-de/usr/share/locale/de/LC_MESSAGES/libstdc++.mo

(From OE-Core rev: 8f0b07fc53c94426efa3557424328b52a61e7305)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:09:11 +01:00
Ross Burton 8b7c6efe36 sanity.bbclass: mention version when erroring on LCONF_VERSION mismatch
If someone is using a Poky release but not the Poky distribution they'll get a
bblayers.conf generated from meta-yocto's template with a LCONF_VERSION that
doesn't necessarily match LAYER_CONF_VERSION (default in sanity.conf), as Poky
overrides LAYER_CONF_VERSION to cater for the meta-yocto split.  The resulting
error message will tell them to compare bblayers.conf with bblayers.conf.sample,
but they're identical.

By explicitly refering to the required and actual versions this situation is
hopefully clearer.

(From OE-Core rev: da58843fd07dec43700a4c54ac469d1fda71aa50)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:09:03 +01:00
Ionut Radu 3e3ab8e02d useradd.bbclass: fix traceback when inheriting useradd but not setting USERADD_PARAM or GROUPADD_PARAM
Replaced bb.build.FuncFailed with bb.fatal

[YOCTO #4486]

(From OE-Core rev: be6d0f398404e4566d4fac145c745899909117f1)

Signed-off-by: Ionut Radu <ionutx.radu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:09:01 +01:00
Andreas Müller 054b932f7b package.bbclass: avoid packing debug sources from other packages
The error case was gcc-dbg packing files from libgcc-dbg reported in [1]

[1] http://lists.openembedded.org/pipermail/openembedded-core/2013-July/080728.html

(From OE-Core rev: fd2c0af422d67da870a5a11720d06a871e660215)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:09:00 +01:00
Olof Johansson b71aa9758a cpan.bbclass: Fail unless Makefile.PL generates Makefile
Makefile.PLs can exit with success without generating a Makefile,
e.g. in cases of missing configure time dependencies. This is
considered a best practice by cpantesters.org. See:

 * http://wiki.cpantesters.org/wiki/CPANAuthorNotes
 * http://www.nntp.perl.org/group/perl.qa/2008/08/msg11236.html

(From OE-Core rev: 0a2dffefc6fbca37ce9604117cebc2f7d4abc1c6)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:08:59 +01:00
Muhammad Shakeel 67864ca79d systemd: Remove systemd_unitdir if systemd is not in distro features
If systemd is not supported DISTRO_FEATURE than there is no need to
package related service files.

(From OE-Core rev: ac5d20f4adac69ea1702694fb50849c9e465b443)

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-24 11:35:39 +01:00
Jonathan Liu 1d5d93101e boot-directdisk: use awk instead of echo -ne for dash compatibility
The echo command is a dash shell built-in and does not support the
-n and -e options so use awk instead.

This fixes the partition table being corrupted when writing the MBR
disk signature into the image.

[YOCTO #4859]

(From OE-Core rev: 1928f46e8e9f281e3e64f916048cc9314e125150)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-24 11:35:36 +01:00
Chen Qi 6d42c27183 extrausers.bbclass: add a new bbclass
This class is dedicated to image level user/group configuration.
It inherits useradd_base.bbclass.

Users need to inherit this class in their layers or local.conf to
make the setting of EXTRA_USERS_PARAMS effective.

For detailed configuration format of EXTRA_USERS_PARAMS, please
refer to local.conf.sample.extended.

[YOCTO #4074]

(From OE-Core rev: 4b6deb521183b728d9a1c651d4805fe635e6cb50)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-24 11:35:35 +01:00
Chen Qi 50d2548f74 useradd.bbclass: add a new base class and code refactor
Add a new base class, useradd_base.bbclass, which is mainly a
collection of basic functions for user/group settings.

The useradd_base.bbclass is intended to be inherited by useradd.bbclass
and the extrausers.bbclass to avoid code cuplication.

[YOCTO #4074]

(From OE-Core rev: 2a57bb7e9a7e154578aa7cb9aeebdf398a54ec00)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-24 11:35:35 +01:00
Stefan Stanacar 8db36429ef populate_sdk_base.bbclass: use new perm option for find
Old way find -perm +mode is no longer supported in newer
versions of find (Fedora 19). Man page says:
-perm +mode
       This  is  no  longer  supported  (and  has been deprecated since
       2005).  Use -perm /mode instead.

[YOCTO #4853]

(From OE-Core rev: 21b079e01873e2fb4d8674541e8c5818ba73554e)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-18 21:23:45 +01:00
Paul Eggleton 77742dd0c9 classes/insane: allow libdir QA check to be skipped using INSANE_SKIP
This path check isn't handled in the normal way where a QA check
function is called for every file (there's some minor setup that we want
to avoid doing for every file) so we need to check INSANE_SKIP
explicitly.

In the process, change the code structure a little bit so that we can
report the package that contains the errant file.

Fixes [YOCTO #4822].

(From OE-Core rev: 3bdbec1bdecc52828cbbf8108786ff076c981845)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-18 21:23:43 +01:00
Paul Eggleton 20d7b27b8f classes/insane: fix regression in libdir QA regex
There was a slight mistake in the recent change to the lib_re regex -
it still needs to begin with a /.

(From OE-Core rev: 194e47e6d8d9b9ee98e0203f0ebb574084277c46)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-18 21:23:43 +01:00
Mark Hatle 3cef1294f2 terminal.bbclass: Fix BB_RUNFMT processing
BB_RUNFMT can include task and taskfunc, as well as func and pid.  Add the
two missing items toe the runfmt processing.

Also BB_RUNFMT can include arbitrary directory structure.

(From OE-Core rev: 95f6e9a3d8fa24acc3bab392719e2d92be25d806)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-18 21:23:42 +01:00
Mark Hatle 4a6f939b4d sanity.bbclass: Update gcc sanity check
The gcc sanity check should be checking for the atomic function directly
instead of using the gcc macro.  Older versions of gcc do not have the macro
defined, but do support the atomic operations.  (glib-2.0 checks for both
the macro and the function, as long as one is available it will successfully
compile.)

Update the check to try both -mcpu=native and -mcpu=BUILD_ARCH.  Tell the user
which version worked properly.

[YOCTO #4845]

(From OE-Core rev: c126729b29822d3602c9c4fd9016cc79b6057fc5)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-18 21:23:41 +01:00
Stefan Stanacar 656a8b97c1 testimage.bbclass, lib/oeqa: add headers and comments
Adds some comments to testimage.bbclass and the files it calls,
just to give an ideea of what it does.

(From OE-Core rev: 8bbb7116cf02466dfc59a17dc7bb51287aeea55b)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:17 +01:00
Stefan Stanacar 655da29dac classes/testimage.bbclass: use a copy of rootfs for tests
Make a copy of the rootfs and test that.
We can now drop the snapshot option.

(From OE-Core rev: ba58f1fe8fb7a0e3ff9320dfc108235d484da6a1)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:16 +01:00
Alexandru Palalau 2079a30b1f lib/oeqa/runtime: add tests for syslog and df
Add tests for free space and syslog.

Changed in v2:
    - limit df's output to /
    - syslog: fix restart in case of systemd

(From OE-Core rev: 1b39d57e7b5c9b69d565cf4d188ebc2f14e66ae6)

Signed-off-by: Alexandru Palalau <alexandru.palalau@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:16 +01:00
Stefan Stanacar 9c4a02b6c6 testimage.bbclass, lib/oeqa/utils/qemurunner.py: make boot timeout configurable and increase it
On a loaded host (such as an AB setup where multiple builds run)
the 200 seconds timeout might not be enough to reach the login prompt.
Also make it configurable so we can set it from local.conf/auto.conf

(From OE-Core rev: e828571683333e6f18ed56a84e114b5e54975bc7)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-16 10:04:15 +01:00
Emilia Ciobanu 06ae127aed distrodata.bbaclass: change in git and svn package reporting
For git packages the Package Reporting System should always report the
latest HEAD.
For svn packages the new version reporting has the following format:
	version+svn[r|-]revision

(From OE-Core rev: 43c28375f97161e618fa54349c65be2058c33c53)

Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-13 18:23:38 +01:00
Bian Naimeng 63645af528 package_rpm.bbclass: remove xx.spec before doing rpmbuild xx.src.rpm
If the spec file already exist, and has not been stored into pseudo's files.db,
it maybe cause rpmbuild src.rpm fail, so remove it before doing rpmbuild src.rpm.

(From OE-Core rev: 760af902a98b350a2f1f3203fa0096965924a83d)

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-13 18:23:33 +01:00
Jonathan Liu b52d2bb46e boot-directdisk: allow specifying custom MBR disk signature
This introduces a DISK_SIGNATURE variable that allows controlling the
32-bit MBR disk signature. By default it is set to an automatically
generated disk signature but it may by overridden in the image recipe
by setting DISK_SIGNATURE to a 8 digit hex string.

This DISK_SIGNATURE variable can also be used in the image recipe to
specify the root by UUID using:
SYSLINUX_ROOT = "root=PARTUUID=${DISK_SIGNATURE}-02"

Specifying the root by UUID allows the kernel to locate the root
filesystem even if the device name changes (e.g. /dev/hda2, /dev/hdb2 or
/dev/sdb2 instead of /dev/sda2) due to differences in hardware
configuration.

(From OE-Core rev: 4382a419b4c90312d22aa55ff535b45bcf704716)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Acked-by: Darren hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-13 18:23:33 +01:00
Robert Yang 258b8a2cb4 package_deb.bbclass: make DESCRIPTION support newline
The recipe's DESCRIPTION is wrapped automatically by textwrap, make it
support newline ("\n") to let the user can wrap it manually, e.g.:

DESCRIPTION = "Foo1\nFoo2"

In the past, it would be:
Foo1\nFoo2

Now:
Foo1
Foo2

[YOCTO #4348]

(From OE-Core rev: 568e303ef4447a9ddb7fb6370166d012a4375dab)

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>
2013-07-10 09:42:03 +01:00
Robert Yang 33cd81e18b package_ipk.bbclass: make DESCRIPTION support newline
The recipe's DESCRIPTION is wrapped automatically by textwrap, make it
support newline ("\n") to let the user can wrap it manually, e.g.:

DESCRIPTION = "Foo1\nFoo2"

In the past, it would be:
Foo1\nFoo2

Now:
Foo1
Foo2

[YOCTO #4348]

(From OE-Core rev: dff04de2de8bb159fd6912e29794eadd75d5d92a)

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>
2013-07-10 09:42:03 +01:00
Robert Yang 477b2c9860 package_rpm.bbclass: make DESCRIPTION support newline
The recipe's DESCRIPTION is wrapped automatically by textwrap, make it
support newline ("\n") to let the user can wrap it manually, e.g.:

DESCRIPTION = "Foo1\nFoo2"

In the past, it would be:
Foo1\nFoo2

Now:
Foo1
Foo2

[YOCTO #4348]

(From OE-Core rev: 503b6370080fcbcd99305eac846c6dfbdd07c5df)

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>
2013-07-10 09:42:02 +01:00
Ross Burton 9190cfd0a3 gtkdoc: set the default docdir to ${S}, not ${B}
Previously these directories were the same location, but with
seperatebuilddir.inc they are not and putting the file into ${B} means it goes
to the wrong place for autoreconf.

(From OE-Core rev: 6f06c6b220c05b6aca9d2d21f528d4e1b5e417d0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:42:01 +01:00
Bernhard Guillon d8cba33912 populate_sdk_base.bbclass: allow $OECORE_NATIVE_SYSROOT in sdk_env_script
Only grep for 'OECORE_NATIVE_SYSROOT=' otherwise things like

toolchain_create_sdk_env_script_append() {
    echo 'export MY_DIR_FOO=$OECORE_NATIVE_SYSROOT/my/dir/foo' >> $script
}

trigger the following error while executing the install script:

find: `$OECORE_NATIVE_SYSROOT/my/dir/foo': No such file or directory

(From OE-Core rev: d084c31720f9c13a71c5981f4eda21e18ba2350f)

Signed-off-by: Bernhard Guillon <Bernhard.Guillon@hale.at>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:42:01 +01:00
Laurentiu Palcu 92d9ce39b6 populate_sdk_base: fix bashism
Only the printf bash builtin knows about %q format option for escaping
spaces. The coreutils version doesn't. Unfortunately, neither dash nor
sh have a printf builtin. So, escape the spaces using sed.

[YOCTO #4811]

(From OE-Core rev: 6ac06a65ce52d4c123da53f115c84cb0a98bc18f)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:41:51 +01:00
Randy Witt ce1638c50d systemd: Don't enable systemd services when native.
It shouldn't be desired that systemd enable services when using
class native. Blanking out the SYSTEMD_PACKAGES when native seems
like the most straightforward way to fix this problem.

(From OE-Core rev: e0ce07010d2e818dc43ffdff6f3cdd94f18d7af5)

Signed-off-by: Randy Witt <rewitt@declaratino.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:41:51 +01:00
Stefan Stanacar 1328d49625 classes/testimage.bbclass: new class for image tests
Replacement class for imagetest-qemu.bbclass. It launches a qemu instance and
runs test modules defined in TEST_SUITES.

(From OE-Core rev: e0e32b978e5af128d7ff4ee2686777b49f919e27)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-09 10:53:43 +01:00
Joe MacDonald 4d326e5edf sstate.bbclass: Add an extra check for sstate_mirrors
BB_NO_NETWORK disables any fetching, however if we're using an external
sstate cache, we may want to be able to fetch those objects even if we are
not fetching the upstream sources.  Denote this situation by setting
SSTATE_MIRROR_ALLOW_NETWORK in local.conf.  When it is found, for sstate
cache fetches, mask off BB_NO_NETWORK for the local function.

(From OE-Core rev: ed585cad2e1fdc323c05fa82055a071bcf98d1bc)

Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:34:26 +01:00
Mihai Prica 64745c27d2 insane.bbclass: Added QA warning for shipping /usr/share/info/dir
/usr/share/info/dir should be generated at install time in a postinst.
Added QA warning to check at build time for this file. The warning
is disabled by default.

[YOCTO #3969]

(From OE-Core rev: be93fa1d8fd601d95147980938217142c7d98c62)

Signed-off-by: Mihai Prica <mihai.prica@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:34:23 +01:00
Paul Eggleton 2f32ef9d1f classes/insane: fix libdir check regexes
Ensure these do not pick up e.g. /lib/systemd/system/uuidd.socket, but
ensure we pickup e.g. /usr/lib/libnss3.so.1d (example from Debian). This
also fixes the broken exec_re regex (lib*.).

(From OE-Core rev: 391a361190d7da19ad3381121649a41a28516cb5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:34:22 +01:00
Paul Eggleton 74a1426551 classes/package: print command output when commands fail
When external commands such as debugedit fail, it can be useful to see
their output, so use oe.utils.getstatusoutput() instead of
subprocess.call() to capture this and print it on failure.

(From OE-Core rev: 34179cc78b730ecb8ff3f4feb4beee2d17498ce3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-02 22:26:57 +01:00
Jonathan Liu 85f0cf943d qt4e.bbclass: export OE_QMAKE_QT_CONFIG
The class is inheriting qmake2.bbclass which exports OE_QMAKE_QT_CONFIG
pointing to the qt4 qconfig.pri when it should be pointing to the
qt4-embedded qconfig.pri.

(From OE-Core rev: ed78661e147780ceb1bc1e952b68740984d85971)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-02 22:23:51 +01:00
Tyler Hall c9c70d6241 terminal: Run command using a wrapper script
Some terminals may not pass the environment into the child process. This
is true when using "tmux split-window." If tmux is already running, it
will start the command with the tmux session environment, ignoring the
environment where the command was issued.

This could possibly be worked around when launching tmux by injecting
variables into the user's session environment or adding the variables to
the "update-environment" tmux setting. However, both methods would
permanently alter the user's session, which is undesirable.

By using a wrapper script, we have full control over the final
environment. Replace the env dictionary with an empty data smart that
will contain the exported variables and a wrapper function that execs
the original command.

(From OE-Core rev: 3bb96671e987ce8110ce98b9f6d9efc093f8d20e)

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-02 22:23:51 +01:00
Paul Eggleton 80b2634304 classes/insane: remove la2 check which no longer exists from ERROR_QA
This check was actually removed a very long time ago in
6656381714, before we even changed the QA
checks to use names instead of numbers - the name was probably added
ERROR_QA mistakenly because it hadn't also been removed from the comment
listing the QA checks or the function that determined which ones were
errors.

(From OE-Core rev: ff65497cd9a96d5ab49b16ba1f7e30a216ff4a42)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 16:33:08 +01:00
Kai Kang 44b3c8dfa4 qt4*.bbclass: disable build qt on mips64 with 64 bits userspace
Qt/qt-embedded build fails on mips64 with 64 bits userspace. Set
COMPATIBLE_HOST in qt4e.bbclass and qt4x11.bbclass to disable build
qt/qt-embedded and packages which inherit these two classes on mips64
with 64 bits userspace.

(From OE-Core rev: 17890ebd637da0b3bf78804002d8b4f0ace078d2)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 10:41:46 +01:00
Richard Purdie d3ce916c7c packagedata: Show error when trying to change PE/PV/PR from runtime/pkgdata
PN/PE/PV/PR should never change between do_package and the following do_package_write_*
tasks. If any do change you would see build failure due to the wrong WORKDIR being
used for example.

This patch ensures that if something is going wrong we see the error earlier and
with some better warning about what the real problem is.

[YOCTO #4102 partial]

This is a rewritten version of a patch from Martin Jansa <martin.jansa@gmail.com>

(From OE-Core rev: f5252fea11e13dbcec1c277cf1bf0d7e61b60690)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 10:01:28 +01:00
Richard Purdie 1cc028840d package: Ensure we iterate all the pool objects
There is the possibility that if we don't iterate through the multiprocessing
pool objects we might not catch return codes and this could lead to hung/zombie
processes either temproarily or on a wider scale. Adding this certainly doesn't
hurt anything and is better practise so we might as well do it.

Its not 100% clear if this fixes some issues or not.

(From OE-Core rev: 89c8493d4d85044cd72af2756569d15e87cd5947)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 10:01:27 +01:00
Mark Hatle 9b007f61b2 sanity.bbclass: Check for the known broken version of make
See GNU Savannah bug 30612 -- make 3.82 is known to be broken.

A number of vendors are providing a modified version, so checking
for just the version string is not enough.  We also need to check
if the patch for the issue has been applied.  We use a modified
version of the reproduced to check for the issue.

(From OE-Core rev: dede532a980b0fabf0beae4519b89ec74a1c2474)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 09:14:07 +01:00
Roy.Li b09bc24c94 autotools.bbclass: force copy Makefile.in.in to ${S}/po/
If a Makefile.in.in has existed under ${S}/po/ and is read-only, cp will fail.

(From OE-Core rev: 6e1b17f19411ed897c53ae0ef41a2d2972a9c113)

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 09:14:07 +01:00
Mikhail Durnev c62b1a3338 useradd.bbclass: Add members to a group
useradd.bbclass supports adding new users and new groups. But it does not
support adding existing users to existing groups.

There is a need of adding users to some groups (e.g. audio). The class was
extended to call groupmems utility with arguments passed via GROUPMEMS_PARAM.

(From OE-Core rev: 6b3bd34bf8c5e511bccfbb64bdd1236e1e7576e3)

Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 09:14:07 +01:00
Enrico Scholz 0450c31ca4 image_types.bbclass: set 'filetype' ext4 feature
Generating filesystems with this flag allows more efficient directory
traversals because getdents() returns the filetype in 'd_type' which
allows to avoid an extra lstat() call.

Creating ext4 filesystems with 'mkfs.ext4' sets this flag by default
too.

(From OE-Core rev: 75e077025397f3bde84e60a9da2c0564ade09b39)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 09:14:06 +01:00
Richard Purdie 042203531b sanity.bbclass: Fix COREBASE sanity tests
We need to expand the COREBASE variable, no idea how these tests were
previously working at all...

(From OE-Core rev: 099063f353a7a18720c92d87400726a49eed432f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-27 12:48:56 +01:00
Richard Purdie 4707a74db3 sanity.bbclass: Add check for @ character in build directory name
The @ character is not escaped properly in too many places within the system
to easily support it so add the character to the list of blacklisted characters.

Also tweak the other messages and ensure that all appropriate error messages
are disabled in one go.

[YOCTO #4772]

(From OE-Core rev: 008cb3c501c8313a0a1a0ebce2b0aa61239b548d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-27 10:04:50 +01:00
Laurentiu Palcu 8e9501ffa8 populate_sdk_base, adt_installer: abort install if path contains spaces
Spaces are not handled properly in some parts of oe-core and it's safer
to abort toolchain installation if path contains spaces. Even though
we fix space handling in the toolchain installation script, there are
various other parts in the toolchain (perl scripts, sysroot path passed to
toolchain binaries, shebang lines) that would need special handling. So,
for now, just bail out if path contains spaces.

The checking for spaces in the path is done after expanding relative
paths to absolute and tilde conversion.

[YOCTO #4488]

(From OE-Core rev: 8c35ba2d3048ce69f74f72cb2676e4bc162cfb63)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:59:17 +01:00
Richard Purdie 87da290804 sanity.bbclass: Various improvements
I started trying to make some changes in sanity.bbclass and couldn't stand
the current code. This patch splits out the one big function into a number
of smaller units and adds a status class which handles queuing of messages
and issues like network errors and whether a reparse is required. It also
cleans up some syntax and obsolete code.

The other fundamental change is the tests are split into ones which run
once and those which run at every build. This was always the way the
class was intended to work but that got lost somewhere along the way.
This patch fixes that.

Its still far from perfect but it is hopefully an improvement
and sets the scene for other improvements to be built on top of this.

(From OE-Core rev: 4e6de6d5f0454024eec2ec775a938c5dab70610c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-24 15:41:33 +01:00
Richard Purdie a355f13f73 sanity.bbclass: Drop horrible obsolete minversion hack
We once needed to do this, things seem to work fine without this now,
thankfully.

(From OE-Core rev: ac090ace11d654dafd642fd93c94091a164476fa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-24 15:41:33 +01:00
Richard Purdie 17b1507c02 base.bbclass: Ensure finalised data is displayed in build banner
The build banner displayed at the start of builds can be misleading since
the data store has not been finalised. As easy way to illustrate this is
to use something like:

DEFAULTTUNE = "i586"
DEFAULTTUNE_<machineoverride> = "core2"

and the banner will display the i586 tune yet the core2 tune will be
used. We can avoid this if we finalise a copy of the data before
displaying it.

[YOCTO #4225]

(From OE-Core rev: bdce39f22a0e8c8e1cf237322657220e4201077d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-21 09:19:27 +01:00
Richard Purdie de1841d9c2 utility-tasks/distrodata: Add recideptask flag for fetchall/checkuriall
See the bitbake commit adding the recideptask flag for details of the
problem but in summary, we weren't seeing the [depends] of tasks like
do_rootfs being taking into account for fetchall. This was leading
to not all sources being fetched and this is the OE-Core part of the
fix for this problem.

BB_DEFAULT_TASK is the default task used since this is the one that
most commands would end up targeting and is how users expect the command
to behave.

[YOCTO #4597]

(From OE-Core rev: abf468963a087244887384122fd5202909e7f118)

(From OE-Core rev: e385cc4ac06ac1e8d257563a700d19895105eade)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:10:46 +01:00
Paul Eggleton 827400fd09 classes/buildhistory: fix error when no packages are installed
"xargs -n1 basename" will execute basename even if there are no lines
piped into it, causing a "basename: missing operand" error if no
packages are installed, which will happen for the target portion of
buildtools-tarball.

(xargs' -r option could have been used here, but it is a GNU extension
and I thought it best to avoid that for the sake of future
interoperability).

(From OE-Core rev: 03d86123e9e804e62de38effd307f070d7863080)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:10:46 +01:00
Paul Eggleton 8e8de62a2d classes/package_tar: fix file ownership within tarballs
The fakeroot flag wasn't correctly set leading to files within the
output tarballs having uid/gid values from the build host instead of the
desired target permissions.

(From OE-Core rev: a31c7ec56568e5dafc2f45ba5675367ddceb0e3e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-19 18:03:35 +01:00
Richard Purdie 2631eff585 utils.bbclass: Tweak create_wrapper
Currently the full path is specified to exec however this may incorporate a
build path which in the nativesdk case, is not transformed to a target system
path. This leads to failures due to incorrect paths.

This patch ensures the full build path is not encoded into the wrapper script.

(From OE-Core rev: 4569d7403638e4c1f637e3a6adb8dea620dc8543)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-18 17:33:14 +01:00
Paul Eggleton f6f5eed533 classes/externalsrc: enable global inherit and simplify usage
This class can now be inherited globally using INHERIT += rather than
needing to inherit it in the recipe itself. Additionally, instead of
setting S (and optionally B), set EXTERNALSRC (and optionally
EXTERNALSRC_BUILD) to point to the external source and build locations
respectively.

(From OE-Core rev: b1da10579a28f9a5260a0678f6f15ce4b5a2706c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-18 17:33:14 +01:00
Kevin Strasser e1baa0de28 archiver.bbclass: check if package contains a copyleft license
The copyleft filter is only excluding packages that contain a
closed source license. This is because oe.license.is_included()
returns a boolean value that indicates if the license is excluded,
and a string that contains the matched included licenses. If the
string is empty it indicates that no licenses were matched.

Reject packages that do not contain a copyleft license.

[YOCTO 4630]

(From OE-Core rev: 3d0f9ee3d2fcce331d35467d5965ff44b825427f)

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17 16:45:35 +01:00
Laurentiu Palcu 194b395f85 distrodata.bbclass: fix syntax errors
Thes were added by the recent event handler changes.

(From OE-Core rev: 166313ca2edd05f7d3472ba23ba6f44ae12a7d12)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17 12:35:51 +01:00
Richard Purdie 53841ce521 classes/conf: Add eventmasks for event handlers
Now that bitbake supports masking events for event handlers, lets use
this so event handlers are only called for events they care about. This
lets us simplify the code indentation a bit at least as well as mildly
improving the event handling performance.

(From OE-Core rev: bff73743280f9eafebe4591f7368ead91a4eb74d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:55:47 +01:00
Richard Purdie 98abb113a0 scripts/buildenv-internal/sanity: Update to python 2.7.3 as a minimum
We're finding bugs in python 2.6 and starting to require unittest
functionality in python 2.7.x. Its time to bump the minimum version
requirement. Anyone without python 2.7.x can use the buildtools-tarball
out to install a standalone python/git/tar setup which will work
with the system.

(From OE-Core rev: 8b90f1becd40a7f857d2fbe30eaffe218a976419)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:53:52 +01:00
Richard Purdie 2cc601cd26 sanity: Drop pseudo test, now unneeded
(From OE-Core rev: 075278db6f7a4783c952c72eebddf51a12f76075)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:53:52 +01:00
Richard Purdie cfbd13ff22 scripts/bitbake sanity.bbclass: Migrate tests for git and tar versions
Migrate tests for correct git and tar versions from the wrapper script
to the sanity class.

This sets the scene to allow us to remove the bitbake wrapper script.

(From OE-Core rev: 7b370e23594da5dcb53cd5507ec289c3ef2d9fb5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:53:51 +01:00
Jonathan Liu 04af378874 classes/qmake_base: allow parallel make
Remove MAKEFLAGS= from EXTRA_OEMAKE to allow parallel make.

(From OE-Core rev: 1aeecaeee9bb1eee779973fce7f15cc7fad269a0)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-13 17:38:11 +01:00
Felipe F. Tonello 9bb1ba4695 qt: update qmake2 class to export qconfig.pri mkspec
This is necessary when Qt applications want to know variables such as
QT_MAJOR_VERSION, QT_VERSION, QT_MINOR_VERSION, GCC version, etc.

(From OE-Core rev: dcaa40e65d986587fa7c44f4285bbd0883478cc3)

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-13 17:38:11 +01:00
Randy MacLeod ad276d7d89 sanity.bbclass: non-zero status means that we need -march.
A non-zero status from the march test for gcc means that the "march" flag
is needed. Correct the logic to return True in this case.

(From OE-Core rev: 217fd857df78c66eae853f935e9cdafcbeb3bc31)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 21:46:07 +01:00
Christopher Larson 126844d0e1 copyleft_compliance: set 'dirs' flag on task
Without this, due to bitbake defaulting to ${B}, it's possible to get ${S}
inadvertantly created before do_unpack, breaking the unpack of git sources,
which expect the destination to not exist.

(From OE-Core rev: 694a15382fe9f3749ffdc0168a6dc2da8a29ae2d)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 16:16:02 +01:00
Christopher Larson 00c8834293 sstate.bbclass: fetch archive+siginfo in a single pstaging_fetch
This avoids unnecessary duplication of setup. The only visible change in
behavior will be the case if siginfo exists and the archive does not, in which
case it'll redownload both, but this doesn't seem unresasonable to me,
particularly since the archive is downloaded first, making this case
particularly unlikely.

(From OE-Core rev: aa4991c307d4bbdd06c3cbf8448240b74c5e01c4)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 16:16:02 +01:00
Christopher Larson fbf64380f4 sstate.bbclass: kill MIRRORS and FILESPATH to speed up fetching
The default FILESPATH isn't really of use, as we don't expect to find sstate
archives buried in layer recipe directories, and the default MIRRORS is
intended for use for fetching SRC_URI, not sstate.

(From OE-Core rev: 46402b2f5b69004751f6663d435bedae0ad9dab1)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:56:01 +01:00
Christopher Larson 29f8701402 copyleft_compliance: handle localpaths ending with '/'
(From OE-Core rev: 1f30d2eb2ef45550c71969c735275db1448b6ac6)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:56:00 +01:00
Christopher Larson 8331d0ad41 license.bbclass: include all licenses in the manifest
When we don't have a generic license file for the license in question, we can
warn, but we should still include it in the manifest, otherwise the manifest
doesn't reflect reality. Failing to include a license listed in the recipe in
the manifest can't be allowed.

(From OE-Core rev: e87232828b761d56f1ce6a27e4009d350d68209c)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:56:00 +01:00
Christopher Larson d4a7820eee insane.bbclass: quiet package errors not in *_QA
Currently, if a package QA type from package.bbclass is not listed in
ERROR_QA, it gets shown, regardless of whether it's in WARN_QA. This differs
from the behavior of the rest of the QA handling (which doesn't call
package_qa_handle_error at all if it's in neither _QA variable), and is
nonintuitive. Change this to use bb.note() if it's listed neither in ERROR_QA
nor WARN_QA, so it ends up in the task logs, but doesn't clutter up the user's
output.

(From OE-Core rev: 8f5675e6d3eb8473f367de72d2d3d8a702011a47)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:55:59 +01:00
Laurentiu Palcu 75070d7032 package_rpm.bbclass: handle pre/post remove scriptlets
Currently the scriptlet_wrapper is designed to handle only pre/post
install scriptlets. This patch will slightly change the wrapper script
to handle also pre/post remove scriptlets when we want to remove
packages from the final image.

(From OE-Core rev: aea47c77d69407b2e62f151cabba35293d179f0c)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:05 +01:00
Laurentiu Palcu e4a136a6bd rootfs_rpm.bbclass: switch to using run-postinsts
Since run-postinsts was made generic, use it for RPM too.

(From OE-Core rev: 1ba44302f522a42535c9ad7d2fcccc06ba4c20b3)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:05 +01:00
Laurentiu Palcu 1ce182e79e image.bbclass: remove unneeded files from the image
This patch creates a new function, rootfs_remove_unneeded(), that will
be called after rootfs_*_do_rootfs is called and which will handle
delayed postinstalls in a generic fashion, for all backends in the same
way.

(From OE-Core rev: d3d810faf8e93ce2d3faaa70da6deeb25b1cec26)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:04 +01:00
Laurentiu Palcu b11f818307 rootfs_*.bbclass: add some helper functions
This patch adds the following helper functions:
 * delayed_postinsts - outputs the list of delayed postinstalls;
 * save_postinsts - this will save the delayed postinstalls for ipk/deb
   in /etc/(ipk|deb)_postinsts;
 * rootfs_remove_packages - removes packages from an image;

Additionaly, this patch will remove a piece of code in
rootfs_ipk_do_rootfs which will be moved to image.bbclass and used for
all backends;

[YOCTO #4484]

(From OE-Core rev: 928df79cd3964f775c4c6e4283ef84b8882f9328)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:04 +01:00
Jonathan Liu 027358f940 classes/qmake_base: update .pro hack
This adds support for lconvert and xmlpatterns tools and tweaks the
sed expressions to handle more complex assignments in .pro files like:
LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease)

(From OE-Core rev: 542fefa61f0ac1dcdacac2630fd44950ac11cdd9)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:03 +01:00
Jonathan Liu 1319e17fa3 classes/qmake2: export OE_QMAKE_LCONVERT and OE_QMAKE_XMLPATTERNS
These will be used by qmake_base.bbclass.

(From OE-Core rev: 405d1325ebbd31676d88a3e157f55d40d04cc3f4)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:03 +01:00
Paul Eggleton f5c6663b37 classes/buildhistory: split SDK data by IMAGE_NAME
Data from SDKs produced from different images or different
meta-toolchain style recipes should go into separate directories,
since SDK_NAME doesn't include anything to differentiate these by
default (only pieces for the distro name and architectures).

Note you should delete or move existing data under the buildhistory/sdk/
directory manually after this change.

Fixes [YOCTO #4622].

(From OE-Core rev: 74658b66530184b0287152397341fbe411e90c71)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:02 +01:00
Marko Lindqvist 9682f1609c gnomebase.bbclass: add support for archive name different from BPN
Use new variable GNOMEBN, defaulting to value of BPN, instead of
BPN directly when determining URL for source archive.

(From OE-Core rev: fe297a70c7d6b36a6595534589c71d32209d6a53)

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:00 +01:00
Marko Lindqvist 706ce35957 gnomebase.bbclass: implement gnome_verdir() using trim_version()
(From OE-Core rev: 2341c0b801b62d0249567806a70d9a38f4dfe17f)

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:00 +01:00
Richard Purdie 7bf5c38e0f base/useradd/sstate: Ensure do_package setscene has correct fakeroot dependencies
The do_package_setscene task needs to depend on fakeroot in order to correctly
install its files.

We can whitelist the dependency in the sstate handling code for some
performance improvements since we only need this if we're installing the
package from sstate.

Also use an append operator in base.bbclass for clarity.

(From OE-Core rev: 0810ea2a72bdea67a3d8002c4e12fb20f45cf1d5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 17:52:08 +01:00
Richard Purdie 950b505ca1 package_*.bbclass: Drop fakeroot from setscene calls
Back in 2010, I added these in commit: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=36f1ae42fe13dae174b7fb5eb85dc49d7d7b516b
however the package_write tasks sstate only consists of package files and no
fakeroot privileges are needed to write these out, only originally create them.

We can therefore drop these for some small performance gains and a less
convoluted depenency chain.

(From OE-Core rev: 3c760ce4dc15d85be07aafbfea896e7276e0c2c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:31 +01:00
Yi Zhao dfd0985065 kernel.bbclass: Fix link for modules-${MACHINE}.tgz
The modules-${MACHINE}.tgz should link to ${MODULE_TARBALL_BASE_NAME}.
But now it links to an invalid file ${MODULE_TARBALL_BASE_NAME}.bin.
Remove the extra .bin suffix.

[YOCTO #4595]

(From OE-Core rev: ef9fad8fff1c413bc0eab15625f051d4e2d0a201)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:28 +01:00
Andrea Adami 1b22849f81 image_types.bbclass: add ubifs to IMAGE_TYPES
* the IMAGE_TYPES variable is used exclusively by hob
* IMAGE_CMD_ubifs is already present in the class
* ubifs images can be flashed on existing ubi volumes with 'ubiupdatevol'

(From OE-Core rev: 0dc5a90b2d95ad21025769b0300390a4ff0052ac)

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:28 +01:00
Robert Yang 5a0f74ac04 multilib.bbclass: fix the PACKAGEFUNCS_append
The PACKAGEFUNCS_append = "do_package_qa_multilib" lacks a "space",
which would cause unexpected errors.

[YOCTO #3190]
[YOCTO #4396]

(From OE-Core rev: acd5fc716bc3095d568bd1474b79f3a0fd616eea)

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>
2013-06-07 16:48:27 +01:00
Robert Yang 829d6bf005 insane/package: refactor packaging sanity tests
Refactor packaging sanity tests from package.bbclass to insane.bbclass
so that the message can respect WARN_QA (print the warning message and
go on the task) and ERROR_QA (print the error message and fail the
task).

- For the bb.warn(), give it a message name and add it to WARN_QA, then
  use package_qa_handle_error() to handle it.

- For the bb.error(), give it a message name and add it to ERROR_QA,
  then use package_qa_handle_error() to handle it.

- All the bb.warn() and bb.error() have been replaced in
  package.bbclass.

- A few bb.warn() and bb.error() in insane.bbclass have been kept since
  they can not be replaced or doesn't have to, for example the
  bb.error() in package_qa_check_license(), it will print the error
  message and then invoke bb.fatal() to fail the task, I think that we
  don't have to replace it with package_qa_handle_error().

- Put all the WARN_QA and ERROR_QA in one line, so that they can be
  redefined by the user easily.

[YOCTO #3190]
[YOCTO #4396]

(From OE-Core rev: 2f117ee615b703db07d3274ac592e2bd653743dd)

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>
2013-06-07 16:48:27 +01:00
Robert Yang 43713b9e17 insane/package: let package.bbclass inherit insane.bbclass
RP's comment:
"What we're trying to do is move everything to use a standard mechanism
for reporting issues of this type (do_package). With insane.bbclass, you
can elect whether a given type of error is a warning or error and fails
the task."

* The package.bbclass had used package_qa_handle_error() which is from
  insane.bbclass, and we will use it for handling other warnings and
  errors, so let package.bbclass inherit insane.bbclass, this change will
  make the insane as a requirement (always included).

* Change the "PACKAGEFUNCS ?=" to "+=", otherwise there would be an
  error like:
  Exception: variable SUMMARY references itself!

  This is because we let package.bbclass inherit insane.bbclass, and
  PACKAGEFUNCS has been set in insane.bbclass, so the "PACKAGEFUNCS ?="
  will set nothing, then the "emit_pkgdata" doesn't run which will
  cause this error.

* Add a QA_SANE variable in insane.bbclass, once the error type
  is ERROR_QA, it will fail the task and stop the build.

[YOCTO #3190]
[YOCTO #4396]

(From OE-Core rev: 852dead71387c66ec0cba7c71e3814a74e409560)

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>
2013-06-07 16:48:26 +01:00
Richard Purdie 1808552a86 autotools.bbclass: Factor out aclocal copying function
Some recipes may need to manually call the aclocal copying
functionality so factor this out into a function.

(From OE-Core rev: a5a08543c8cec43d993b2bba0ad6a9357c0a5e04)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:50:24 +01:00
Jesse Zhang c81ecf96ed sanity.bbclass: make sure python is a full install
Components of the Standard Library should be available. Add a sanity
check for xml.parsers.expat; we might add more in the future.

[YOCTO #4424]

(From OE-Core rev: bb027a332f2f2927a6bcbc4c035b42a012d0579e)

Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:43:35 +01:00
Jackie Huang 50fae526de sstate.bbclass: fixup extra hardcoded paths
sstate has a logic to fixup hardcoded paths in scripts,
but it misses in some specific cases, so add
EXTRA_STAGING_FIXMES to the fixup hardcoded paths
mechanism, so that we can specify what hardcoded paths
need to be fixed in a recipe, e.g.
EXTRA_STAGING_FIXMES = "STAGING_BINDIR_TOOLCHAIN"

(From OE-Core rev: 2e840db56c45b4c63fded55f4ed763b7099284b9)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:43:35 +01:00
Jonathan Liu 9ba5cedf9a classes/buildhistory: record removals in buildhistory directory
"git add ." does not record files that were removed in the buildhistory
directory. Specify the -A flag to also record removals.

This was discovered by the following warning added in Git 1.8.3:
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
whose behaviour will change in Git 2.0 with respect to paths you removed.

(From OE-Core rev: a45a247e2cfa58892a0c9eb050d603a38cd839db)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:43:35 +01:00
Ross Burton 3aaa4f78c6 utils.bbclass: ensure $0 is correct in wrapper scripts
Some packages (eg mesa) will invoke a tool with --version and do string matches
on the output (i.e. mesa does $LEX --version |grep "^flex ").  This doesn't work
with the combination of wrapper scripts and binaries that use $0 as they output
"flex.real".

Luckily bash's exec lets you set $0.  As we want to use this we can't use env,
but using export appears to work just as well.

(From OE-Core rev: e8d2a2a3646f964ec61ece62e14788cd7184dd01)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 21:10:23 +01:00
Ross Burton 2ab5dfceef pixbufcache: add more documentation
Add some more documentation to the PIXBUFCACHE_SYSROOT_DEPS variable to clarify
the usage.

(From OE-Core rev: b2f2d6a2b166b3c79cc5a0d386ee1dda2d4fa010)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 20:59:09 +01:00
Joe Slater 84de4f5b40 cmake.bbclass: modify construction of compiler flags
Use CFLAGS instead of CPPFLAGS for C_FLAGS variants.

When debug optimization is enabled in the local.conf, the debug (-O0) vs
production (-O2) does not change in the builds.  As the CPPFLAGS do not
contain the optimization settings.

Also the CXX_FLAGS are based on CXXFLAGS, so it makes sense to similarly
set the C_FLAGS based on CFLAGS.

(From OE-Core rev: 558662927be550aeb8dd163f65e16b1750bbd127)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29 22:18:49 +01:00
Xin Ouyang c0b6f9bc33 qmake_base.bbclass: Add linux-gnun32-oe-g++ to QMAKESPEC
For some mips targets, TARGET_OS is set to linux-gnun32, while
linux-gnun32-oe-g++ is not listed in the default QMAKESPEC list of
qmake in oe-core/wrlinux. This would cause build failures for qt
apps, so add a matching rule to fix this.

(From OE-Core rev: 70b75d506e6c4b46694b00d674df9d4a94140bd6)

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29 22:14:18 +01:00
Mark Hatle f543969c14 siteinfo.bbclass: Add mips64 common siteinfo
There is no mips64-common file, replace the definition with mips-common.

(From OE-Core rev: b6107abd50da651596c43119001cfc80fdf87554)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29 22:14:17 +01:00
Ming Liu b08958bc22 rm_work.bbclass: ignore failure for removing pseudo folder
When building over NFS2/3 server, removal of pseudo folders will fail in
some cases for there are files in it still used by pseudo daemon, thus
cause ".nfsXXXXX" files generated which can't be removed by clients. This
will lead rm_work task fo fail.

These failures could be safely ignored because ".nfsXXXXX" files would be
automatically cleared by NFS server when no clients keep opening them.

[YOCTO #4531]
[ CQID: WIND00412051 ]

(From OE-Core rev: 9742e866f545bc0d04aca697b541ed88f4e1764a)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:48 +01:00
Phil Blundell 2129c5d9ef cross: Clear do_populate_sysroot[stamp-extra-info] so that stamps are not MACHINE specific
Otherwise we will try to run the setscene task once per MACHINE which will lead to
file conflicts in the sysroot for packages like gcc-cross.  The stamps
are already namespaced by TARGET_ARCH which should be sufficient.

(From OE-Core rev: 66d09565783186ab14fa77ecdfe2131a44a265ab)

Signed-off-by: Phil Blundell <philb-mXXj517/zsQ@public.gmane.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:46 +01:00
Martin Jansa e2aa060920 kernel: Remove unnecessary cd and rm, fix MODULE_TARBALL_SYMLINK_NAME creation
* DEPLOYDIR is used as target for every other file deployed by do_deploy,
  this was just unnecessary switching CWD to create relative symlink and I
  have no idea why rm -f was used together with ln -sf.

(From OE-Core rev: 8375782a295c6294ea4ab889c309bebf873f3489)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:45 +01:00
Tomas Frydrych 32b4a4abd9 clutter.bbclass: removed unused function
Clutter and cogl no longer use --with-fpu configure option, so we no longer
require the get_fpu_settings() function.

(From OE-Core rev: ea59330c48cdb7d7106deea3f19c043ba60c23e4)

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:44 +01:00
Mike Crowe 600f4e38ad kernel.bbclass: Add dependency on binutils
Compiling the Linux kernel requires binutils; kernel.bbclass uses
INHIBIT_DEFAULT_DEPS so it had better depend on binutils explicitly.

(The lack of this dependency isn't always a problem because binutils
is required to build gcc-cross but if gcc-cross is reconstructed from
the sstate cache then gcc-cross's dependency on binutils-cross is
ignored due to being in the safe dependency list in
setscene_depvalid.)

(From OE-Core rev: 37beb7bdab78de5253a894f35afafa34c13a00f5)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Acked-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:40 +01:00
Ross Burton 204b92c663 pixbufcache: update the loader cache when installing natively
Register a sstate postinst function so that when installing a native package,
the gdk-pixbuf loader cache is updated.

(From OE-Core rev: 7cbde5d8f2b88ec4e79cb0d564ee0f3c9baa7c2d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:38 +01:00
Richard Purdie 56a2b28724 sanity.bbclass: Drop dubious print
(From OE-Core rev: be4cd4614a2a702130d18e9d082fd83a15faa013)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 10:34:51 +01:00
Richard Purdie e8197722de buildhistory: Sync with bitbake changes
Adjust to the recent changes in the git fetcher. This code should work
with current and previous versions of bitbake and can be cleaned up when
we move to new bitbake versions.

(From OE-Core rev: 835b64d4e9ed7b627b56a75d529f1a403c5db1a8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-23 11:51:53 +01:00
Chen Qi d837fb346d image.bbclass: add postinst_enable_logging
Add a function postinst_enable_logging, so that when 'debug-tweaks'
is in IMAGE_FEATURES, we create ${sysconfdir}/default/postinst config
file, which is sourced by run-postinst scripts to determine whether
to log or not, and where to log.

[YOCTO #4262]

(From OE-Core rev: 99175cabc3936733dd92fac5ebc6f865b864fe92)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-23 10:28:04 +01:00
Richard Purdie 70e5a74bce task.bbclass: Drop deprecated class
Any users have had time to adapt to this change by now, drop the old class.

(From OE-Core rev: 9b64b68c93c71c503ef26fa440b974b82438dc88)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 17:16:55 +01:00
Richard Purdie e0ffc1f378 update-alternatives: Drop deprecated code, update to show error message
This code has been deprecated for a while and confuses the class, lets drop it
and just give the user hard error messages instead of the current warnings/fixups.

(From OE-Core rev: 72579e1fe49e8bc66c9f5850a2c679ce8941c85d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 17:16:55 +01:00
Tomas Frydrych 525771c46a clutter.bbclass: helper class for clutter and friends
(From OE-Core rev: 19b7e58b71d31071361f19fd82666d40653569c4)

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21 09:30:15 +01:00
Robert Yang 0948a237dd image_types.bbclass: remove the old images
Remove the old image before the new one generated to save disk
space when RM_OLD_IMAGE is set to 1, this is an easy way to keep
the DEPLOY_DIR_IMAGE clean.

[YOCTO #4391]

(From OE-Core rev: b3e2e405c53d63bc71872d41f455507be833e7eb)

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>
2013-05-21 00:18:42 +01:00
Zongchun Yu 360bfe943a toolchain-scripts.bbclass:Add CROSS_COMPILE variable to environment-setup file
when compiling the linux kernel manually. users need to set CROSS_COMPILE separately.
adding the CROSS_COMPILE variable will be nice for using.

(From OE-Core rev: b66ec45e5dd9418a6568c04ef30854531a4b66f3)

Signed-off-by: Zongchun Yu <b40527@freescale.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:49 +03:00
Robert Yang 51c3e9df28 bbclass: bb.fatal() clean up
The bb.fatal() is defined as:

def fatal(*args):
    logger.critical(''.join(args))
    sys.exit(1)

So anything after bb.fatal() in the same code block doesn't have any
effect, e.g.:

    bb.fatal("%s_%s: %s" % (var, pkg, e))
    raise e

The "raise e" should be removed.

I searched all the files which use bb.fatal(), only the following 3
classes have this issues:

  insane.bbclass
  package.bbclass
  package_rpm.bbclass

[YOCTO #4461]

(From OE-Core rev: 4c47525c5a171b1282615c9fbc7d84addef85f92)

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>
2013-05-16 00:09:47 +03:00
Jonathan Liu f5b103ff47 boot-directdisk: Scope HDDDIR and HDDIMG variables to avoid conflicts
These variables should not be shared with other image classes.
The bootimg class also has an HDDDIR variable that could be overwritten
if executing concurrently in the same image recipe.

(From OE-Core rev: 94c83fa26af104d28aa4e6951bcb109bb0c82265)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:46 +03:00
Jonathan Liu badd718253 syslinux: Update to 4.06
Patches are now part of upstream or no longer needed.
Added new util-linux dependency for isohybrid.
Paths updated to reflect directory structure changes.
Add CFLAGS and LDFLAGS overrides.

[YOCTO #4438]

(From OE-Core rev: 17e7ac0c5e75245d17a90e5cc49ade3d18a168ba)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:46 +03:00
Khem Raj 0c8173d7dc image.bbclass: Add package-management image feature to validitems
Some images dont use core-image bbclass and add this feature directly

Fixes parsing errors like

/builds1/angstrom/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 34734, PID:
24551 Parsing recipes...ERROR: Unable to parse
/builds1/angstrom/sources/meta-kde/recipes-images/angstrom-kde-desktop-imag
e.bb: Exited with "1" ERROR: 'package-management' in IMAGE_FEATURES is
not a
valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs
doc-pkgs ptest-pkgs read-only-rootfs splash staticdev-pkgs ERROR:
'package-management' in IMAGE_FEATURES is not a valid image feature.
Valid
features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs ptest-pkgs
read-only-rootfs splash staticdev-pkgs ERROR: Command execution failed:
Exited with 1

(From OE-Core rev: f9f1397d688cc4eb8d736066b1280bee40a8916a)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-14 15:02:36 +03:00
Richard Purdie efb8a460d2 package.bbclass: Fix sources contents
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c376f1f49cea182a2887945840ab97a20970a373
fixed a valid issue where the sources file was accumulating information
and subsequent task runs of do_packacge were not cleaning it. The
fix is wrong however since we're removing the file within a loop.
This fix removes the file outside the loop ensuring it is not truncated
and contains the correct information.

(From OE-Core rev: a015881f2207aded601459ba3eebbefb0002b3c5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-14 08:52:47 +03:00
Peter Seebach a9f5bf0ed3 sanity.bbclass: Attach the missing value to a format string.
The tuning changes to sanity.bbclass were almost right, but one of
the messages had a %s with no % operator.

(From OE-Core rev: cf5e40598ae9a83f22cabedc7b72000beb62703c)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-13 21:54:40 +03:00
Robert Yang fe17af27ae image-vmdk.bbclass: disable the NOISO = "1"
The vmdk needed hddimg which was generated by do_bootimg in the past,
but do_bootimg generated both iso and hddimg, so we set NOISO = "1",
it now uses do_bootdirectdisk, doesn't use do_bootimg anymore, so we
don't need NOISO = "1", and need remove it, otherwise:

IMAGE_FSTYPES += "live vmdk"

Would not generate the iso.

I'd like to remove it rather than comment it, but we had comment the
do_bootimg before.

(From OE-Core rev: c5c1517726aa103a3cdb60abda95e28997cac7c4)

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>
2013-05-12 09:37:32 +01:00
Paul Eggleton 1810369f77 classes/core-image: drop apps-console-core IMAGE_FEATURES support
Remove the legacy support for the apps-console-core IMAGE_FEATURES item;
we've kept this for a while but it's time for it to go.

(From OE-Core rev: bcd5ed8dd0e80cb76415cd2be9686d4e8023421d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 09:37:31 +01:00
Paul Eggleton d63c8a1597 classes/image: show an error on invalid IMAGE_FEATURES
If the user specifies an invalid feature in IMAGE_FEATURES, show an
error during parsing. Valid IMAGE_FEATURES are drawn from
PACKAGE_GROUP_ definitions, COMPLEMENTARY_GLOBS and a new 'validitems'
varflag on IMAGE_FEATURES (so that additional non-package group features
can be added elsewhere.)

Implements [YOCTO #3308].

(From OE-Core rev: 8d25442ab795ff0f8e072da2022108eff128e2b2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 09:37:31 +01:00
Jonathan Liu 00aa0b315b image-vmdk: Fix error recreating symbolic link
If the vmdk image symbolic link already exists from a previous build,
overwrite it instead of returning an error.

(From OE-Core rev: bcfb5a783dc94fe38539a19f4f7de249ce2391c1)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 09:37:31 +01:00
Stefan Stanacar cef2446eb3 imagetest-qemu.bbclass, qemuimage-testlib: add support for more FSTYPES
qemuimage-testlib hardcodes ext3 as fs type. This adds support for more
images types which are supported by runqemu: ext[234]/jffs2/btrfs.

I've skipped (for now) vmdk (which qemu can boot) because:
 - we don't have network on images without connman because of the way
runqemu starts vmdk images (can't pass kernel args for network config)
 - qemuimage-testlib-pythonhelper relies on '192.168' being in the output of
ps to return the pid

(From OE-Core rev: 95b7cafafcaa4dda7328632475003f5778ab95bd)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:33:16 +01:00
Paul Eggleton 15aec44b2d classes/insane: add check for PN in OVERRIDES
If a recipe is named such that its PN value matches something already in
OVERRIDES (such as when PN happens to be the same as MACHINE or DISTRO),
it can have unexpected consequences. Assignments such as
FILES_${PN} = "xyz" effectively turn into FILES = "xyz".

Implements [YOCTO #4288].

(From OE-Core rev: c331f0a5cac765174a1b5de5c12aec7e965d4158)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 11:37:16 +01:00
Paul Eggleton e42f0acf46 classes/buildhistory: track contents of selected files in images
Add a BUILDHISTORY_IMAGE_FILES variable specifying a space-separated
list of files within an image to copy into buildhistory, so that changes
to them can be tracked. Typically this would be used for configuration
files, and by default this includes /etc/passwd and /etc/group, but the
user is free to extend this list by setting the variable in local.conf.

Implements [YOCTO #4154].

(From OE-Core rev: ed6bb6e3db518082d3a9c45d548bc1339be2c5ca)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 11:37:16 +01:00
Robert Yang 843e422879 boot-directdisk/bootimg/image-vmdk: remove more nostamps for image generation
We have removed the nostamps for do_rootfs and do_build, so it seems
reasonable to remove the stamps for do_bootimg, do_bootdirectdisk and
do_vmdkimg.

The current problem is that the do_vmdkimg always re-run, but the
do_rootfs may not, so the code like below in the do_rootfs function
doesn't re-run and cause problems (the symlink exists when the
do_vmdkimg creates the symlink again):

    if d.getVar('IMAGE_LINK_NAME', True):
        cmds += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"

(From OE-Core rev: 45c7dab5d51065c7b24ab5292f8e9d3104eb0626)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 10:25:29 +01:00
Tom Zanussi 3bae24306a kernel.bbclass: make FILES package-specific
Fix QA warnings seen when using 'traditional' kernel recipes e.g.:

WARNING: QA Issue: .../recipes-kernel/linux/linux_3.0.18.bb: Variable
FILES is set as not being package specific, please fix this.

(From OE-Core rev: 799c16ed317aed7638e264ee2f92e4b722f1b011)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 10:15:51 +01:00
Richard Purdie f1a0635172 imagetest-qemu: Fix indentation
(From OE-Core rev: 23ba10c61ff26bffb1a84972eb4e0bfb03561f89)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Richard Purdie 566628d8cd class/lib: Fix up various file access methods
There are various bits of cruft that have built up around our file accesses. This patch
cleans some of them up, specifically:

 * Remove pointless "from __builtin__ import file"
 * Use open(), not file()
 * Wrap file usage in a with container to ensure files are closed
 * Add missing .close() calls in some cases

(From OE-Core rev: a43e0a8ecd0441131e929daf998c3cd454d9c8f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Richard Purdie d2ef952851 buildstats: Drop spurious open() call
This file is already opened a few lines previously, so drop the duplicated
call.

(From OE-Core rev: 4808629faa1222b31f92a3e410e06adb8e081293)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:03 +01:00
Richard Purdie 4a9daa971c useradd: Use modern join syntax
string.join() is deprecated syntax and doesn't work under python3
so use the modern sytax instead.

(From OE-Core rev: 402d652edf79bcfe1eaf1a3b55ad1177d1e3ee85)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:03 +01:00
Richard Purdie b54339d633 classes/lib: Fix getcmdstatus breakage
I mistakenly thought subprocess had getcmdstatus in python 2. It doesn't so lets
add a wrapper and have this work in both worlds.

(From OE-Core rev: 2253e9f12734c6e6aa489942b5e4628eca1fa29d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 16:05:08 +01:00
Richard Purdie 8aa498d895 base.bbclass: Drop unused/obsolete import
(From OE-Core rev: e501a98e87b8854040ac4081326871d7d6397917)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie 534325fd1f image/kernel-module-split/eglibc-ld.inc: Remove has_key() usage
The has_key() attribute has been removed in python 3 since there is better
syntax available. Use the improved syntax.

(From OE-Core rev: 3dff13793e875ff58cc38c4a960caca9b6969843)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie e16faa55da sanity/patch.py: Remove commands module usage
The commands module is removed in python3. Use the subprocess module instead
and the pipes module to replace the mkargs usage.

(From OE-Core rev: e2e1dcd74bc45381baccf507c0309dd792229afe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie e1b5647d2c insane: Open file in binary mode
We open the file we're writing to in binary mode so open the input stream with the
same mode so things match. This avoids errors with python3.

(From OE-Core rev: 4f47b3a4726dd47e8a6db228fcaf25d1890e3e52)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie 3512f797f9 classes/lib: Update to use print as a function call
In python 3 print is a function call. In some cases bb.note is a more
appropriate call to make.

(From OE-Core rev: 754874e68d1037c76fc4cc7d35d3fa12946d00f8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie caa8b29c77 metadata_scm: Replace deprecated operator
The <> operator is deprecated, use != instead which is equivalent.

(From OE-Core rev: dde7af5f6c769eae721b1ee18462b841c8ea3277)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie 9ebcb98121 sanity.bbclass: Use open(), not file()
file() syntax is removed in python 3, use open() instead.

(From OE-Core rev: b2d10f15db23246e3957b69d77433f87674928bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie c3d18afaa5 classes/recipes/lib: Fix various python whitespace issues
There are some left over tab characters in the python functions. This
removes them and resolves python 3 errors.

(From OE-Core rev: fafeb381c48291fa65c634c01c244843c8d7fad3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Richard Purdie db8217f6b8 classes: Use modern exception raising syntax
Modern expection rasing syntax is function call format, convert to this
to keep python 3 happy and model correct coding style in the core.

(From OE-Core rev: f4b382754603d3f1caa13824bcc8d06b568bbc59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:50 +01:00
Richard Purdie e0bd393be8 buildstats: Update to ensure files are closed
python3 doesn't like files being left open. This updates the code style
to ensure file are closed.

(From OE-Core rev: ec74285bd2108f12f33fc8ac0dc1d124ab48be21)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:50 +01:00
Richard Purdie 2ac4f8b397 clases/lib: Use modern exception syntax
Update older code to use modern exception handling syntax which
is the form accepted by python 3.

(From OE-Core rev: b010501cd089e649a68f683be0cf4d0aac90fbe3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:50 +01:00
Robert Yang 19f71dd389 bootimg.bbclass: add comment for NOHDD
Add comment for NOHDD which is used for skipping building the HDDIMG if
set to 1

(From OE-Core rev: 9843ad9d783f68b97fedfe5b435528538bb26c1c)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 08:51:13 +01:00
Laurentiu Palcu 3438927b30 archive-*-source.bbclass: handle dependency in anonymous function
Using "before do_rootfs" would have this task added to do_rootfs
dependencies regardless of the filtering options. Instead, add this
dependency in the anonymous python function.

(From OE-Core rev: 2400a74923e51e17ecfa94c2d63908b0b2aac76a)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-07 13:58:26 +01:00
Martin Jansa 8fb24e1d27 buildhistory: change default BUILDHISTORY_DIR to TOPDIR
* like PERSISTENT_DIR I find BUILDHISTORY_DIR more persistent
  then tmp-eglibc directory
* WARN: people with existing checkouts in TMPDIR/buildhistory
  need to move it to new location first (in order to save history)

(From OE-Core rev: d3ad9a4c573fec08b5606a4c3e86f93cb95e8718)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:27:13 +01:00
Laurentiu Palcu a8eca39001 archive-*-source.bbclass: have do_dumpdata_create_diff_gz task run before do_rootfs
do_rootfs[cleandirs] contains ${S} and, if do_rootfs task starts before
the do_dumpdata_create_diff_gz is finished, an error will occur in the
process because the directory will be removed while still needed by the
create_diff_gz() function.

This patch will force the do_dumpdata_create_diff_gz task to run before
do_rootfs when the final image is created.

[YOCTO #4310]

(From OE-Core rev: cd90be31571178d6822dba5a94a2795209a3576c)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:19:20 +01:00
Tomas Frydrych bd35213554 image_types: fix default location of kernel when generating elf images
Generation of elf images fails because kernel images are no longer staged under
${STAGING_DIR_HOST}/kernel, but rather ${STAGING_DIR_HOST}/usr/src/kernel. This
patch fixes the path to point to the correct location.

(From OE-Core rev: 6e57a3231fb29f869d476b8511d6f4393f82651b)

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:19:20 +01:00
Phil Blundell db92131201 image.bbclass: Don't mark do_rootfs and do_build as nostamp
When image.bbclass was first conceived (as rootfs_ipk.bbclass), oemake
was unable to figure out when the inputs to do_rootfs had changed in
such a way that it would need to be rerun.  Absent any reliable
information of this kind, it was necessary to adopt the conservative
assumption that images always needed rebuilding and, to this end,
do_rootfs and do_build in image recipes were marked as nostamp.  (The
nostamp annotation for do_build was added in oe-classic commit
80d622e0c1dbc284858e01d3eb670303a6d8cdf9 from January 2005; the exact
point at which do_rootfs was made nostamp is obscure, but it predates
oe-classic revision 63fad339e01d4b16105146c32a61f24460397126.)

This situation persisted for the following eight years but, during that
period, oemake evolved into today's sstate-enabled bitbake, oe itself
gained the OEBasicHash algorithm which can reliably detect changes to
the input data for do_rootfs or any other task, and OEBasicHash was made
the default for oe-core in 4199efed48005a62267fa3374c33b13627d85f44
(June 2012).

Given these various changes in the wider landscape, there is no longer
any obvious benefit to having these two tasks marked as nostamp, and
indeed having them so marked causes needless rebuilds which can be
annoying.  Anybody who does genuinely wish to rerun these tasks when
nothing in the input has changed can run "bitbake -f", just like with
any other task.  So, let's remove the nostamp annotations and just let
bitbake figure out when to rerun them.

(From OE-Core rev: 8505008c115efb54d18e5f25441c7a938a32ffaf)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:19:20 +01:00
Paul Eggleton 58412ca75b classes/image: allow complementary package globs to be extended
Make it easy for the wildcard specifications for complementary package
features to be extended outside of image.bbclass. For example, to add a
new "foo-pkgs" item that could be added to IMAGE_FEATURES that would
cause *-foo packages to be installed for all packages currently in the
image, you can now use this line at the global level:

COMPLEMENTARY_GLOB[foo-pkgs] = "*-foo"

Implements [YOCTO #4228].

(From OE-Core rev: 4e39c1b9dbba1d2b07ffc2c6a1a252fc8f7680ee)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:19:20 +01:00
Jessica Zhang 8d3285f99b Make toolchain output name using SDK_VERSION instead of DISTRO_VERSION to be consistent [yocto #2342]
(From OE-Core rev: 733f1d2a1bcf1c115613e21f7d09f1b4bee216ce)

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-02 17:41:55 +01:00
Robert Yang c51e8b4532 sstate.bbclass: make hard links for staging files
Make hard links for staging files instead of copy to save the disk space
(3G will be saved for a core-image-sato build), and it doesn't affect
much on the build time.

The following directories are affected:
1) The sysroot
2) The DEPLOY_DIR
3) The pkgdata

[YOCTO #4372]

(From OE-Core rev: 5853e0f482b22258c909268fe71673a29e31989b)

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>
2013-05-02 17:41:53 +01:00
Laurentiu Palcu 4a3d4b8d7a Pass the mlprefix to postinst_intercept script
This is needed in order to have separate multilib intercept hooks.

(From OE-Core rev: 44eae13c164ca6e15a6013eafeab3eb44f24c8e0)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:10 +01:00
Laurentiu Palcu cf76b424f5 Revert "qemu.bbclass: Use the correct qemu binary in multilib cases"
This reverts commit 9f5a6f89d9.

The reason for reverting this is:
 * qemuwrapper has now a fallback method;
 * when using multilib, calling qemu_target_binary from recipes would
   always point to the qemu binary corresponding to the machine
   architecture. Hence, postinstalls needing to use qemu would call the
   wrong qemu user emulation binary;

(From OE-Core rev: 15408466515cec7cbb4c394aa203c87b6165f884)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:10 +01:00
Marcin Juszkiewicz 3e79775a82 cpan.bbclass: use '|' as sed separator for entry with paths
With normal toolchain it works. But fails badly when external Linaro
toolchain is used. And this is why:

-e "s/^\(CCFLAGS =.*\)/\1  -isystem/home/hrw/devel/canonical/aarch64/openembedded/build/linaro-tcwg/gcc-linaro-aarch64-linux-gnu-4.7-2013.04-20130415_linux//aarch64-linux-gnu/include  -O2 -pipe -g -feliminate-unused-debug-types/" \

(From OE-Core rev: f6244a9d3da7c301f19efc114c2aaf39e5eec299)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:06 +01:00
Phil Blundell 2895bcf95a sstate: Set umask to 002 before packaging runs
Otherwise we might end up creating directories under sstate-cache with whatever
random umask has been selected for the task that we're trying to package.  This
would be a bad thing since it might result in losing group write access for
newly created dirs, and/or losing group read access for the sstate files
themselves.

(From OE-Core rev: d8c4f442c41bf3ac5e064630657cd3fa1b5c43b1)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:06 +01:00
Phil Blundell 5652086c75 kernel-arch: Always use ld.bfd to link the kernel
The kernel's penchant for custom linker scripts means that it doesn't
generally get on very well with gold.  Make sure we are using the BFD
linker here no matter what the distro default is set to.

(From OE-Core rev: 5c8277610ae84740e0724b27f10dba3895d40c05)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-28 12:12:21 +01:00
Christopher Larson 824962fcf2 package.bbclass: ensure license excluded files aren't packaged
An excluded package left its files behind, which meant they could end up in
another package instead, meaning we could ship GPLv3 binaries even with GPLv3
in INCOMPATIBLE_LICENSE. Skip the files belonging to the excluded packages to
prevent this from occurring.

(From OE-Core rev: c045bfe6b991006ac80f0e2d06a8917ae58d9262)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:04 +01:00
Christopher Larson fd4f354853 package.bbclass: add LICENSE_EXCLUSION to vardeps
Ensure that changes to INCOMPATIBLE_LICENSE re-run do_package for affected
recipes.

(From OE-Core rev: b9b187f8a0f513e676cd3d18f71d1055445f29fa)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:03 +01:00
Laurentiu Palcu d9f153f489 image.bbclass: change the logic when intercepts fail
Due to some issues with postinstalls that register hooks, we changed the
logic a bit. Now, all postinstalls that register hooks will return
successfully and only after, if hooks fail, mark the package as unpacked.

(From OE-Core rev: 82dae98d0eb771c05e57635f0f8763b118d8177e)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:02 +01:00
Laurentiu Palcu 5e702edaa4 pixbufcache.bbclass: do not exit 1 after installing intercept hook
This will allow to register, in a single postinstall, multiple hooks.

(From OE-Core rev: b396138ee081c8f5dddbaab0e374787ba2e31029)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:02 +01:00
Laurentiu Palcu 6304ba31d5 gtk-icon-cache.bbclass: do not exit 1 after installing intercept hook
This will allow to register, in a single postinstall, multiple hooks.

(From OE-Core rev: 2cd244d6c93ec6d39e2649de64575c365bd4238d)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:02 +01:00
Laurentiu Palcu 9e729f1f18 fontcache.bbclass: do not exit with 1 after installing intercept hook
This will allow to register, in a single postinstall, multiple hooks.

(From OE-Core rev: 9553874cf02ba443aff1bbead56bacfcda9bb6ca)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-22 14:45:02 +01:00
Richard Purdie 277cae2b2c package_ipk: Ensure the status file exists
The postinstall for the opkg run-postinst hook checks for the existence of this
file. We therefore ensure it always exists during image generation.

(From OE-Core rev: 540cf355599e555615ed9684c3b480463588eb78)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 21:12:19 +01:00
Richard Purdie 8e74a9795c package.bbclass: Add useradd variables to PACKAGEVARS
THe USERADD_PARAMS and similar group variables are package specific variables
which should get added to the vardeps of the packaging process. This
change also ensures they get remapped correctly by the multilib code.

(From OE-Core rev: 805add18e7b917aaef61c82c0b5f2e9682af1d0d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 21:12:19 +01:00
Richard Purdie 57fdbe9bcc multilib: Ensure we map the USERADD_PACKAGES variable
If we don't do this, multilib packages don't have any code
added to the postinstalls to handle user additions.

(From OE-Core rev: b10d17d1b03fd0564103a6998f218d0968d1032b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 21:12:19 +01:00
Richard Purdie 1261eccd8f packagegroup: Add init-manager sanity check
Currently, you can set VIRTUAL-RUNTIME_init_manager to an init system that
isn't in DISTRO_FEATURES. This leads to head scratching over unbootable images.

This adds a sanity check which ensures more valid systems are built.

(From OE-Core rev: c72ec4b52827f75351790eab483d258b2e87611a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 00:37:57 +01:00
Richard Purdie 79a205be0d package.bbclass: Fix populate_packages for glob expansion issues
If we put a valid glob like "*/foo/*" into FILES, populate_packages
breaks with a "file exists" message. This is because the glob expansion
does not have "./" prefix however there may already be an entry in
the seen list which does have such a prefix. The easiest/simplest fix
right now is to add the prefix if it doesn't exist which only happens
for certain globs.

(From OE-Core rev: 138c5f3af892e33f576fc7dd268e122b179f82a1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18 00:37:57 +01:00
Richard Purdie b45615a6ad update-alternatives: Ensure DEPENDS is correct in multilib case
Ensure that the DEPENDS we're adding is correct in the multilib case by
including MLPREFIX, fixing unnecessary dependencies in those images.

(From OE-Core rev: 1fa8909e24866ffada75daf63225c8daa000b9be)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:29 +01:00
Richard Purdie b5845de167 kernel.bbclass: Ensure we have correct version information in deploy data
Currently the names used for the kernel in deploy will contain "AUTOINC"
instead of the final incremental numbering. This fixes the problem by
ensuring data is obtained from the PR service and using the PKG* variables
instead of PE/PV/PR directly.

[YOCTO #4293]

(From OE-Core rev: 1392f959cb8cd50b5a4492899e54f3ed68ef56d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:29 +01:00
Richard Purdie 093dec12e6 package/image.bbclass: Fix multilib rprovides
allarch multilib recipes are meant to provide a list of different multilib variants.
Unfortunately since the pkgdata also has mappings for these, they get mapped back to
the original package name which means the effect is undone at package creation time
when the remapping code is called.

This patch adds in a conditional to break that chain meaning the packages get
the correct RPROVIDES and image builds work correctly with opkg.

[YOCTO #3453]

(From OE-Core rev: 1a1927f8a04fe0a2b3b853ebdd33ccb807f00b59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-13 23:49:28 +01:00
Paul Eggleton db61a66dba classes/sanity: fix handling of bblayers.conf updating
Fix the fairly long-standing problem of treating a newer bblayers.conf
in the same manner as an older one (reporting that it had been updated
even if nothing was done). The recent work to do a reparse without
having to manually re-run bitbake turned this from an annoyance into an
endless loop, so it had to be fixed.

As part of fixing this the following changes have been made:
* Extensions are now implemented using a function list, so distro layers
  can add their own functions which should either succeed (indicating
  they have successfully updated the file) or raise an exception
  (indicating nothing could be done). The functions are called in
  succession until one succeeds, at which point we reparse.
* If we can't do the update, the error message now says "older/newer"
  instead of just "older" since we only know the version is different.

(From OE-Core rev: 46b00fdfc9d1e3dc180de087bae2682a1baa2954)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-13 23:49:28 +01:00
Khem Raj 48f827e7d7 kernel.bbclass: Optionally create lib dir during deploy
when we have multilib and a 64bit machine and initramfs then image/lib
directory will not be created and it will end up with errors like

| DEBUG: Executing python function sstate_task_prefunc
| DEBUG: Python function sstate_task_prefunc finished
| DEBUG: Executing shell function do_deploy
| tar: lib: Cannot stat: No such file or directory
| tar: Exiting with failure status due to previous errors

So in order to overcome this shortcoming lets mkdir -p the
lib directory so the modules can be happily installed.

(From OE-Core rev: 3f501204f375cc40a14597a25cb09faaba9ff802)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-12 17:00:44 +01:00
Martin Jansa 230441f0c8 icecc: Allow to use this bbclass together with external toolchains
* original implementation by Antti Harju

(From OE-Core rev: abb5bd9f2d3583808b61a0832378e4db45022be6)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 15:44:23 +01:00
Hongxu Jia c567366d3b package_rpm.bbclass: fix build multilib image failed when PR Server enabled
1, In bitbake.conf
   PKGR ?= "${PR}${EXTENDPRAUTO}"
   EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
   RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})"

2, When PR Server is enabled, EXTENDPRAUTO is not none which means PKGR and PR
don't have the same value.

3, When multilib is enabled, RDEPENDS_${PN}-dev is not expanded correctly
which uses PR rather than PKGR in the versioned dependency string.

4, Make sure PKGR rather than PR in version string when do_package_rpm.

[YOCTO #4050]

(From OE-Core rev: cf53c606fc1bc81abb68b6851ae68916f92e1d84)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 14:02:27 +01:00
Björn Stenberg 44120a053c ptest bug fixes
Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are
packaged in the -ptest package.

Add QA exclusions to insane.bbclass to ensure -ptest packages can contain
any files they need.

Disable ptest for native packages.

Don't emit errors on missing _ptest functions.

(From OE-Core rev: 01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978)

Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Anders Roxell <anders.roxell@enea.com>
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 12:20:35 +01:00
Michel Thebeau cd2f003b51 kernel.bbclass: do_strip: allow recipes to strip the kernel
Allow recipes to specify sections to be stripped from the kernel output
using KERNEL_IMAGE_STRIP_EXTRA_SECTIONS.  For example:

KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment .unwanted"

The kernel output is stripped in place.

Since the toolchain does not give indication when the specified sections
are absent, we read the sections first and make this report by issuing a
warning to the developer.

The toolchain by default strips the image with the -s option (even
when -s is not specified):
-s --strip-all       Remove all symbol and relocation information

For example, these sections are always removed:
.debug_aranges
.debug_info
.debug_abbrev
.debug_line
.debug_frame
.debug_str
.debug_loc
.debug_ranges
.symtab
.strtab

In addition to these, the sections listed in
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS will also be removed.

Only stripping of vmlinux (elf) is supported at this time.  A warning
will be given if the image type is not vmlinux.

Stripping the image could also be done in the kernel, but that would
only work for linux-yocto based kernels, so it's not the route we
decided to go.

[YOCTO 3515]

(From OE-Core rev: 5f6d33b05b4e7883f2728ca812cb5386d1e36989)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 09:03:21 +01:00
Laurentiu Palcu 2435d807d1 postinst-intercepts, qemu.bbclass: fix segfaults in postinstalls
Postinstalls that use qemu are throwing a segmentation fault when
building for qemux86-64 on a 64bit host (it might also happen for
qemux86 if building on a 32bit host but I didn't test). It looks like
qemu looks for ld.so.cache which is not found because it is generated
after rootfs_(rpm|ipk|deb)_do_rootfs is called and then it tries to load
libraries from the default paths (which are the host's). In order to
avoid this, pass the LD_LIBRARY_PATH explicitly to the target's dynamic
loader.

(From OE-Core rev: 48e8b613b3f5c7b1d917bf3147606d44072ce49e)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 12:56:52 +01:00
Ross Burton 8cab6d76f8 update-rc.d: correctly look up the initscript params with overrides
The creation of a clone of d with extra OVERRIDES was removed in
72c1fd72d3b479c728e249eaa763116d352e945b but some of the lookups are essential
so that variables such as ${INITSCRIPT_PARAMS} get overriden and resolved
correctly on a per-package basis.

[ YOCTO #3960 ]

(From OE-Core rev: b016bc9aaabc90fe4dc98af8c5e73dfcb4526ef4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 12:56:52 +01:00
Paul Eggleton f32d58076e classes/license: remove outdated comment
Package listing was implemented in the deb backend some time ago.

(From OE-Core rev: e2915b6e1d2088d3a791bf629dabc58f38940961)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 09:23:18 +01:00
Ross Burton f6ae87e838 systemd.bbclass: restart service in postinst, not start
When upgrading packages it's possible that the service is already running
because opkg doesn't actually execute the prerm hooks on upgrades, which is
where the service should be stopped.

Handle this case by restarting in postinst instead of starting.  If the service
isn't already running then this doesn't make a difference, but if it is running
then the service will be restarted.

[ YOCTO #4213 ]

(From OE-Core rev: 319ef0df4ae7ed0372eff90e11244123eccb023c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09 18:09:14 +01:00
Otavio Salvador 9bb5eb86c1 base.bbclass: Fix matching of MACHINEOVERRIDES in COMPATIBLE_MACHINE
The use of SOC_FAMILY here is old code and SOC_FAMILY is now implemented by
MACHINEOVERRIDES behind the scenes. It therefore makes more sense to use
the replacement value in this code. Just like SOC_FAMILY, this is a ":"
delimited variable so we should iterate over the components, not use
the value directly.

Finally, MACHINEOVERRIDES contains MACHINE so we don't need to check that
directly.

This makes the functionality match what most users would expect it to do
and is also compatible with the way things previously worked.

(From OE-Core rev: 8ceef74dd4f662b4c7e3c170ce486e966ebebeff)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09 13:19:43 +01:00
Paul Eggleton fb37dd6822 classes/buildhistory: fix interaction with rm_work
Change do_write_srcrevs to a postfunc of do_fetch, avoiding a dependency
being created that causes large numbers of setscene tasks being executed
on every build with both buildhistory and rm_work being enabled.

(From OE-Core rev: a751e9042dfffcc5c4701634a1f1f598012d609c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09 13:16:52 +01:00
Michel Thebeau e57284abca kernel.bbclass: do_sizecheck: update path to build image and do not delete
do_sizecheck has a few issues especially with vmlinux image type.

It breaks because KERNEL_OUTPUT is a path relative to ${B}.  When
do_sizecheck runs it does not find the file (because the working
directory is elsewhere) and does not fail.

Also, the image file referenced by KERNEL_OUTPUT may be a link.

Finally, when do_sizecheck deletes the oversized kernel image it leaves
the previously run do_compile task with inaccurate status.

So, do the following:
 - specify that the working directory should be ${B}
 - use ls -L to reference to the real file, and ensure that the link
   file is created
 - keep the oversized image file so the status of do_compile is valid

[YOCTO #3514]

(From OE-Core rev: f0b19ddce3c92c5d06976cf73d4c4c480e053dff)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-08 22:26:24 +01:00
Laurentiu Palcu 51f8dffecc image.bbclass: fix postinstall intercepts fallback
The wrong type of paranthesis was used so 'continue' did nothing (was in
another context) and the packages were marked as installed.

(From OE-Core rev: 0bdde53e885aae3506c7b070b6e21f64a7cd4115)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-08 16:56:46 +01:00
Nathan Rossi 647caeb0fb insane.bbclass: Updated MicroBlaze machine definitions
* Removed existing definition with machine 47787, this
  definition is outdated, a sanity error should occur if an ELF uses this
  value.
* Added new definition with machine 189. This value replaces the existing
  value since August 2009. See binutils thread for more information.
  (http://sourceware.org/ml/binutils/2009-08/msg00127.html)

(From OE-Core rev: 0c60d3b04eb77629abc3bbc2a6d8a2b8f0a44309)

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-08 16:56:45 +01:00
Laurentiu Palcu 1872ee316b postinst-intercepts, qemu.bbclass: fix issue on 32 bit hosts
The intercept scripts fail to run on 32 bit hosts. Apparently, the
current approach worked on 64 bit hosts due to the larger virtual address
space (probably). On 32 bit hosts, however, calling the target binary like:

qemu-arm ld-linux.so --library-path /lib:/usr/lib arm_binary

fails with:

arm_binary: error while loading shared libraries: arm_binary: failed to
map segment from shared object: Operation not permitted

When run like this, qemu-arm fails to map the arm_binary executable in
memory because it's hitting the lower limit of
/proc/sys/vm/mmap_min_addr. That's because it loads the
ld-linux.so binary successfully, taking into account mmap_min_addr, runs
it, and then ld-linux.so will map the arm_binary at a fixed address but this
will fail because it is below mmap_min_addr. The qemu's guest base probing,
apparently, doesn't work fine when a program runs inside other.

One way around this would be to set mmap_min_addr to 0 (on recent
distributions is set to 65536 to avoid "kernel NULL pointer dereference"
defects) but this approach is not safe.

The other way is to call the binary directly but providing qemu with a
prefix (-L option) in order to find the elf interpreter correctly. This
way, both the target binary and dynamic loader are mapped into memory
under qemu's control and, only after, the dynamic loader is started.

[YOCTO #4179]

(From OE-Core rev: 78f91e08c8a7b0f0c831a087f7c89e2c76047e7a)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-05 17:36:34 +01:00
Andrei Dinu 4dbdcf9462 Add file information to package information window
Removed the package files parsing routine from the
packageinfo.bbclass file and added it to the
package.bbclass file.

(From OE-Core rev: 225e7826b0d082f43db82201e826b98b3a95cd57)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 14:10:56 +01:00