Commit Graph

3151 Commits

Author SHA1 Message Date
Paul Eggleton f4e91404f8 classes/package: record PKGSIZE as total file size in pkgdata
We were using "du -sk" to collect the total size of all files in each
package for writing out to PKGSIZE in each pkgdata file; however this
reports the total space used on disk not the total size of all files,
which means it is dependent on the block size and filesystem being used
for TMPDIR on the build host. Instead, take the total of the size
reported by lstat() for each packaged file, which we are already
collecting for FILES_INFO in any case.

Note: this changes PKGSIZE to be reported in bytes instead of kilobytes
since this is what lstat reports, but this is really what we should be
storing anyway so that we have the precision if we need it.

Fixes [YOCTO #5334]

(From OE-Core rev: 29615b36fca696822a715ece2afbe0bf9a43ed61)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:49 +00:00
Paul Eggleton 4a75e83b29 classes/package: fix FILES_INFO serialisation in pkgdata
The FILES_INFO entry in each pkgdata file stores the list of files for
each package. Make the following improvements to how this is stored:
* Store paths as they would be seen on the target rather than
  erroneously including the full path to PKGDEST (which is specific to
  the build host the package was built on)
* For simplicity when loading the data, store complete paths for each
  entry instead of trying to break off the first part and use it as the
  dict key
* Record sizes for each file (as needed by Toaster)
* Serialise the value explicitly using json rather than just passing it
  through str().

Fixes [YOCTO #5443].

(From OE-Core rev: ca86603607a69a17cc5540d69de0e242b33382d3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:49 +00:00
Paul Eggleton da88c5ffec classes/icecc: fix typos in header comments
Looking at the code, it should be ICECC_USER_PACKAGE_BL and not
ICECC_PACKAGE_BL here, and also fix "localy" -> "locally".

Thanks to Scott Rifenbark for pointing this out.

(From OE-Core rev: b325e46059efe6974abf01131dca3f2094a6bf90)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:39:00 +00:00
Richard Purdie 32c5d84823 image.bbclass: Depend on virtual/kernel:do_deploy
Now that none of the packagegroups depend on virtual/kernel, we have the problem
that MACHINE=qemumips bitbake core-image-minimal doesn't put a kernel
into the deploy directory. This breaks many common usecases and
user expectations.

To avoid this, add a dependency on the kernel deploy to image do_build tasks.
This should avoid any circular dependency issues but equally ensure users
have their expectations met.

[YOCTO #5581]

(From OE-Core rev: fe26b2379ecdbdb56acde8592bc0c2d95092a207)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-29 16:27:31 +00:00
Richard Purdie 7b9f4b2cd0 base/gcc-common: Ensure umask setting is consistent for shared workdir
gcc has cross and target components with a shared workdir. The unpack umask
settings need to match for all of these. We need to use strings in each
case to ensure the sstate code matches them correctly.

This patch tweaks various things to ensure the change adding the unpack umask
change doesn't break the compiler builds.

(From OE-Core rev: 67162438ee9c402b23c32853af9d313949eb6e4a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-29 11:24:48 +00:00
Martin Jansa 79fbb1f698 base.bbclass: Set umask 022 also for do_unpack task
* when git checkouts files from fetched clone it respects system umask
  and creates files with different permissions, if such files are copied
  to packages, resulting target images have also different permissions
  on them.
* we need reproducible builds across different builders with different
  system umask, so set 022 umask

[YOCTO #5590]

(From OE-Core rev: c9289c506633ffe5c482000d8d225e45454c064d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-29 09:52:59 +00:00
Richard Purdie 977d623287 module-base: Fix misleading comment
The comment was originally written for module.bbclass and is now
slightly misleading. This updates it to match the current code.

(From OE-Core rev: 434277ed156c1685283f6fd681062d265f4fa6d0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-29 09:52:59 +00:00
Richard Purdie 3f5e982107 Revert "kernel: restore scripts in the sysroot"
This reverts commit 6a6735cb98.

The module class already ensures the scripts are rebuilt correctly. Running
this at sstate installation time is problematic since it can require the
cross compiler. Adding such a dependency would cause issues of its own.

(From OE-Core rev: b2c948d56241ff7cdea2e9e68b740f305c72f5ca)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-29 09:52:58 +00:00
Richard Purdie 6fcb96076c chrpath: Improve crazy code
The current code is a little bit overcomplicated, deficient and also
possibly broken.

Issues include:

a) Not maximally optisming rpaths (e.g. a lib in usr/lib might get an
   rpath of $ORIGIN/../../usr/lib)
b) The return in the middle of the for loop look suspiciously like
   it might break on some binaries
c) The depth function, loops of "../" prepending and so on can
   be replaced with a call to os.path.relpath

This patch cleans up the above issues.

Running binaries should result in less "../" resolutions which can't
hurt performance either.

[YOCTO #3989]

(From OE-Core rev: feea54df6768036649ca6c57524e2a1f480ad249)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-29 09:52:57 +00:00
Martin Jansa 572a8eb874 icecc: Disable icecc for allarch recipes
* Fix icecc.bbclass failing with:
  ERROR: recipe-name NULL prefix
  when it's used with empty TARGET_PREFIX.
* Allarch recipes cannot use compiler at all (even the local one)
  so there is no point of using icecc for them.

(From OE-Core rev: a956f9d91c8128e43b55c6bc01337472e47fe43a)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-29 09:52:57 +00:00
Paul Eggleton 960e305d9a classes/image: write image manifest
Write a list of installed packages to a .manifest file next to the
image, so we can find out what went into the image after it has been
constructed without necessarily having to have buildhistory enabled
(although that will provide more detail.) We can make use of this for
example in the testimage class associated code that checks for installed
packages for determining whether or not to run specific tests.

Note: this replaces the previous ipk-specific manifest code with
something that works for ipk, rpm and deb, and instead of a pruned
status file, packages are listed one per line, in the following format:

<packagename> <packagearch> <version>

Tests for all three backends have shown that the performance impact of
this change is negligible (about 1.5s max).

Implements [YOCTO #5410]

(From OE-Core rev: 2978d1f2617a33e2e3a77e249d73e998d79b4ec9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-26 23:01:32 +00:00
Mike Crowe 447a057988 sanity: Use random filename for maximum path length test
check_create_long_filename used a fixed filename for its test files. This
meant that os.remove(testfile) could fail with ENOENT if two instances were
running at the same time against the same sstate directory. Using a
randomly generated filename stops this from happening.

(Although it might seem unlikely, this race did appear to occur multiple
times with Jenkins - presumably because the matrix jobs were all kicked off
at the same time.)

(From OE-Core rev: bc28e3f26e7f85af82f403924c0ae29e1ad34a87)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-25 16:14:48 +00:00
Mike Crowe 181875b5d9 sanity: Don't hard code value of ENAMETOOLONG
Although ENAMETOOLONG is 36 on Linux x86 and x86_64 it does isn't on other
architectures so the value shouldn't be hard coded.

(From OE-Core rev: 11a9cf5ee0daf82097fb2f36b58016f20a5968f3)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-25 16:14:48 +00:00
Richard Purdie b62bdbd135 metadata_scm: Avoid crashing on new svn version layouts
This avoids crashing on newer svn layouts where the entries files
don't contain three lines. If someone wants to fix this to
get the right version on newer subversion checkouts, patches
welcome but this at least stops things crashing.

[YOCTO #5363]

(From OE-Core rev: e850c53d4d8cb877a704a23f9ce02d6185ba3ffa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-24 12:25:36 +00:00
Mike Crowe 6e8a4eff5f kernel.bbclass: Stop bundle_initramfs thwarting sstate cache and fix race
The new do_bundle_initramfs task introduced in
609d5a9ab9e58bb1c2bcc2145399fbc8b701b85a defeats using the sstate
cache. The kernel is resurrected from the sstate cache but ends up being
built again since do_bundle_initramfs depends on do_compile.

The task is no longer nostamp to avoid causing unnecessary rebuilds. The
sstate checksum stamps should know when to rebuild.

The task now runs before do_deploy and part of the work has been moved to
do_deploy where it now writes to ${DEPLOYDIR} rather than
${DEPLOY_DIR_IMAGE} so that the files end up in sstate.

The task can also race against do_install since both call into the kernel
build system. This is fixed by making do_bundle_initramfs run after
do_install (which therefore also fixes the problem that
3baa63b4d588c3262254528b406ede265dd117bf was addressing.)

(From OE-Core rev: 55989cb509340bd265d0ce0d8bfe849681be4616)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-24 12:25:35 +00:00
Mike Crowe 33db10a172 Revert "kernel.bbclass: move bundle_initramfs after kernel_link_vmlinux"
This reverts commit 3baa63b4d588c3262254528b406ede265dd117bf. It broke
builds that aren't using kernel-yocto.

(From OE-Core rev: 81831db1c32afa3346f3ed9f4325ad280e5bb005)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-24 12:25:35 +00:00
Jeffrey C Honig 33c97ee94d rootfs_*.bbclass: List which post-install scripts can not be run
When preping a read-only rootfs and finding some post-install
scripts that can not be run, list the names of said scripts to
avoid having to look around the rootfs to find a list.

(From OE-Core rev: 0188120691f433fdccf71b92618115195278c0af)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22 14:08:33 +00:00
Lei Liu 739fba172c package_rpm.bbclass: Replace -linux-gnun32 with -linux.* in RPM platform file
On a multilib system when one of the multibs has a different OS then
other multilibs a failure can occur during the install process because
RPM assumes all systems have the same OS.

When an n32 platform is selected as an alternative multilib, it shows
up as mips64_n32-.*-linux-gnun32 in /etc/rpm/platform.  This causes
problems when the smart tool tries to add a channel for the multilib.
RPM archScore call always returns zero for arch "mips64_n32" -
after appending default vendor and os, it finds "mips64_n32-wrs-linux"
doesn't match any predefined platforms.  Fix this by removing the
restriction of -gnun32 suffix in platform file.

(From OE-Core rev: d9489c44ee4f195ae1b09f340b9545cddba58145)

Signed-off-by: Lei Liu <lei.liu2@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22 14:08:33 +00:00
Lei Liu 6a3a4ba267 base.bbclass: Fix incorrect setting of multilib PREFERRED_PROVIDER_virtual_pkg
PREFERRED_PROVIDER_virtual_pkg has been incorrectly set with more
than one multilib prefixes.  For example, if we have two alternative
multilibs lib64 and lib32, PREFERRED_PROVIDER_virtual_pkg will be
set to lib32-lib64-pkg or lib64-lib32-pkg, depending on which
multilib shows up first in the list.

(From OE-Core rev: 17a432dc059e24ba10d4baec988828c0025a5e46)

Signed-off-by: Lei Liu <lei.liu2@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22 14:08:32 +00:00
Richard Purdie e031a05b6d buildhistory/distrodata: Adapt to updated fetcher API
The buildhistory code has fallback paths for older bitbakes for now. The
distrodata class is much less used and it can be assumed a recent bitbake
is used in that case rather than adding fallback code.

(From OE-Core rev: 570cc145029fd9d5528aef5c27cb65164265c799)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22 12:03:02 +00:00
Chen Qi 551fcea978 license.bbclass: fix missing of license files on ubuntu build host
The license_create_manifest function contains bashism, this will lead
to unexpected results on ubuntu build host, as sh is linked to dash on
ubuntu. Even if COPY_LIC_MANIFEST and COPY_LIC_DIRS are enabled, the
license files will still be missing on target.

This patch fixes the above problem.

[YOCTO #5549]

(From OE-Core rev: 4df9daee5c732c0a20dabe8515577238a1508512)

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-11-20 14:03:31 +00:00
Saul Wold a50da2ddb4 image_types: newer btrfs.mkfs needs an empty file to build the disk in
(From OE-Core rev: 836396a3450e7bf151956e87bd92f70c5050c995)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20 14:03:29 +00:00
Ming Liu ae70c20ce8 kernel.bbclass: move bundle_initramfs after kernel_link_vmlinux
${KERNEL_OUTPUT} is being renamed/restored in bundle_initramfs task, so we
must ensure bundle_initramfs run after kernel_link_vmlinux where the link
of vmlinux is created as the bootable image.

(From OE-Core rev: 3baa63b4d588c3262254528b406ede265dd117bf)

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-11-20 14:03:29 +00:00
Hongxu Jia 4cf2d7c32b xorg-driver: fix qa issue while multilib enabled - contains Xorg driver but no xorg-abi
...
WARNING: QA Issue: Package lib32-xf86-video-vesa contains Xorg driver (vesa_drv.so) but no xorg-abi- dependencies
WARNING: QA Issue: Package lib32-xf86-video-intel contains Xorg driver (intel_drv.so) but no xorg-abi- dependencies
WARNING: QA Issue: Package lib32-xf86-video-omap contains Xorg driver (omap_drv.so) but no xorg-abi- dependencies
WARNING: QA Issue: Package lib32-xf86-video-vmware contains Xorg driver (vmware_drv.so) but no xorg-abi- dependencies
WARNING: QA Issue: Package lib32-xf86-video-fbdev contains Xorg driver (fbdev_drv.so) but no xorg-abi- dependencies
WARNING: QA Issue: Package lib32-xf86-video-modesetting contains Xorg driver (modesetting_drv.so) but no xorg-abi- dependencies
...

In oe-core 87be2314fe0e67a616b4f713106b4ae46931f5cb, it fixed add_abi_depends
issue while enable multilib.

We did the same thing for qa check: package_qa_check_xorg_driver_abi.

[YOCTO #5545]

(From OE-Core rev: 3132d8b52eb05b03df4d4589f94cff38ab69b81d)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20 14:03:29 +00:00
Phil Blundell 66fd6c4e92 kernel.bbclass: Use lzma not lzmash for decompressing
If kernel_do_compile() encounters a .lzma image for the initramfs, it
attempts to decompress it using the little-known "lzmash" utility.  This
may not be present, which will cause the build to fail.

Fortunately, it appears that the more mainstream "lzma" tool is
compatible so we can use that one instead.

(From OE-Core rev: f7a04cbdee67675ff6a8787709f3a312dc25bfec)

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-11-20 14:03:28 +00:00
Tobias Henkel 17c155b9c3 icecc: Use bb.utils.which instead of calling which
The icecc class often calls 'which' for determining paths. This leads
to many messages on stderr in case 'which' doesn't find the
executable. Using bb.utils.which is more appropriate here and doesn't
pollute stderr.

(From OE-Core rev: 7ed7aa38182ce8c7300a08e3aefcc65da2b524a8)

Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20 14:03:27 +00:00
Irina Patru f2ed8fa276 distrodata.bbclass: Add fetch2 handlers to svn case in checkpkg
The existing code in checkpkg from distrodata.bbclass had similar
functionality with fetch when searching for latest package version.

For packages that use svn protocol that part was rewrote in order
to use fetcher API.
It now calls latest_revision method from Svn class in fetch2 so
that it gets latest version.

[ YOCTO #1813 ]

(From OE-Core rev: 2686b92bbab88cc777fdc0e4dded5aeabca7ac77)

Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20 14:03:27 +00:00
Hongxu Jia 943f4c161c kernel-grub.bbclass: support /boot area within root partition
Previously, it supported the situation that /boot area with separate boot
partition:
...
menuentry "Update bzImage-3.10.10-WR6.0.0.0_standard-3.10" {
    set root=(hd0,1)
    linux /bzImage-3.10.10-WR6.0.0.0_standard root=/dev/sdb1 rw ip=dhcp
}
...

But didn't consider the situation that /boot within root partition:
...
menuentry "Update bzImage-3.10.10-WR6.0.0.0_standard-3.10" {
    set root=(hd0,1)
    linux /boot/bzImage-3.10.10-WR6.0.0.0_standard root=/dev/sdb1 rw ip=dhcp
}
...

This fix supported them both.
[YOCTO #5514]

(From OE-Core rev: 53d342db9f9995564573715f28c3e4c9c8c68bf9)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20 14:03:23 +00:00
Bruce Ashfield d7ccfc7605 kernel.bbclass: fix hardlink test
The commit [kernel.bbclass: test for hardlinks before installing] doesn't
work on all build machines without a space between the ! and the test for
hardlink equivalance. The build continues, while the test fails and no
copy is made into the sysroot. Eventually tasks like build_hdimg will fail
with the missing kernel with the root cause being less than obvious.

(From OE-Core rev: 0704648e9dfd2897f6f54773a0e7d2762117970c)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-16 10:04:26 +00:00
Bruce Ashfield db7f8d4114 kernel.bbclass: test for hardlinks before installing
commit df564c4 [kernel: Use hardlinks for do_populate_sysroot for speed]
does indeed speed up the build, but it also means that the KERNEL_OUPUT
and KERNEL_IMAGETYPE may be hardlinks.

If they are hardlinks, install complains that they are actually the same
file and stops the build. We can easily test and avoid the copy if the
file is already in place.

[YOCTO #5527]

(From OE-Core rev: 6a3b3e501c66733216ac43d3f020cfdb512dd640)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 15:27:08 +00:00
Paul Eggleton de5f4ffeb6 classes/license: use "1" to set boolean variables
The expected usage of COPY_LIC_MANIFEST and COPY_LIC_DIRS appears to be
to set them to "1" to enable; however the test here is just testing
whether they have a value at all, so setting them to "0" would also
enable them which is somewhat disingenuous. Actually check if they are
set to "1" instead in order to fix this.

(From OE-Core rev: 2d8e124adcf27af524eeeae61daf1b21a1c2f27c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:49 +00:00
Paul Eggleton 152a1b5425 classes/pkg_metainfo: remove
This is very old, and we now have pkgdata which is much more complete.
Nobody appears to be using this class, and even OE-Classic had no
current references to it.

(From OE-Core rev: e67dbb638044b804738bdd589d64d45963a3297a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:49 +00:00
Paul Eggleton a6e3916d51 classes/pkg_distribute: remove
This appears to be a very old way of archiving recipes and associated
files. We have better ways of doing this now, and nobody appears to be
using this class - even OE-Classic had no current references to it.

(From OE-Core rev: e3141844ef84d8a48efa81e0c9c85821ced16f7c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:49 +00:00
Paul Eggleton 5f6ccc6926 systemd: fix comments
It's DISTRO_FEATURES; DISTRO_FEATURE is invalid.

(From OE-Core rev: d2380c683d5411e7a85c3ce80115aea329187534)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:49 +00:00
Paul Eggleton 886568132c classes/license: fix comments
It's LICENSE_FLAGS, LICENSE_FLAG is invalid.

(From OE-Core rev: 70bd620b58ddd90477d9f438922ee3bdc7e8c5a5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:49 +00:00
Paul Eggleton 920be2075b gtk-immodules-cache: fix error message to use correct names
It's gtk-immodules-cache and GTKIMMODULES_PACKAGES.

(From OE-Core rev: 10cc4ceb813128676e78d04068ad089f6b4a697b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:48 +00:00
Paul Eggleton c028dcda06 classes/sanity: validate SDKMACHINE value
If SDKMACHINE is set then check that a configuration file matching it
actually exists, otherwise the user won't know that they've set it
incorrectly.

(From OE-Core rev: 8c984f92af821a4048c93f8e308c5f4a3fa39ca4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:48 +00:00
Paul Eggleton 8692eebc00 classes/insane: improve LIC_FILES_CHKSUM messages
* If the md5 parameter is specified with no value, report that the
  checksum is not specified instead of reporting that it has changed
* If the md5 checksum has changed, point directly to the license file in
  a way that is easy to copy and paste and give the line numbers in an
  easy to read form, as well as asking the user to verify that the new
  contents matches the current LICENSE value.

(From OE-Core rev: ec8590aa81e201e28e500935d31cd7266114471f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:48 +00:00
Paul Eggleton bfc55b9fe4 classes/image-empty: remove
We don't actually need this dummy class; "inherit" can be used with an
expression that evaluates to nothing with current BitBake.

(From OE-Core rev: f312eb2d2a2715e772ed9e8afc7aea326d8079ec)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:47 +00:00
Richard Purdie 931cf6e9a8 staging: Use hardlinking for sysroot_stage_dir
This saves about 2GB on a core-image-sato build so is worth doing and is
consistent with our efforts to try and decrease our build footprint.

Build time in my local test seemed unaffected but on more IO bound
machines it should help.

(From OE-Core rev: 7136cbc64e5efb09f3fae3e2e35a181ca3d66dd4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:47 +00:00
Phil Blundell 790b75f985 insane, license: Trap MalformedUrl exceptions when parsing LIC_FILES_CHKSUM
bb.fetch.decodeurl() will throw if it doesn't like the look of the URL that
it's given.  (Bitbake's idea of what constitutes a valid URL is somewhat
idiosyncratic so it is fairly easy to trip over this by mistake when writing
a recipe.)

If these exceptions are allowed to propagate all the way up to better_exec()
then we will get a large amount of python stack trace spew when they are
finally caught.  Avoid that by catching them locally and throwing
bb.build.FuncFailed() with a suitable explanation instead.

(From OE-Core rev: ef35e164c62d89806367b822e3baeff482ec237f)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:30 +00:00
Richard Purdie 40b3030626 bitbake.conf: Default DISTRO to nodistro
An empty distro value leads to OVERRIDES and FILESOVERRIDES containing
"::" entries which causes odd issues such as files being included when
they shouldn't be. We could put in anonymous python to guard against
empty entries but its messy and setting a default value for DISTRO to
something harmless is much easier.

This patch adds a weak default and ensures the sanity test doesn't
complain about it.

DISTRO_VERSION and SDK_VERSION are also updated to match.

(From OE-Core rev: b7279f99639774674da806d37d252f388f33055f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:30 +00:00
Tobias Henkel 78c6e69bbe icecc: Fix race condition when packaging toolchain
In the current implementation there can be a race condition while
creating the toolchain archive causing the build to break.

This is fixed by locking the toolchain archiving step using flock.

(From OE-Core rev: 8a30be803e91e66688cfc27ca4c21f26fb22eed8)

Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:29 +00:00
Tobias Henkel 0dbd5456f9 icecc: Add package whitelist
There are some recipes which parse the PARALLEL_MAKE variable by their
own and set them to an empty string afterwards. This disables icecc
for this recipe.

Adding a whitelist for forcing icecc makes it possible to use icecc
also with these recipes.

(From OE-Core rev: d2735ac44887c7e01134d6870a4875a786501eba)

Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:29 +00:00
Tobias Henkel 19c65b25a9 icecc: Support shell evaluation of KERNEL_CC
In the current implementation a KERNEL_CC variable containing shell
evaluation breaks the build process. Shell expansion is not happening
before general expansion in get_cross_kernel_cc which results in a
syntax error and an aborted parse process.

Before expanding the KERNEL_CC variable get_cross_kernel_cc now checks
for backticks or '$(' in the KERNEL_CC variable and performs a shell
evaluation using a call to echo if it finds one.

(From OE-Core rev: b28bae30fc5d8d1d7cc675ddb4159c39fb9bc3fd)

Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:29 +00:00
Tobias Henkel d283bfd960 icecc: Enable icecc also for install step
Some packages are calling the compiler in the install step. In this
case either the build breaks or icecc is not used for building. The
proper environment has to be set to enable icecc based building.

(From OE-Core rev: bb1366cebb60593fc21fd7a9a678a159da8ec81c)

Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:29 +00:00
Tobias Henkel be181972e4 icecc: Add dummy python version of set_icecc_env
Bitbakes prepend mechanism for the tasks disregards the type of the
function. Thus bitbaking recipes using python functions for configure,
compile or install steps fail due to the missing python version of
set_icecc_env.

Assuming that icecc doesn't need to be used in such situations adding
a dummy python version of set_icecc_env fixes this.

(From OE-Core rev: 365dec500166b8eb9d64c573dd7139d3a26ae445)

Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:29 +00:00
Tobias Henkel 54f52bcd33 icecc: Add blacklist vars to BB_HASHBASE_WHITELIST
Changing any of the ICECC blacklist variables should not change the
sstate checksum as this doesn't influence the build result.

(From OE-Core rev: 0f7dc969e64bc7563e208a4fb7d3ebe7c4e69e79)

Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:29 +00:00
Tobias Henkel 280a4922e7 icecc: Reduce verbosity with empty PARALLEL_MAKE
Currently the icecc class prints a note for every package which
disables parallel make at parse time. This is unneccessary as many
packages don't support parallel building. Changing the log level from
info to debug hides these messages in normal builds without removing
the information when needed.

(From OE-Core rev: 6d2735629c20560a9406964195726b1a6e2d7d99)

Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:29 +00:00
Tobias Henkel 79272eb058 icecc: Log reason in error cases
The current implementation doesn't give a hint about the cause in case
something went wrong in set_icecc_env. This makes it harder to find
out why a package is not being built using icecc. Therefore warnings
are inserted in the various error cases.

(From OE-Core rev: 0adea170c7019304471d442784fa0eb9bfcdf94b)

Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:28 +00:00
Lei Liu 6eb26f7865 image-mklibs: Fix grep pattern when mklibs collects executables in rootfs
File command in some version could print extra space between
"LSB" and "executable" - it causes mklibs can't find any executables
using grep "LSB executable".  Fix the grep pattern to catch
multiple spaces.

(From OE-Core rev: a52ef8c5dcd71f39bb48c71fb868cc0db662560e)

Signed-off-by: Lei Liu <lei.liu2@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 16:00:27 +00:00
Ross Burton 65ca5cb164 syslinux: add APPEND to dependency list
Changing APPEND wasn't causing syslinux to re-run, so add a manual dependency.

(From OE-Core rev: 3c2d7ae5d59cb76a838f227c4cb0c64cea0d9e03)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 10:34:09 +00:00
Richard Purdie df564c4ea8 kernel: Use hardlinks for do_populate_sysroot for speed
The kernel tree is large and doesn't need to be copied. Override
the default sysroot handling function to use a hardlink copying
function in python.

This commit also drops the copying of the /lib directory which
just contains the kernel modules. We never use those in the sysroot
so there is little point in carrying those around.

For linux-yocto this takes the do_populate_sysroot time 24s -> 14s.

(From OE-Core rev: 13259459e200a237ca486cbe1123a0b0a4d1eebf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 10:34:09 +00:00
Richard Purdie 5e73287ad8 kernel: Use hardlinks during do_install for speed
Whilst the comment says we can't do this, its incorrect, install operates
on WORKDIR and its hard for different parts of WORKDIR to be on different
filesystems. Hardlinking instead of copying is therefore a nice performance
gain.

Also, completely skip the Documentation directory (adding a dummy Makefile
to keep make happy) and tweak the other cp commands to link since if we
don't we'd get "this is the same file" type errors from cp for some kernel
versions.

For do_install on linux-yocto, this takes it from 227s -> 84s.

(From OE-Core rev: 0727e510f8533216518563b1533e804a1dc44402)

(From OE-Core rev: f6e98af6b9f6729bb61f17e3b4203c3c79829205)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 10:34:08 +00:00
Khem Raj 7c3986e410 cross-canadian: Let cross-canadian packages build for uclibc
Fixes errors like

Parsing recipes...ERROR: Building cross-candian powerpc for an unknown
TARGET_SYS (powerpc-angstrom-linux-uclibc), please update
cross-canadian.bbclass
ERROR: Building cross-candian powerpc for an unknown TARGET_SYS
(powerpc-angstrom-linux-uclibc), please update cross-canadian.bbclass

(From OE-Core rev: 7928a9e54dfa85cbfd042e25ed883a9795f09f1b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-08 17:31:34 +00:00
Richard Purdie d6cc7c8ed7 toolchain-scripts/meta-environment: Further cleanup code duplication
There was still duplicated code in toolchain-scripts, this further cleans
up the functions to remove it. The now unused includedir parameter is also
dropped.

The final scripts do end up reordered slightly and the sysroot is parametrised
for the IDE scripts which is an improvement but should have no functional
difference.

(From OE-Core rev: 1dbd65b4d14319e784a66776c1e9943d0179d3ee)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-06 11:02:27 +00:00
Richard Purdie 0331fc2805 package_deb/package_ipk: Cleanup control file handling/races
If you Ctrl+C ppackage_write_{deb/ipk} control files can get left lying around
and make it into another packaging format. This ensures we cleanup all known
control files before starting packaging. We can simplify some of the globbing
as a result.

(From OE-Core rev: 7f8c728c82a17621461be2114c1afab3713a808e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-06 11:02:27 +00:00
Richard Purdie 1eefcf0ba8 package_rpm: Remove need for locking
Currently if multiple package tasks are running against a recipe, package_rpm
is restricted to the slowest speed of them due to the locking. This patch
explicitly ignores the opkg/debian artefacts and hence allows a speedup.

It also removes an issue were a Ctrl+C interrupting a deb.ipk packaging task
would end up with CONTROL/DEBIAN files in the spec file resulting in a build
failure.

(From OE-Core rev: 4c3b3a57aa9ced231f5c0340920195c15a26f2b1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-06 11:02:26 +00:00
Richard Purdie d5a1538f0f toolchain-scripts: Drop darwin8 code
The code was clearly broken and isn't used, even by meta-darwin so we
might as well remove it.

(From OE-Core rev: b9d51bfe0d4821f5de75085ba8af732c46de3328)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-06 11:02:26 +00:00
Richard Purdie e52020ed17 toolchain-scripts/meta-environment: Merge toolchain_create_sdk_env_script and the for_installer variant
Having two scripts which do basically the same thing is a nightmare. This merges
them together. It also makes the sysroot location a variable in its own right
which may be more useful for end users wanting to change sysroot.

(From OE-Core rev: 213e0c67e938b802e6bb2246f00b7343a6f77b99)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-06 11:02:26 +00:00
Chen Qi 5810d54756 extrausers.bbclass: avoid infinite loop
Avoid infinite loop if the last record in EXTRA_USRES_PARAMS doesn't
end with a semicolon.

It's possible the the users will write configurations like below.

INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "useradd tester; useradd developer"

In such situation, the do_rootfs task will enter an infinite loop.
An infinite loop is never acceptable.

This patch fixes the above problem.

(From OE-Core rev: bf4fb345a9db306fa4c7211b7e6795334a649dd5)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-06 11:02:26 +00:00
Xufeng Zhang a530781a44 kernel.bbclass: Delay rm_work to run after do_bundle_initramfs
Since kernel will build twice when we are trying to bundle kernel
and initramfs together after commit 609d5a9ab("kernel.bbclass,
image.bbclass: Implement kernel INITRAMFS dependency and bundling"),
thus, the second building for kernel would fail if rm_work is done
previously.

To fix this problem, we need to make do_bundle_initramfs task run
before do_rm_work task.

[YOCTO #5416]

(From OE-Core rev: 8308e22a44a2dea7d1bbfb429b9df9c63714a649)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-05 22:04:27 +00:00
Felipe F. Tonello 8f84cc99bd package.bbclass: Fix split_and_strip_files when file has single quote (')
Fix false error report when a file that has a single quote by escaping
the single quote. Some packages might install files with quotes, such
as music files and other types, that will cause the problem.

(From OE-Core rev: 212471f81d210e596798db5e5d927418090a63a2)

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-05 22:04:27 +00:00
Alexandru DAMIAN d870d3e38a toaster: add class to dump toaster-tracked data
Adding a new bbclass that will collect and send relevant
data from the task context to the Toaster UI.

This bbclass consists of postfuncs that get executed
right after the main task func, and in the same context.
This allows data gathering in a synchronous manner during
the build, guaranteeing data integrity. This approach also
preserves the task signatures.

The data is moved to the UI through the event system.

There is no performance impact if the class is disabled.

License is MIT.

(From OE-Core rev: 1d2d37d579492b63d20ff8aa890a43b9a1576cf0)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-04 09:36:21 +00:00
Richard Purdie 4d7639edd3 image_types: Improve dependency handling between types (and use for sum.jffs2)
We're seeing a pattern of one image type needing to depend on another
type. A good example is jffs2 and sum.jffs2. This patch makes sum.jffs2
depend on jffs2 which will then allow a EXTRA_IMGAGECMD to be set for
sum.jffs2 individually without changing the jffs2 command. This allows the
-pad option to be configured differently.

(From OE-Core rev: 4a05f4f03b7d710e9e19a97f5d2c35d101e2c648)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-04 09:36:21 +00:00
Jason Wessel 2c99422d96 grub-efi.bbclass: Fix startup.nsh to work on more EFI revs
Some revs of the EFI firmware + shell do not automatically setup the
path in a such a way as to execute a binary without an absolute
reference like "FS0:\EFI\BOOT\bootx64.efi".  All the versions that I
have tested work properly by simply calling the binary which is in the
EFI\BOOT directory by name like "bootx64.efi".

The error you see on the console looks like the following:

startup.nsh> EFI\BOOT\bootx64.efi
'EFI\BOOT\bootx64.efi' is not recognized as an internal or external command, operable program, or batch file
Shell>

This patch simply drops the EFI\BOOT for greater compatibility.

(From OE-Core rev: 754b52ea7a3cdf8e7e939a314525d16c4dfb52cb)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01 11:09:04 +00:00
Jacob Kroon 717c1ed719 update-rc.d.bbclass: Cleanup package scripts
* Add proper preinst script
* Use -n "$D"/-z "$D" checks throughout the scripts
* Only set OPT in cases where its used
* Don't pass unnecessary -f to update-rc.d in postrm script
* Remove outdated comment

(From OE-Core rev: 2d9114aaf130179cb13c20c8b045c2694eca6fd9)

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01 11:09:04 +00:00
Joao Henrique Ferreira de Freitas cc0baf1835 grub-efi.bbclass: Fixes GRUB_IMAGE when using boot-directdisk class
When boot-directdisk class is used and EFI boot is set the
grub-efi-${TRANSLATED_TARGET_ARCH}-native need to be dependent.
Allowing GRUB_IMAGE to be created and bootia32.efi got from the
image directory.

(From OE-Core rev: b9778975db410b8cd01ef6854c7cd3ea22a0b5b7)

Signed-off-by: Joao Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01 11:09:04 +00:00
Jason Wessel a7ba2f9422 syslinux.bbclass: Fix default serial port string
The default value of SYSLINUX_SERIAL_TTY is not correct.

It should be console=ttyS0,115200 else the boot string generated in
the syslinux menus for the serial choice is not correct.  The kernel
boot parameters will get set to:

/vmlinuz initrd=/initrd LABEL=boot root=/dev/ram0 ttyS0,115200

Note that the above is missing the "console="

The default value will now work the same as the value found in
grub-efi.bbclass.

(From OE-Core rev: fbc864241933c6f40814f47e7a85dd71ce255393)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01 11:09:03 +00:00
Richard Purdie 523f2a9ea9 cross-canadian: Improve comment
The previous cross-canadian change was missing some tweaks
to the comments. This clarifies them slightly.

(From OE-Core rev: 154ecc40c289b15fe9cbb33befb20dd10112e788)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30 18:01:34 +00:00
Joe Slater 15bc2ddaf9 vala.bbclass: add dependency on vala
This class points the inheritor, if it is a target,
to directories in the target sysroot, so we want to
be sure the .vapi files are there.

(From OE-Core rev: 2da8bbd47686f54efeec521d521f176f6aeb8d39)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30 17:33:12 +00:00
Richard Purdie bd1cf71974 cross-canadian: Handle powerpc linux verses linux-gnuspe
PowerPC toolchains can use the OS "linux" or "linux-gnuspe". This
patch links them together so the one cross-canadian toolchain can support
both.

GCC_FOR_TARGET is set for the GCC recipe as otherwise configure
can pick up an incorrect value.

[YOCTO #5354]

(From OE-Core rev: a1d6331238982b0c5d39b0a18794f6654b00d46a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30 17:33:12 +00:00
Paul Eggleton 52a3c78719 classes/ptest: do not set EXCLUDE_FROM_WORLD
Various normal recipes that we expect to build during a world build now
inherit this class; it cannot therefore set EXCLUDE_FROM_WORLD.

(From OE-Core rev: 80f29b04b1d0a9357f193085224ccf2bf8f530fa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30 17:33:12 +00:00
Paul Eggleton 72d0504574 classes/ptest: fix quoting
BitBake currently allows using the same quotes outside and inside the
value, but it isn't really right, looks odd and might stop working in
future.

(From OE-Core rev: 0af9cf31851896276a219170001047406f45de50)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30 17:33:11 +00:00
Konrad Scherer b2e86f77b9 pixbufcache.bbclass: gdk-pixbuf-query-loaders depends on libz
ldd sysroots/x86_64-linux/usr/bin/gdk-pixbuf-query-loaders.real
<snip>
libz.so.1 => /sysroots/x86_64-linux/usr/bin/../../usr/lib/libz.so.1 (0x00007fab55393000)

If zlib-native has not been unpacked, host libz is used which can fail.

(From OE-Core rev: 8422c759ae674856aaaee176eab5a395a620443c)

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30 13:39:10 +00:00
Jacob Kroon 76751a03b1 update-rc.d.bbclass: Fix host/target test in postinst
When running the postinst script I get a shell warning:

sh: argument expected

and the service is never stopped. This patch fixes the warning
message and stops the service.

Patch v2: Hans Beckérus pointed out that the patch is not correct.
          This version uses the syntax proposed by Hans. I've tested
          that the postinst script works correctly when run on the target,
          both when the init script exists and when it doesn't exist.

(From OE-Core rev: 7e23557835f756b22b95fa7a1926b5d1d21872c3)

Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29 10:45:21 +00:00
Ross Burton 3ccc65f6ee gnome: set UNKNOWN_CONFIGURE_WHITELIST
This class disable introspection support using --enable-introspection=no but not
all GNOME modules support introspection.

This can cause unknown-configure-options QA warnings, so clarify the option by
using --disable-introspection and add it to the sanity test whitelist.

(From OE-Core rev: a97600330d626eb0ca75178a9011f1a63c8a29f3)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29 10:41:37 +00:00
Hongxu Jia ecf98b4288 kernel-grub.bbclass: add a method to install/update for bzImage
While installing a rpm to update kernel on a deployed target, it will update
the boot area and the boot menu with the kernel as the priority but allow
you to fall back to the original kernel as well.

- In kernel-image's preinstall scriptlet, it backs up original kernel to avoid
  probable confliction with the new one.
- In kernel-image's postinstall scriptlet, it modify grub's config file to
  updates the new kernel as the boot priority.

[YOCTO #4104]

(From OE-Core rev: 8d872e7712a62fa4313a1114a92907c29beffa2e)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-26 15:59:16 +01:00
Andrea Adami bc2040d6b1 image_types.bbclass: fix endiannes for sumtool (jffs2 summary)
For mkfs.jffs2 endianness can be be expressed in the long or short form
with the optional size argument:

 --little-endian
 -l

Strangely the sumtool has a different syntax and does accept the forms:

 --littleendian
 -l

Prefer the short form valid for both tools.

(From OE-Core rev: be566b6f77423f7f676bc6b0511966651d687871)

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-10-26 15:59:16 +01:00
Andrea Adami 1c3c8115e2 image_types.bbclass: do not force --no-cleanmarkers for jffs2
(From OE-Core rev: b3249f238d669f5f2422207f9c4414b64e24eb73)

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-10-26 15:59:15 +01:00
Petter Mabäcker 823299e5a7 clutter: remove usage of FILESPATH
Usage of FILESPATH is discouraged, since it can make recipes harder to
bbappend. Instead FILESEXTRAPATHS should be used to extend the path.
However in clutter the default paths solves the problem if we
put all patches in ${BP} directory instead.

(From OE-Core rev: cc41cb61707da1b4ae029de70c922802067166c2)

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-26 15:59:13 +01:00
Christopher Larson 754e8768b6 base.bbclass: fix nondeterministic PACKAGECONFIG processing order
The PACKAGECONFIG flags were iterated over using dict.items(), but this
returns the items in an undefined order. As this order determines the
EXTRA_OECONF append order, we can get EXTRA_OECONF which are functionally
equivalent, but whose contents differ, resulting in not using shared state
archives we should be using.

(From OE-Core rev: 843a5dd8f8f0461e286d9fdb3ba55205b4275f88)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-24 08:38:27 +01:00
Stefan Stanacar d3cb369365 lib/oeqa/runtime: build kernel module on target test
Builds a simple Hello World module on target.
Added to the defaults for core-image-sato-sdk.

(From OE-Core rev: c61c3dee162aa1f5bf31b2a09d8b916dc1712056)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18 15:58:16 +01:00
Ross Burton 529bf977e9 update-rcd.bbclass: fix host/target test
"update-rc: Stop and remove service if updating package" (oe-core d91b08) had a
bug in it's implementation of a "host or target" test which always resulted in
"target", so the rootfs scripts were attempting to restart daemons on the host.

(From OE-Core rev: 2b179d90eacc58f0b217f64407782a9174362850)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16 14:51:07 +01:00
Richard Purdie 40420b9006 cross-canadian: Fix SHLIBSDIR when using multilib
Both nativesdk and multilib use MLPREFIX for their partciular purposes. When
we have both set, cross-canadian can confuse SHLIBSDIR. This forces the
variable to the correct value for cross-canadian, fixing toolchains in
multilib builds.

[YOCTO #5333]

(From OE-Core rev: 0633b93086a7de7226f4dc6ca403ee116bc58669)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16 13:31:37 +01:00
Richard Purdie 4bece4b9e6 nativesdk: Fix pn check
There are missing brackets in the check meaning MLPREFIX doesn't
get set for nativesdk-qemu-helper when it should be.

(From OE-Core rev: 5011f4bc8a418d0616d2936b60ecb7ca156632a3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16 13:31:37 +01:00
Victor Kamensky 5c63fc7a67 classes: add aarch64_be target
Add big endian ARMv8 target to OE infrastructure

(From OE-Core rev: 570ae1afecc88b12a11e62a4341069c125d18403)

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:32 +01:00
Ross Burton 9877df0309 insane: configure option checking
(From OE-Core rev: 1b51688d2ea5174334cc8a8a559461b2c4a15a77)

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-10-14 16:55:27 +01:00
Valentin Popa f11cb8dd28 image types: split live into iso and hddimg
Changes to split live into iso and hddimg without
adding a new image type class.
This patch has only a visible effect on HOB and solves
part 2 of #3197

[YOCTO #3197]

(From OE-Core rev: f05ae5f57d9d1bd839fae0e3f353d4e0e303a183)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:27 +01:00
Bruce Ashfield 6a6735cb98 kernel: restore scripts in the sysroot
When building against the sysroot, out of tree modules can require modpost
and other utilities normally found in the kernel's scripts directory. For
the kernel source in the staging dir, these scripts have been removed to
avoid mixing archiectures when packaging kernel-dev (among other things).

Rather than further complicate the kernel's install rule, or its packaging,
we can restore the scripts by building them in the kernel staging directory
after the sstate is installed, making them available to packages that need them.

(From OE-Core rev: 5bcd65807aa634060f98928db6011856934dabe4)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:27 +01:00
Felipe F. Tonello 86bb78cc53 update-rc: Stop and remove service if updating package
Since when updating packages packages managers do not remove the previous package,
it just replaces new files and run pre/post install scripts. This causes not
to update update-rc scripts if they were changed.

This patch is useful in case the newer package version updated the update-rc
script.

(From OE-Core rev: d91b08f3a27baa49ae35dc20dba1b2d76e6abd64)

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:26 +01:00
Martin Jansa f33afade31 bitbake.conf: Remove double slash from PATH_prepend and PKG_CONFIG_DIR
* we correctly have
  ${STAGING_DIR_NATIVE}${base_sbindir_native}
  and then double slash in
  ${STAGING_DIR_NATIVE}/${base_bindir_native}
* similar in PKG_CONFIG_DIR where libdir also starts with slash
  ${STAGING_DIR_HOST}/${libdir}/pkgconfig
* also fix double slash in insane.bbclass and staging.bbclass
* I was a bit nervous about staging change (in case the / was important
  in some weird use-case, but the extra slash is there since following
  commit where other extra slashes were removed only the one before
  libdir was kept:

  commit 6ea78d6489
  Author: Richard Purdie <rpurdie@linux.intel.com>
  Date:   Mon Nov 2 17:10:51 2009 +0000

  autotools.bbclass: Separate out useful staging functions into
                     base.bbclass and call from autotools classes
* this isn't fixing any real-world issue AFAIK, I was just trying to
  debug one weird case where debugedit fails with
  canonicalization unexpectedly shrank by one character
  and it's easier to grep for '//' without many harmless instances
  already in run* scripts etc

(From OE-Core rev: 0ddaf52e9e344986ae2b016cc068d9eee71b4347)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:24 +01:00
Paul Eggleton 567754acb8 classes/package: handle filenames containing wildcards
It is uncommon, but it is possible for upstream sources to contain files
that have wildcard characters in their names (Webmin is an example).
Because we were running glob.glob() on every entry in the list of
entries in FILES and then adding the result to the files list to be
processed, the process would loop infinitely if files whose names
contained wildcard characters were present. Fix this by avoiding
re-processing the output of glob.glob() with itself, and also "escape"
wildcard characters in FILES entries added automatically from
do_split_packages().

Fixes [YOCTO #1676].

(From OE-Core rev: 1aa3fbb547b0e21455f0dcc9b72ded08dc0efd67)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:24 +01:00
Nobuhiro Iwamatsu 029b0fef50 kernel.bbclass: unset LDFLAGS when run devshell in kernel recipe
When user runs devshell in kernel recipe and compiles kernel,
this will fail by unrecognized option of LD.

----
$ make
...
arm-poky-linux-gnueabi-ld: unrecognized option '-Wl,-O1'
arm-poky-linux-gnueabi-ld: use the --help option for usage information
----

This set to empty LDFLAGS when user runs the devshell, and solve this problem.

(From OE-Core rev: e36ac3ab3a7fe02c7eeb3998ff33c001ab795841)

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:23 +01:00
Otavio Salvador dae0c677d1 uboot-config.bbclass: Raise an error for unknown configs
When passing the wrong value for UBOOT_CONFIG it ought to raise an
error otherwise it is quite difficult for user to notice it didn't
behave as expected.

Reported-by: Lauren Post <lauren.post@freescale.com>
(From OE-Core rev: 5110dc988e3b8a1ce8b2309e4ddf17abb3f1cb0c)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:23 +01:00
Richard Purdie 0bd63125c3 utils.bbclass: Fix override ordering for FILESPATH
Currently the overrides are being applied backwards. This means something which is
platform specific is overriding something which is machine specific which
is clearly not intended.

This patch corrects the ordering to match the normal expected behaviour of
OVERRIDES.

Secondly, all overrides are being searched for each path in turn. What should
really happen is that we should look for the highest priority override (e.g. distro
or machine) in each layer, then move on to platform/tune (e.g. armv7a) and
then to arch (e.g. arm). This patch therefore also reverses the for loops
to achieve this behaviour and give the result the user would expect.

(From OE-Core rev: 92cbf7eeea553bfa24c7081473fa8bc4ebc1f552)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:22 +01:00
Peter Kjellerstedt 0314b910e9 kernel-yocto: Add a missing '['
(From OE-Core rev: 68a7d9f0e19ed577854a04610efc902062a369a8)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:21 +01:00
Otavio Salvador f93071fb22 uboot-config.bbclass: Fix use without IMAGE_FSTYPES appending
Before checking if the image is a valid value, we need to check if the
list of items is big enough or we will raise an exception.

Reported-by: Lauren Post <lauren.post@freescale.com>
(From OE-Core rev: b833837cac377e7c1c3ff18531b152340b669329)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:21 +01:00
Richard Purdie d3846f06d1 classes: tar 1.27 fixes
tar version 1.27 returns:

tar: --same-order option cannot be used with -c

with the commandlines we have been using. We can remove the -s option (which
is --same-order) to remove the error.

(From OE-Core rev: 3d5a6d0a480a0fa98260a3b3ffc71b8d9e3e58af)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:55:21 +01:00
Richard Purdie ee9a3c191c toolchain-scripts: Fix TARGET_SYS reference
There was a fix missing from a previous commit:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=20a86e16bc54b74fbdb2a3a407d54210ea262925

since there was another section of toolchain-scripts needing updating.
This patch fixes the missing reference and unbreaks the ADT toolchain.

[YOCTO #5340]

(From OE-Core rev: e1b8b4859f00b40fb941a07a394ed35e06541663)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-11 23:10:58 +01:00