Commit Graph

2999 Commits

Author SHA1 Message Date
Richard Purdie 479fcbfd30 udpated-rc.d: Track postinst/prerm/postrm in task checksum
When these functions change, the package should rebuild but currently it
does not. We need to add the dependencies manually as the dependency
code can't track dynamically created variables.

(From OE-Core rev: 4003218f774c38bb5de0d95a43153f8b8d7fc4ce)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:31 +01:00
Richard Purdie 47129f300f systemd: Track postinst/prerm in task checksum
When these functions change, the package should rebuild but currently it
does not. We need to add the dependencies manually as the dependency
code can't track dynamically created variables.

(From OE-Core rev: c5d7100a358244085a697a23790676df5eb4afa3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:31 +01:00
Ross Burton 9def5c9542 license.bbclass: use shutil instead of bb.utils.copyfile
bb.utils.copyfile is for a specific purpose and more complicated than needed
here, so just use shutil.copyfile.

(From OE-Core rev: dc81df215cc94c279991df35125d94770a1bc3d2)

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-04 18:26:51 +01:00
Richard Purdie 20a86e16bc cross-canadian: Fix TUNE_PKGARCH references
The cross-canadian compilers are now build once per architecture but were being
installed into tune specific locations which is incorrect. This adjusts things
so they are make TARGET_ARCH specific. We gain the tune specific parts from the
target sysroot which remains tune specific, the compiler and tools are independent
ot that.

binutils/gcc require sysroot options but since we reset at runtime, these shouldn't
have dependencies in the sstate checksums. They are therefore also excluded.

With these patches, switching machines does not result in a rebuild of *-cross-canadian
and the compiler is correctly located and referenced in the target images.

(From OE-Core rev: f58acab6414fe96d9e07ebbe86b348d2ac2bed5f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04 18:26:50 +01:00
Richard Purdie 6dff1bc80f cross/crosssdl/native/nativesdk: Fix do_packagedata stamps
If you build nativesdk for machine A, then change to B you will see sstate
manifest warnings for the packagedata files. The stamps are machine
specific and should not be, ditto for native.

This patch copies the populate-sysroot extra stamp entries to avoid
these warnings.

(From OE-Core rev: a64de25d6006ec6dd777d8f3820a48244dfbf62b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04 18:26:50 +01:00
Jonathan Liu d299444adc boot-directdisk: avoid loop in MBR disk signature generation
Instead of looping until the generated signature is non-zero, just
return 'ffffffff' if it's zero. This avoids an infinite loop if the
generated signature is always zero.

(From OE-Core rev: 34c74ba45c04efc2dd998545bf7a31d7b06a0ee0)

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-10-04 18:26:50 +01:00
Jonathan Liu df18dc084e boot-directdisk: ensure generated MBR disk signature is non-zero
A zero MBR disk signature is generally seen as no signature and
another partitioning program might install a new signature.

(From OE-Core rev: b6cafb1fcd6c168f8f4a4d2d5c74f3b425f156f3)

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-09-30 22:11:58 +01:00
Jason Wessel 072c4e123f kernel.bbclass: Allow INITRAMFS_TASK to trigger copy initramfs code
Activating the INITRAMFS_TASK can cause circular dependencies, but
that is up to the end user to resolve in recipes.  The INITRAMFS_TASK
should also trigger immediate linking of the cpio task in the first
compile pass.  This was a subtle regression introduced by: 609d5a9ab
(kernel.bbclass, image.bbclass: Implement kernel INITRAMFS dependency
and bundling).

This patch restores the previous behavior and only affects the
INITRAMFS_TASK which is not set by any of the default build profiles
in oe-core.

Reviewed-by: Andrea Adami <andrea.adami@gmail.com>
(From OE-Core rev: 36faac868e086e9c23537b107cdd973d7fd980bd)

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-09-30 22:11:58 +01:00
Richard Purdie 08d902ac8f native: Use a native site file and ensure the correct sed is used
native recipes were not using the site files. There are some things we need
to correct such as not using the path to sed-native. This allows us
to deploy settings globally for all recipes rather than hacking around
then in individual recipes as libtool-native used to for sed.

This fixes a regression introduced by
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=32edeb391f2107bb66b361cdcd4b8d4447731c33

(From OE-Core rev: db2eb3258844458569b7d4e6ed82c345858a3b99)

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-09-30 22:11:57 +01:00
Jason Wessel 0ac89346de boot-directdisk.bbclass: Fix media generation problems with vmdk
The various populate methods need to accept a path as an argument vs
using hard expanded variables.  In the case of the boot-directdisk
class it uses a different path for HDDDIR but it gets eclipsed by the
the class definition at the point in time ${HDDDIR} gets expanded.

The logical fix is to pass the arguments to the functions as opposed
to using globally expanded variables from the class definitions.

This patch changes 3 things:
1) syslinux_hddimg_populate takes an argument for the destination
2) syslinux_iso_populate takes an argument for the destination
3) populate is changed to boot_direct_populate because there
   was a conflict with it overriding the populate in bootimg.bbclass

