aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2015-07-28useradd_base.bbclass: do not warn when the user existsRobert Yang
Use bbnote rather than bbwarn when the user exists, otherwise we would always get the warnings when rebuild the recipe or build with mulitlib, everything is OK if the user exists, so it should not be a warning. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-07-28useradd_base.bbclass: print PN when bbnote/bbwarn/bbfatalRobert Yang
Print PN will help debug: WARNING: openssh: user sshd already exists, not re-creating it Which is better than: WARNING: user sshd already exists, not re-creating it Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-07-27cross-canadian: Put links in place for uclibc and muslRichard Purdie
gcc-cross-canadian-<arch> is only built once. It needs to target all the different libcs, not just the currently selected one. This change ensures that if another libc is used, symlinks are present such that the compiler can be found. The base version is always assumed to be "glibc" with symlinks from musl and uclibc compiler names. This means gcc-cross-canadian is consistent regardless of which libc is selected when its build in multimachine builds. [YOCTO #8025] (From OE-Core rev: 83ead626c0da75edec2833ffb1a29011ec7b83d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27toolchain-scripts: For non-glibc, pass compiler options to ensure the ↵Richard Purdie
correct libc selection gcc-cross-canadian-<arch> is only built once. It needs to target all the different libcs, not just the currently selected one. This change ensures that if another libc is used, the compiler correctly selects the right one. [YOCTO #8025] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27toaster.bbclass: Fix ValueErrorEd Bartosh
Running "bitbake xxx:do_unpack" resulted in exception at the BuildCompleted event from toaster. The reason for this exception was usage of ':' as a field delimiter in toasterstatlist file. As target can optionally contain ':<task>' suffix it caused split(':') to throw exception: File "toaster_collect_task_stats(e)", line 71, in toaster_collect_task_stats(e=<bb.event.BuildCompleted object at 0x7f8434deed50>) ValueError: too many values to unpack Fixed by changing delimiter ':' -> '::' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-26updated-rc.d: Only add dependencies in target caseRichard Purdie
Avoid errors like: ERROR: Nothing PROVIDES 'nativesdk-update-rc.d' (but virtual:nativesdk:dbus_1.8.18.bb DEPENDS on or otherwise requires it). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-25update-rc.d: Include updated-rc.d in DEPENDSRichard Purdie
If you build a user of updated-rc.d like udev, as things stand currently nothing pulls in updated-rc.d but there is a dependency added on the package at do_package time. This can lead to errors during rootfs construction either with licensing. The fact its a RRECOMMEND means the image are not deterministic. A particularly good test case for reproducing this is: MACHINE=A bitbake core-image-minimal MACHINE=B bitbake core-image-minimal-initramfs and since the second machine can find the package but not the license manifest, a failure will result. Extending the DEPENDS is the easy way to fix the issues. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-25linux-yocto: split meta data from kernel repositoryBruce Ashfield
The linux-yocto tree has always been a combined set of kernel changes and configuration (meta) data carried in a single tree. While this format is effective at keeping kernel configuration and source modifications synchronized, it isn't always obvious to developers on how to manipulate the meta data versus the source. With this change, we remove the meta data processing from the kernel-yocto class and use the external meta-data repository that has always been used to seed the linux-yocto meta branch. After this change, linux-yocto can no longer process combined trees, and is simplified as a result. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-24image: Support for qcow2Christian Ziethén
Add support for qcow2 image format. Implemented in the same way as the previously existing vmdk and vdi solutions. Signed-off-by: Christian Ziethén <christian.ziethen@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-24boot-directdisk: Make kernel image inclusion conditional.Christian Ziethén
When building for qcow2 and a dummy kernel, avoid installing a non existing bzImage. Signed-off-by: Christian Ziethén <christian.ziethen@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-22bootimg: remove previous FATIMG before creating a new oneRicardo Neri
Since version 3.0.0 of dosfstools, mkdosfs opens the to-be-filesystem file with O_EXCL. Since the filesystem is also opened with O_CREAT, the -C option of mkdosfs can only succeed if FATIMG does not exists. Thus, delete any previous FATIMG file. The file can be safely deleted as we are inside build_fat_img because we want to create an new FATIMG. Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-22*image.bbclass: Consolidate ROOTFS_POSTPROCESS_COMMANDsGary Thomas
Move ROOTFS_POSTPROCESS_COMMANDs from core-image.bbclass to image.bbclass so that images built using just image.bbclass will benefit from them. Without this change, an image built using image.bbclass did not honor read-only-rootfs image feature. Signed-off-by: Gary Thomas <gary@mlbassoc.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21sanity.bbclass: Remove check if /tmp is writableMariano Lopez
The check would be managed using BB_DISKMON_DIRS so this removes the check from the sanity class. [YOCTO #8000] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21native: Move virtclass override to earlier so DEPENDS is handled correctlyRichard Purdie
Currently the virtclass override is added too late to be taken into account when DEPENDS and other variables are processed by the virtclass extension code. This sets the overrides in a more optimal place, meaning they are accounted for in variables like DEPENDS. Recipes in meta-oe like libwmf-native showed the issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-20package_ipk/deb: Drop version information from RPROVIDESRichard Purdie
In some scenarios rpm needs version information from RPROVIDES. We can add this to the metadata where needed however we need to stop it entering the ipk/deb packages. This data is not needed due to the way opkg/dpkg handle the data. This patch ensures that data isn't used. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-20debian: Add versions to RPROVIDESRichard Purdie
Recently, libspeexdsp-dev added RCONFLICTS = "speex-dev < 1.2rc2". where libspeexdsp is 1.2rc3. That all seems reasonable, except there is a problem. debian.bbclass renames speex-dev to libspeex-dev and adds a "Provides: speex-dev" which the packaging backends duly note. The trouble is rpm sees that as having no version at all. This means that "speex-dev < 1.2rc2" conflicts with "speex-dev" and the -dev package simply cannot be installed. We can't simply version all Provides for rpm since some dependencies clearly shouldn't be versioned (e.g. the locale ones). The solution that seems to work best is to add the versions in debian.bbclass. If the backend doesn't like these, the backend can then strip them off (separate patch does this). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-20extensible sdk: Error when trying to install as root.Randy Witt
Since the extensible sdk uses bitbake, which can't run as root, the sdk shouldn't be installed as root. Previously it would error out late into setup when bitbake errored saying not to run bitbake as root. Now the script errors with a message saying the extensible sdk can't be installed as root. [Yocto #7545] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16gtk-icon-utils: Rename, upgrade, add binaryJussi Kukkonen
* Rename from gtk-update-icon-cache to gtk-icon-utils to better reflect the content. Fix references in other recipes and classes * Upgrade to GTK+ 3.16.4 * Add gtk-encode-symbolic-svg binary: it is used by icon themes (e.g. Adwaita) to generate png versions of svg icons. * Depend on librsvg-native for gtk-encode-symbolic-svg * Add a patch that removes Gdk dependency from gtk-encode-symbolic-svg: this way the native build stays slim. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16sstate.bbclass: remove redundant cd and mkdir commandsAndre McCurdy
Update sstate_create_package and sstate_unpack_package to remove redundant initial mkdir and cd commands. The working directory is now setup correctly before the shell functions are called. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16classes/logging: allow shell message functions to work in devshellPaul Eggleton
Fix a regression caused by the shell message changes - if you run a shell task's runfile, the task isn't actually running in BitBake and thus the message FIFO won't exist - so we should just fall back to printing the message with echo as we did before so that the run files are still useful. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-07-16Use die() or bbfatal_log() where the log should definitely be printedPaul Eggleton
Change calls to bbfatal() to either die() or bbfatal_log() where we know we want the full log to be printed by the UI (calling bberror or bbfatal would otherwise suppress it since the change to connect these functions through to the UI.) bbfatal() is still fine to use where there is enough context information in the message such that the log isn't needed. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-07-16classes/base: fix die() to print the full logPaul Eggleton
The recent change to connect through the shell logging functions caused a regression - bb.error() and bb.fatal() cause a flag to be set internally such that BitBake's UI will not print the full task log on failure; unfortunately we have in a lot of places called die() or bbfatal() within shell functions with a very terse message as a means of exiting out, where we still want to see the full log (and we were previously). We do still want to have fatal errors with proper messages that don't result in the full log being printed, however we can't ignore the typical usage of die(). Having added a mechanism to BitBake to log an error and reset the flag, create a bbfatal_log() function that uses this and call it from die() to restore the previous behaviour. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-07-16classes/useradd: don't read bbnote/bbwarn/bbfatal valuesPaul Eggleton
Since these functions now log through BitBake's message logging system we must have standalone implementations here. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-07-16kernel: fix path assumptions in tasksRoss Burton
Several of the kernel class tasks were making assumptions about what directory they were executed in. Clarify the code by making paths absolute or passing -C to oe_runmake. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16libc-package: don't abuse B to change directoryRoss Burton
Currently if exec_func() isn't told what directories to create and change to, it uses B. This is not obvious and may be changed in the future. Instead, pass -C<dir> to oe_runmake. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16ptest: add dirs flag to ptest tasksRoss Burton
The ptest configure/compile/install tasks mirror the base configure/compile/install tasks, so add an explicit dirs flag to ensure they mkdir() and chdir() the right directory. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16kernel-yocto: fix machine_srcrev check in do_patchPetter Mabäcker
do_patch is currently doing checks with machine_srcrev without initiate it which leads to below (additional debug added): DEBUG: Executing shell function do_patch . . . + [ 0 -ne 0 ] + [ != AUTOINC ] + git rev-parse --verify ~0 fatal: Needed a single revision + git merge-base HEAD usage: git merge-base [-a|--all] <commit> <commit>... or: git merge-base [-a|--all] --octopus <commit>... or: git merge-base --independent <commit>... or: git merge-base --is-ancestor <commit> <commit> or: git merge-base --fork-point <ref> [<commit>] -a, --all output all common ancestors --octopus find ancestors for a single n-way merge --independent list revs not reachable from others --is-ancestor is the first one ancestor of the other? --fork-point find where <commit> forked from reflog of <ref> + [ = ] + set +x DEBUG: Shell function do_patch finished Only reason it works today is because 'rev-parse/merge-base' with empty machine_srcrev will result in "false positive". Solve this by adding a similar non-empty check and use SRCREV as fallback as in 'do_kernel_metadata' Signed-off-by: Petter Mabäcker <petter@technux.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16do_unpack: move qa check of unpack into insane.bbclassBian Naimeng
Some source archive are not standard format. For example, sometimes, we still need decompress file once again after base_do_unpack, in such case, the following warning will be caught. WARNING: xxx : the directory ${WORKDIR}/xxxx (xxxxxx) pointed to by the S variable doesn't exist \ - please set S within the recipe to point to where the source has been unpacked to So, we should do this QA check after all of unpack jobs been completed. Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16sanity.bbclass: Check if /tmp is writableMariano Lopez
Used mkstemp instead of raw open file call. Also added the exception message to the output of the sanity check. [YOCTO #7922] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16buildhistory.bbclass: Check output folder is present before creating ↵Leonardo Sandoval
files-in-$pkg.txt This is just a safe check to make sure the output folder is present, before creating the files-in-$pkg.txt file. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-12classes/sstate.bbclass: Improve checkstatus using connection cache.Aníbal Limón
Use FetcherConnectionCache to improve times when do checkstatus over sstate resources. [YOCTO #7796] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-12classes/logging: make shell message functions output to the consolePaul Eggleton
Use the FIFO that is now set up when executing tasks within BitBake to make bbdebug/bbnote/bbwarn/bbplain/bberror/bbfatal output to the console through BitBake's UI (as their python counterparts do) instead of only outputting to the task log. Note that this requires the corresponding change in BitBake that creates the FIFO; without it such messages will end up in a file where the FIFO should have been (but won't cause any other ill effects). Remainder of the fix for [YOCTO #5275]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12archiver.bbclass: add do_deploy_all_archivesPatrick Ohly
When working specifically on source archiving, it is useful to trigger that for all recipes required by something like an image recipe, without actually having to build that. "bitbake -c deploy_all_archives <target>" does that now. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12populate_sdk_base.bbclass: don't inherit toolchain-scripts.bbclassRobert Yang
Fixed when enable multilib: require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" $ bitbake core-image-minimal No lib32 package should be built since we don't build lib32-core-image-minimal, but a lot them are built: lib32-opkg-utils lib32-cryptodev-linux lib32-sqlite3 lib32-libtool-cross lib32-ncurses lib32-db lib32-diffutils lib32-zlib lib32-gcc-cross-i686 lib32-gcc-cross-initial-i686 lib32-flex lib32-libgcc-initial lib32-libffi lib32-linux-libc-headers lib32-expat lib32-openssl lib32-glibc lib32-binutils-cross-i686 lib32-gcc-runtime The are introduced by toolchain-scripts.bbclass' anonymous function (the MULTILIB_VARIANTS), but it doesn't need toolchain-scripts.bbclass, in fact, so remove it to fix the problem. [YOCTO #7961] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12oeqa/sstatetests: Add NATIVELSB sstate signature equivalence testRichard Purdie
The sstate checksums should be independent of whichever NATIVELSBSTRING is detected. Add an automated QA test which tests this using bitbake -S. To make this possible, we need to be able to override the value of NATIVELSBSTRING so make a small change to allow this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09testimage: Add support for test suites manifest fileszjh
Allow the list of TEST_SUITES to be read from a list of manifest files in the TEST_SUITES_MANIFEST variable. [YOCTO #7848] Signed-off-by: zjh <junhuix.zhang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09testimage: Support full TC path such oeqa.runtime.pnp.get_memory_size in ↵zjh
TEST_SUITES If a TC name start with "oeqa", it is thought as a full TC path. if not, follow original logic (assume under oeqa.runtime) For example: TEST_SUITES = "oeqa.runtime.pnp.get_memory_size oeqa.runtime.sanity.reboot" will run these two case when bitbake -c testimage [YOCTO #7834] Signed-off-by: zjh <junhuix.zhang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08report-error: expand all variablesRoss Burton
BUILDNAME is now composed from ${DATE} and ${TIME} so needs to be expanded to useful. Whilst fixing this some other variables were explicitly not expanded for no clear reason, so expand those too. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-07image_types.bbclass: add support for multiple ubi sizesPushpal Sidhu
Add new FSTYPE called 'multiubi'. This new type has the ability to create multple ubi's, something that's extremely useful on boards that can include varying flash sizes (e.g. 256MB vs 2GB). Because we don't want to reuse code, I extracted the mkfs and ubinize commands out to a new function that will handle the creation of both multiple ubi's, as well as the 'ubi' FSTYPE (so as not to break current boards). Due to the single processes nature of the OE when doing it's 'create_image', this new multiubi_mkfs function also creates it's own symlinks as well as cleans up it's own cfg file. Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07image_types_uboot: remove the middle fileYue Tao
The .gz, .bz2 or .lzma are middle files for making gz.u-boot, bz2.u-boot, or lzma.u-boot. It should be removed once the final image is generated. Otherwise, even RM_OLD_IMAGE = 1, it can't be removed, moreover more and more middle files are genrated via 'bitbake *-image' Signed-off-by: Yue Tao <Yue.Tao@windriver.com> Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07multilib_global: expand multilib pref values properlyChristopher Larson
This ensures that in cases where the preference value changes when the multilib override is applied, we correctly expand it in that context. For example, for `PREFERRED_PROVIDER_${TARGET_PREFIX}gcc = "gcc-external-cross-${TARGET_ARCH}"`, when it sets the prefixed version of this, we want TARGET_ARCH expanded with the multilib applied, otherwise the arch suffix will be incorrect for that context. We ran into this trying to use preferences in meta-sourcery along with multilibs. We worked around it there via PNBLACKLIST, but this fix should still go into the core. Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07grub-efi: Allow to use file name different from grub.cfg in GRUBCFGNicolas Guyomard
To generate a same image both in live image type and boot-directdisk image type and make boot-direct image boot directly on the rootfs partition without using an initramfs we need to have the ability to generate several grub.cfg files. Signed-off-by: Nicolas Guyomard <nicolas.guyomard@open.eurogiciel.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07report-error.bbclass: Added file syncronization.Mariano Lopez
errorreport_handler would fail if several errors are triggered at the same time because of two proccess writting to the same file. This patch add the required syncronization to handle concurrent process. [YP #7899] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07distrodata.bbclass: fix typo, Upsteam -> UpstreamAndre McCurdy
Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02cmake bbclass: fix support for native buildsKoen Kooi
For native builds of recipes (e.g. mariadb-native) cmake *must* look outside of its sysroot to find the compiler, so instruct it to do so. Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-02sanity.bbclass: Check if /tmp is writableMariano Lopez
If /tmp can't be written, bitbake gaves an unrelated error. This checks if /tmp can be written in every build. [YOCTO #7922] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-02bootimg bbclass: don't hardcode 'bzImage' nameKoen Kooi
In the EFI case there are 2 more architectures besides x86(_64) that may use this class: aarch32, which tends to use 'zImage' and aarch64, which uses 'Image'. Instead of hardcoding those values like the luvOS fork does, use the proper variable. Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-02cross.bbclass: delete package_qa taskRoss Burton
The package_qa task isn't required for cross builds, so delete it along with the other packaging tasks to match native.bbclass. [ YOCTO #7934 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-01bootimg.bbclass:hddimg: check the size of rootfs.img for hddimgRobert Yang
The hddimg uses FAT, so the single file size should be less than 4GB, otherwise errors, check that and error out. Another way might be use ext2/3/4 rather than FAT, but EFI only supports FAT, if we make EFI use FAT, and non-EFI use extX, that would the code very different, which seems not worth. [YOCTO #6449] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-01bootimg.bbclass:iso: use mkisofs -iso-level 3 for large isoRobert Yang
There will be problems when rootfs.img is larger than 4GB: mkisofs: Value too large for defined data type. File /path/to/iso/rootfs.img is too large for current mkisofs settings - ignoring And will get a wrong iso. Check the size of ${ISODIR}/rootfs.img, use mkisofs -iso-level 3 when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need leave a few space for other files. [YOCTO #6449] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>