[YOCTO #3994]

(From OE-Core rev: 63d164b755b984021f7e3cdba7280918ded6e821)

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-09-30 22:11:56 +01:00
Jason Wessel ec9f4c3c25 syslinux.bbclass, syslinux: Update to syslinux 6.01
A newer version of syslinux is required for an EFI enabled isohybrid.
This is used for the the capability to generate 3 types of ISO images,
all of which can be booted off a USB device or HDD if copied with dd.

1) PC BIOS only ISO
2) EFI only ISO
3) EFI + PC BIOS ISO

The syslinux.bbclass required a minor tweak because a few .c32
libraries require dynamic loading from the created media as of
syslinux 5 and up.  This was a good time to also fix the
duplication of the AUTO_SYSLINUXMENU block.

[YOCTO #4100]

(From OE-Core rev: 17d74fbd09e377e100423e1a73b9d4ce761a21d7)

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-09-30 22:11:56 +01:00
Jason Wessel fde2911983 bootimage.bbclass, zisofs-tools-native: add ability to compress ISO images
The mkzftree is needed to allow ISO images to be compressed with
minimal runtime overhead.  Below is an example of the savings on a
core-image-minimal.

Before ls -l:
24117248 core-image-minimal-qemux86-64.iso

Using the mkzftree ls -l:
16777216 core-image-minimal-qemux86-64.iso

(From OE-Core rev: 808d4371939ec48ed62e0c0b6614b96d61b1f7b8)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-30 22:11:56 +01:00
Jason Wessel 4a0ff9c74d syslinux.bbclass: Fix hard coding of console=tty*
The SYSLINUX_SERIAL variable was hard coded and occasionally needs to
be different for the kernel argument vs the syslinux argument.

In the auto-generated boot mode console=tty0 was hard coded, and this
is not needed at all, and causes problems in some cases if a end user
wanted to change the console=... via the kernel boot argument APPEND
mechanism.  The default can be forced with SYSLINUX_DEFAULT_CONSOLE
for systems that need a special specification to enable the frame
buffer instead of a serial port.

[YOCTO #3944]

(From OE-Core rev: cf2fba810a8a59cff71bf2c12e516e9080146604)

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-09-30 22:11:56 +01:00
Jason Wessel 5a2d11e845 grub-efi.bbclass: Add serial and graphics menu options
The syslinux.bbclass already has support for automatically generated
serial and graphics menu choices.  This patch adds the same concept to
the grub-efi menu.  That makes it possible to generate a single image
which can boot on a PCBIOS or EFI firmware with consistent looking
boot options.

[YOCTO #4100]

(From OE-Core rev: 8444199fb598012f54853b010b5e5cce750db89d)

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-09-30 22:11:56 +01:00
Jason Wessel 24ffda4701 bootimage.bbclass, grub-efi.bbclass: Improve EFI & PCBIOS+EFI ISO support
Using the latest mkisofs it is possible to generate 3 different types
of ISO images, which can be used in various scenarios.

1) PCBIOS Only ISO
   - This option remains unchanged by this commit
   - Uses syslinux menus
   - Can be directly copied with dd to a USB device
   - Can be burned to optical media

2) EFI Only ISO
   - Uses grub 2 menus
   - Can be burned to optical media
   - If you want to use this image on a USB device
     extra steps must be taken in order to format the USB
     device with fat32, and copy an EFI loader which will
     in turn load the iso image

3) PCBIOS / EFI ISO
   - This is a hybrid image ISO that will work for case 1 or 2
     as above with the same restrictions and boot menu types
     depending on what type of firmware is installed on
     the hardware or depending on if EFI or "Legacy Boot" is
     enabled on some UEFI firmwares.

The syslinux.bbclass is now always required because that is where the
isohybrid dependencies come from as well as the configuration data for
the isohybrid.  The isohybrid is the secret sauce which allows the ISO
to work as optical media or as a disk image on USB or a HDD/SSD.

[YOCTO #4100]

(From OE-Core rev: a4baf911ab9d306ce5200e7d794ed6a9ccb25f30)

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-09-30 22:11:56 +01:00
Richard Purdie b049d532f6 testimage: Exclude BB_ORIGENV variable
The BB_ORIGENV variable isn't picklable and causes failures when generating the task
signature for the autorun image mode. We don't want to depend on its contents anyway
so lets exclude it.

(From OE-Core rev: 3f5f9d2681d41e44dade5d3a5a4bff3fd38f5506)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-26 17:27:02 +01:00
Paul Eggleton 2f64fae60b classes/package_rpm: fix bitbake package-index for RPM
The function that "bitbake package-index" relies upon when using the RPM
package backend (package_update_index_rpm()) uses MULTILIB_PREFIX_LIST
to get the list of package architectures to be indexed, but that
variable is only set when populate_sdk_rpm or rootfs_rpm are inherited,
which is not the case for the package-index recipe. Until we're able to
refactor this properly, for minimal impact just use the value of
ALL_MULTILIB_PACKAGE_ARCHS if MULTILIB_PREFIX_LIST does not give us any
architectures (the equivalent function in the ipk backend uses the
former variable).

Having "bitbake package-index" working is important because it's the
only practical way of indexing RPM packages for use as a feed; host
versions of createrepo won't work properly because they won't support
indexing recommends relationships.

Stopgap fix for [YOCTO #5278].

(From OE-Core rev: 9359719c563e1ab0ff10186d1a1b6bde7840dbf3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-26 17:15:32 +01:00
Richard Purdie 2f8ce2c784 package.bbclass: Clear umask when using os.mkdir
We switched to using os.mkdir with the file creation mode specified as the
second parameter. Python masks this with umask behind the scenes which isn't
what we want, we really want the permissions we specify.

To avoid this we zero the umask beforehand and restore afterwards. Other
solutions are possible but would not perform as well which is why
we're using os.mkdir in the first place.

Martin Jansa deserves the credit for debugging where the problem was.

(From OE-Core rev: f91226553e39439bfd17ab2b06c56cb8bf41061b)

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-09-26 16:37:56 +01:00
Amy Fong c54076ed8a distutils: Replacing path to native path only to be done to non-native python packages
distutils: Replacing path to native path only to be done to non-native python packages

distutils: Replacing path to native python by path to python in the
image to support python packages with console-script setup resulted in
a "bad interpreter" error message because coreutils-native is not
a specified dependency of a number of native python packages.

We modify the change to apply specifically to non-native packages.

(From OE-Core rev: 312b6b33dca565153bc2e92d7ff6dd2974db4edb)

Signed-off-by: Amy Fong <Amy.Fong@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-26 16:37:55 +01:00
Laurentiu Palcu cbc12aac86 package_deb, apt.conf: fix apt failure in do_rootfs()
The changes in this commit, dc5f6c3898,
moved apt config directory from native SYSROOT to WORKDIR.
Unfortunately, Dir::Etc in apt.conf was not changed accordingly and
sources.list file could not be found during do_rootfs().

This commit fixes this issue.

[YOCTO #5241]

(From OE-Core rev: 65a2a1e1d0b0e3dcc34d47f46185f24d753b53dd)

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-09-24 17:24:14 +01:00
Stefan Stanacar 95455bc3e2 classes/testimage: add informational messages about tests and do some cleanup/formatting
Adds info about tests run even if they passed (in case of errors log will
be printed anyway). Also some style change for qemu object.

(From OE-Core rev: 4adcf960be9c7477e314788d42b80753c2aaf572)

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-09-24 17:24:12 +01:00
Chen Qi 80203494aa image.bbclass: uninstall package only if it's already installed
Remove a package from rootfs only if it's already installed. Also,
if a package is uninstalled, remove it from installed_pkgs.txt.

[YOCTO #5169]

(From OE-Core rev: b86dc63bc87763119fce8286f37f44361da824d0)

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-09-24 17:24:12 +01:00
Roy Li 8c5f345497 sstate.bbclass: ignore the tar failure.
sstate_package creates hardlink from sysroot to SSTATE_BUILDDIR, and
sstate_create_package stores SSTATE_BUILDDIR into a archive file by
tar, these two task can be run simultaneously for different packages,
and make a hardlink for a file will lead to the change of the links
number of file, and if tar is reading this file, it will fail with exit
code 1, and report "file changed as we read it":

    DEBUG: Executing shell function sstate_create_package
    tar: x86_64-linux/usr/share/aclocal/xorg-macros.m4: file changed as we read it

4b3e353a5[sstate.bbclass: fix parallel building issue] tries to use the
tar parameter --ignore-failed-read to fix, but it does not work, and
tar parameter --warning=no-file-changed can close the warning, but can
not change the exit code. so close shell immediate exit, only fail
if tar returns not 1 and 0.

Exit codes of tar:
    http://www.gnu.org/software/tar/manual/html_section/Synopsis.html

(From OE-Core rev: fad604b719e00b03e09da5fdb485e72332275b4a)

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-09-24 17:24:12 +01:00
Richard Purdie c2d5fa9289 gzipnative: Ensure dependencies apply to do_unpack and do_populate_lic
| DEBUG: Executing python function sstate_task_postfunc| DEBUG: Staging files from /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-x32/build/build/tmp/work/qemux86_64-poky-linux-gnux32/core-image-minimal/1.0-r0/license-destdir to /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-x32/build/build/tmp/deploy/licenses| NOTE: Using umask 002 (not 22) for sstate packaging| DEBUG: Preparing tree /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-x32/build/build/tmp/work/qemux86_64-poky-linux-gnux32/core-image-minimal/1.0-r0/license-destdir for packaging at /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-x32/build/build/tmp/work/qemux86_64-poky-linux-gnux32/core-image-minimal/1.0-r0/sstate-build-populate-lic/license-destdir| NOTE: Removing hardcoded paths from sstate package: 'find /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-x32/build/build/tmp/work/qemux86_64-poky-linux-gnux32/core-image-minimal/1.0-r0/sstate-build
 -populate-lic/ \( -name "*.la" -o -name "*-config" -o -name "*_config" \) -type f | xargs grep -l -e '/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-x32/build/build/tmp/sysroots/qemux86-64' | tee /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-x32/build/build/tmp/work/qemux86_64-poky-linux-gnux32/core-image-minimal/1.0-r0/sstate-build-populate-lic/fixmepath | xargs --no-run-if-empty sed -i -e 's:/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-x32/build/build/tmp/sysroots/qemux86-64:FIXMESTAGINGDIRHOST:g''
| DEBUG: Executing shell function sstate_create_package
| gzip: /lib64/libz.so.1: version `ZLIB_1.2.5.1' not found (required by gzip)
| tar: Child returned status 1
| tar: Error is not recoverable: exiting now
| WARNING: /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-x32/build/build/tmp/work/qemux86_64-poky-linux-gnux32/core-image-minimal/1.0-r0/temp/run.sstate_create_package.20384:1 exit 2 from
|   tar --ignore-failed-read -czf $TFILE license-destdir
| DEBUG: Python function sstate_task_postfunc finished
| ERROR: Function failed: sstate_create_package (log file is located at /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-x32/build/build/tmp/work/qemux86_64-poky-linux-gnux32/core-image-minimal/1.0-r0/temp/log.do_populate_lic.20384)
NOTE: recipe core-image-minimal-1.0-r0: task do_populate_lic: Failed

Imagine:

pigz-native is used from sstate.
zlib-native is getting rebuilt.

pigz-native has some special handling to ensure its not used until the
system is ready. This is through a class and installing into a subdir of
PATH which only gets added in when we believe its available. We use
pigz-native in the image generation code and its in DEPENDS.

DEPENDS are guaranteed available for do_configure. do_populate_lic can
run before do_configure so the DEPENDS isn't met and I think this is our
corner case.I suspect ways of fixing this are to either:

a) force do_populate_lic after do_configure everywhere
b) statically link pigz-native
c) add in an explicit dependency to gzipnative.bbclass forcing
do_populate_lic after do_configure. If do_unpack handled a tar file in
an image, it would also be at risk of course.

Looking at each, a) is overkill and our dependency tree is nasty enough
already. b) sounds nice but is also risky since what happens if the gzip
binary is half copied when we run it. Our hardlink copying should deal
with that but I'm still nervous. This leaves us with c) so we could do:

do_unpack[depends] += "gzip-native:do_populate_sysroot"

The reproducer is:

bitbake pigz-native
bitbake zlib-native -c clean
bitbake core-image-minimal -c populate_lic --no-setscene -f

however your system needs to have an old version of zlib on it which
pigz-native can't run against. The line above fixes it.

(From OE-Core rev: 16cb83d13bdb7e1abc88c18ec224efcd9ceef4f6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:43 +01:00
Otavio Salvador 5262ea16a6 uboot-config.bbclass: Handle UBOOT_MACHINE setting
The class now consolidate the handle of UBOOT_MACHINE and UBOOT_CONFIG
variables and handle possible mistakes done by user when using these
variables.

(From OE-Core rev: 87d9b585b2784bec04e9e244dc52c6e929484fd0)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:42 +01:00
Otavio Salvador 19174b0796 uboot-config.bbclass: Use an annonymous python function
The processing needs to happen per recipe and thus it ought to use
annonymous python function instead to be triggered at event.

(From OE-Core rev: 75bde3ee02262cb3c6b91279ca277e3e5324ee5e)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:42 +01:00
Paul Eggleton d652987612 classes/imagetest-qemu: remove old image testing class
This has now been superseded by testimage.

(From OE-Core rev: d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:41 +01:00
Paul Eggleton 595321a626 classes/sanity: test for DISPLAY being set with testimage class
Update the sanity test for DISPLAY being set to handle the new testimage
class rather than the old imagetest-qemu class.

(From OE-Core rev: d1297c2c3ae71de0e9e5cab36e582f5df8666391)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:34 +01:00
Paul Eggleton a3558bfb99 classes/testimage-auto: add class to allow automatically running image tests
Setting TEST_IMAGE = "1" alone will now automatically run tests on the
image immediately after the image is built instead of having to add
INHERIT += "testimage" and run bitbake -c testimage <image> manually
(but that will still work). This restores functionality that was
present in the older imagetest-qemu class with IMAGETEST.

(From OE-Core rev: 72269a8fbec35c39af30fbabb1fa9ca7c5ee8d69)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:34 +01:00
Paul Eggleton eba2428060 classes/testimage: remove odd characters in comments
(From OE-Core rev: 5d46c3df578f44597d8ce70add423e0c15982705)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:34 +01:00
Ross Burton 06965e88e6 insane: don't abort if workdir is not TMPDIR/work
The BASE_WORKDIR variable can be used instead of enforcing WORKDIR being
TMPDIR/work (and aborting the build if it isn't).

(From OE-Core rev: 176a36ace1624f3bbe498307aeabbd7935de14e6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:32 +01:00
Jason Wessel c78c1f9c92 bootimage.bbclass: Move fat image creation into a function
In order to call the fat image creation multiple times it needs to be
in its own function.  A future commit will make use of the new
function to additionally create EFI image files for use with an ISO.

[YOCTO #4100]
[YOCTO #1913]

(From OE-Core rev: 6d5181dc68766f42416a41f4988e8400d37fd7fa)

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-09-17 14:35:17 +01:00
Richard Purdie 1bf8d83d5a utils: Update bb.which reference and other syntax cleanup
* bb.which -> bb.utiis.which()
* Use modern form of datastore access
* Use True, not 1
* Drop pointless imports

(From OE-Core rev: 106a4f5b41e5bdeabe588b9ba362f3693b1a9989)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17 14:35:16 +01:00
Richard Purdie 641a80d760 autotools: Remove .la files if rebuilding non out of tree software
(From OE-Core rev: bcf83bb604906361db98003127b90c422e822322)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17 14:35:16 +01:00
João Henrique Ferreira de Freitas 707da95b4a boot-directdisk: Allow for EFI-only boot direct disk images
Condition building PCBIOS legacy images on MACHINE_FEATURES containing "pcbios"
    or not containing "efi". This ensures existing BSPs will continue to get the
    old PCBIOS legacy-only images. New BSPs can add "efi", "pcbios", or both. The
    images created likewise support one or the other or both.

(From OE-Core rev: c58aceee7dc243467dd87f07ccc61859f8d945e6)

Signed-off-by: João 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-09-14 08:29:42 +01:00
Richard Purdie 8ebe7be3d9 bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific directory
Currently we have a hierarchy of pkgdata directories and the code has to put together
a search path and look through each in turn until it finds the data it needs.

This has lead to a number of hardcoded paths and file globing which
is unpredictable and undesirable. Worse, certain tricks that should be
easy like a GL specific package architecture become problematic with the
curretn search paths.

With the modern sstate code, we can do better and construct a single pkgdata
directory for each machine in just the same way as we do for the sysroot. This
is already tried and well tested. With such a single directory, all the code that
iterated through multiple pkgdata directories and simply be removed and give
a significant simplification of the code. Even existing build directories adapt
to the change well since the package contents doesn't change, just the location
they're installed to and the stamp for them.

The only complication is the we need a different shlibs directory for each
multilib. These are only used by package.bbclass and the simple fix is to
add MLPREFIX to the shlib directory name. This means the multilib packages will
repackage and the sstate checksum will change but an existing build directory
will adapt to the changes safely.

It is close to release however I believe the benefits this patch give us
are worth consideration for inclusion and give us more options for dealing
with problems like the GL one. It also sets the ground work well for
shlibs improvements in 1.6.

(From OE-Core rev: 1b8e4abd2d9c0901d38d89d0f944fe1ffd019379)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:21:00 +01:00
Paul Eggleton 6670be71f7 bitbake.conf: include machine name in DEPLOY_DIR_IMAGE
This allows a clean seperation between image outputs from different
machines, and makes it possible to have convenience symlinks to make
the output ready to deploy.

This did require some surgery in runqemu; if explicit paths to the image
and kernel are not supplied then DEPLOY_DIR_IMAGE needs to be determined
from bitbake or set in the environment. However the script does try to
avoid requiring it unless it really is needed. Corresponding changes
were made in the automated testing code as well.

Based on an RFC patch by Koen Kooi <koen@dominion.thruhere.net>

(From OE-Core rev: 7e90261aec61f79680b5eaeaf5b18c7b795412a4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:21:00 +01:00
Roy.Li 0acde33c75 sstate.bbclass: fix parallel building issue
sstate_package creates hardlink from sysroot to SSTATE_BUILDDIR, then
sstate_create_package will store SSTATE_BUILDDIR into a archive file by
tar, but once other packages install the same file into sysroot, the
creating the archive file will fail with below error:

    DEBUG: Executing shell function sstate_create_package
    tar: x86_64-linux/usr/share/aclocal/xorg-macros.m4: file changed as we read it

This kind of error is harmless, use --ignore-failed-read to ignore it.
The error in tar occurs when the timestamp of the file changes and this
can happen when the number of symlinks change. The file will be included
in the archive.

[YOCTO #5122]

(From OE-Core rev: 4b3e353a532c7b68b0bb86df4a2fcc44f8bb3ef2)

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:20:59 +01:00
Richard Purdie 01db559abd populate_sdk_rpm: Only remove trailing whitespace, not all whitespace
(From OE-Core rev: 06cb4deba6e4df4ffe3015602d5997b26d28778b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-12 08:23:41 +01:00
Richard Purdie 4496e34aaf populate_sdk_rpm: Ensure empty strings aren't passed to attemponly rpm code
If empty strings are passed to the rpm attemptonly code, it breaks. This
ensures we don't do that.

(From OE-Core rev: 6a0d5a3158608364f6baa11fe9ab7fa1f8e251ab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11 23:31:01 +01:00
Stefan Stanacar 83b90e54be classes/package_rpm: remove unsed outdir variable
Not only outdir had the wrong value, it wasn't used actually used in that function.

(From OE-Core rev: 5db4b53e5d969a6da314904fa2335462947c97ea)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11 23:31:00 +01:00
Mark Hatle 4b2d9acda8 python-smartpm: Add an attempt install mode
[ YOCTO #3723 ]

Add a mode to smart that will allow an installation to continue, instead of
failure in the case that one or more items is uninstallable.

Uninstallable packages are simply ignored, and no error is generated.

(From OE-Core rev: bdf07b1698d228dc7ff555199a269b1ff8ceca19)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11 11:06:11 +01:00
Richard Purdie bd3164b9e6 image/populate_sdk: Ensure symlinks in target sysroot are relative
In the target sysroot of an SDK we can have target system absolute links
which don't make sense. This adds a script which fixes them up to become relative
paths instead.

[YOCTO #5020]

(From OE-Core rev: 57d6bdcad55c119e9ab8089d23d462436a0e4440)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11 11:05:05 +01:00
Saul Wold 6b4f7e4b26 systemd.bbclass: get the correct /lib directory
By using os.path.dirname(systemd_unitdir) we get the correct /lib directory instead of
dealing with possibly multilib directories.  This address a QA Error for shipped/not
installed /lib with multilib and x32.

(From OE-Core rev: 5b451a46550ba62e2fbfe5dbe50723b34a4fd527)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-10 23:15:16 +01:00
Muhammad Shakeel 8dedc082ba systemd: Remove base_libdir if installed only for systemd_unitdir
If a recipe installs systemd_unitdir and it is a non-systemd build than
systemd.bbclass deletes systemd_unitdir (/lib/systemd/) but not
base_libdir (/lib). In this case if base_libdir is empty than following
QA Issue is reported.

ERROR: QA Issue: openssh: Files/directories were installed but not shipped
  /lib

If base_libdir was installed due to systemd_unitdir installation than for
non-systemd build it should also be removed.

(From OE-Core rev: c700cb21c189e23a78f0efaaf763259c8cfefa4d)

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-09-10 23:15:16 +01:00
Saul Wold 5f2748e492 cmake.bbclass: ensure CMAKE_SYSTEM_NAME is correct
Using TARGET_OS can add the ABIEXTENSION so ensure that is is removed for the Linux
TARGET_OS, we might have other TARGET_OSes so don't hard code CMAKE_SYSTEM_NAME

[YOCTO #5145]

(From OE-Core rev: 7d8b700242b1b32c6b6d0735b497701800f54fc4)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-10 22:58:33 +01:00
Laurentiu Palcu 9d3d1a2da2 populate_sdk_base.bbclass: select the proper cross-canadian package
Since packagegroup-cross-canadian package name has MACHINE in it, make
the necessary changes here.

[YOCTO #4783]

(From OE-Core rev: 23531590d40acde2775b7c3b90682edc501d68f4)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-10 22:58:33 +01:00
Chen Qi 8d82eae8fd ptest.bbclass: add cleandirs flag to do_install_ptest_base
The do_install_ptest_base task should have cleandirs flag, just like
the do_install task. The ${D}${PTEST_PATH} directory should be cleaned,
Otherwise, there would be similar errors like below if the
do_install_ptest_base task is rerun.

    ln: failed to create symbolic link `xxx': File exists

[YOCTO #5129]

(From OE-Core rev: 25885d3b4f679c33a514d858bc20b0e21aa63721)

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-09-10 15:57:19 +01:00
Chen Qi 8905f7715d ptest.bbclass: fix error on ubuntu host
The do_install_ptest_base function uses 'type -t' command to check
whether do_install_ptest is a function and acts correspondingly.

However, the 'type' command is a shell builtin and its behavior is
not all the same across Linux distros. On ubuntu, if we use #!/bin/sh
as the interpreter for the scripts, as in the case of our intermediate
scripts, the '-t' option for the 'type' command is not supported. So
the check always fails and the do_install_ptest function, even if defined,
is not run.

The same problem also applies to the do_configure_ptest_base and the
do_compile_ptest_base functions.

This patch fixes this problem by avoiding using the 'type' builtin command.

[YOCTO #5128]

(From OE-Core rev: d5a4f031b460437e9501e4e65194ce94d3641130)

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-09-10 15:57:19 +01:00
Richard Purdie 31709ed0af cmake: set system name correctly
For unknown reasons, the cmake class is using SDK_OS as the
target system OS. This makes no sense but only shows up as a problem
when you try a different SDK OS. Fix it to use TARGET_OS which is
the correct thing to do. For the vast majority of users this will
make no difference.

(From OE-Core rev: 57be84259f0885865c85d7bac350979430b956b5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-08 10:51:56 +01:00