aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2017-12-21image_types.bbclass: use stat to get sparse file's sizerbt/2fixesRobert Yang
The "ls -s sparse_file"'s result is 0, use stat to replace of it. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-12-18image.bbclass: Add additional bb.debug to help track 12304Saul Wold
We actually caught the ext4 size issue in the wild with the debug output in the oe_mkext234fs() code, but it did not help. What that showed was that the get_rootfs_size was returning a default size of 8192, where as the actual rootfs was more like 10572, thus too large to fit in the created sparse file. This additional temporary debug code should help us determine where the failure might be. More debug for [YOCTO #12304] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-18image_types: btrfs use sparse file creationSaul Wold
This will speed up file creation and still allow the btrfs tools to create a full btrfs image. This is similar to what we do for ext234 FS types. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-18targetcontrol.py: use oe.types.boolean for QEMU_USE_KVMRobert Yang
So that both QEMU_USE_KVM = "True" and "1" will work. [YOCTO #12343] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-13pypi.bbclass: bring in from meta-pythonTim Orling
The pypi.bbclass has usefullness in many meta layers, not just meta-python. Add it to oe-core for the benefit of everyone. Documentation strings for PYPI_PACKAGE, PYPI_PACKAGE_EXT and PYPI_SRC_URI added to meta/conf/documentation.conf Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-11populate_sdk_ext: Use prebuilt uninative tarballRichard Purdie
For uninative to work, it relies on it being updated to new versions as newer glibcs are built. This means the uninative generated by the current build may not be as recent as the uninative that is being downloaded by uninative.bbclass. If this occurs, we can get symbol mismatch errors. Ultimately, the sstate and the uninative versions need to match so we should use the same tarball as uninative.bbclass is using, not the one we built. [YOCTO #12405] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10multilib_global: Handle PREFERRED_RPROVIDERRichard Purdie
Running: $ oe-selftest -r sstatetests.SStateTests.test_sstate_sametune_samesigs after commit cdcebd81c872cb7386c658998e27cf24e1d0447c results in: NOTE: Resolving any missing task queue dependencies NOTE: Multiple providers are available for runtime lib32-initd-functions (lib32-initscripts, lib32-lsbinitscripts) Consider defining a PREFERRED_RPROVIDER entry to match lib32-initd-functions and will occasionally pick a different value on the second stamps run causing a test failure. Update the multilib code to handle PREFERRED_RPROVIDER too. There is a bigger worry here which is why the builds aren't deterministic. This is caused by a bug in bitbake's providers.py and a separate fix will be sent for that which would cause this test to always pass or always fail. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10kernel-yocto: ensure that only a single defconfig is processedBruce Ashfield
As a follow up to the changes to ensure that KBUILD_DEFCONFIG will always get its defconfig into the processing, we also should ensure that we don't get both a KBUILD_DEFCONFIG and a SRC_URI defconfig in the configuration queue. If both are in the configuration queue, we end up with competing values and a potentially long running check of 5000+ options x 2 against the final .config. By removing the defconfig found from the SRC_URI when one is found via KBUILD_DEFCONFIG, we ensure that only one will be processed. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10kernel-yocto: Stop the build if defconfig is missingSaul Wold
The bberror does not stop the build correctly, this should be a bbfatal_log to ensure the failure correctly stops the build and logs the failure. Part of [YOCTO #12162] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10kernel-yocto: ensure sccs variable is set when using KBUILD_DEFCONFIGSaul Wold
When using KBUILD_DEFCONFIG, $sccs should be set to the $WORKDIR/defconfig regardless if it compares or is copied. Otherwise $sccs is not set and the defconfig is not found correctly. Part of [YOCTO #12162] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10sstate.bbclass: Add progress bars when removing from the sysrootsPeter Kjellerstedt
If there are many recipes that should be cleaned out from the sysroots, it can actually take some time. This adds a progress bar to give a visual clue that the clean up is actually progressing. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10uninative.bbclass: Fix broken symlink issueMark Hatle
If two builds are sharing the same DL_DIR, and the uninative file is local to a layer. When the first build gets to uninative it creates the link local to itself, and subsequent users can use the same link. However if that first build then is deleted from the disk, the symlink is no longer valid (broken). We need to update the system to detect this case, and use the model implemented by the bitbke fetch2 code. Look for a broken link, remove it, then try to create the link and ignore an exception if it already exists (since we just unlinked any bad one). Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10classes/sanity: check we don't have an ancient GNU patchRoss Burton
We depend on the host GNU patch, but patch < 2.7 can't handle git-style patches. This results in patches that fail to apply, or worse apply incorrectly. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-10sanity: getstatusoutput returns an int, not a stringRoss Burton
This code is an error path so nobody noticed that oe.utils.getstatusoutput() is just a wrapper around subprocess.getstatusoutput() which returns an (int, string) pair not (string, string). Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-10classes/patch: when PATCHTOOL = "git" double-check the repositoryPaul Eggleton
If a bug is present or the user has set PATCHTOOL = "git" on a source tree that isn't git, if we try to perform git operations (such as committing or changing branches) when extracting source, then we might in fact be running those operations on the metadata repository if the build directory is underneath, say, poky or OE-Core, and that could make a mess. Check if the source tree is a git repository and refuse to continue if it isn't. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-10classes/patch: remove unused variablePaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-09kernel.bbclass: Add cleandirs for do_shared_workdirSaul Wold
We add the kernel-build-artifacts to the cleandirs list to ensure that there are no remaining artificats in the kernel-build-artifacts directory which is STAGING_KERNEL_BUILDDIR. Without this change multiple System.map files are visiable in the STAGING_KERNEL_BUILDDIR, which could cause problems for some tools. [YOCTO #11880] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-09rootfs-postcommands.bbclass: ensure that rootfs gets mounted roPatrick Ohly
When read-only-rootfs is active, we need to ensure that the rootfs does not get mounted read/write by the kernel or initramfs. Adding "ro" to the boot parameters achieves that. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-09systemd: allow dots in arguments to template unitsMartin Hundebøll
When installing systemd template units with an argument, the current code removes characters between the '@' and the '.' from service names in SYSTEMD_SERVICE_${PN}, e.g.: getty@tty1.service -> getty@.service This fails for services with dots in the argument (which is perfectly legal in systemd), since the code searches only until the first dot. E.g.: vlan@eth0.1.service -> vlan@1.service This is obviously wrong, and fails in systemd_populate_packages(), where it fails to find the unit file. Fix this by reworking the removal of the argument part of the service name, so that parts before '@' and after teh last '.' are used as base name. Signed-off-by: Martin Hundebøll <mnhu@prevas.dk> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-02update-alternatives.bbclass: refuse to manage SysV init scriptsMarkus Lehtonen
Sanity check for future packages. [YOCTO #10944] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2017-12-02Revert "classes: Fix alternatives and rc.d ordering"Markus Lehtonen
This kludge is not needed anymore, now that syslog packages (or any other package) don't use update-alternatives for managing SysV init scripts. This reverts commit fc89a3f739ff25306ea91d9bdb424fc8389bdf72. [YOCTO #10944]
2017-12-02initscripts: don't use update-alternativesMarkus Lehtonen
Stop using update-alternatives for managing /etc/init.d/functions. Also, make the initscripts-functions subpackage to (runtime) conflict with lsbinitscripts. [YOCTO #10944] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2017-12-02bin_package: fail if ${S} doesn't actually contain anythingRoss Burton
If the user is trying to use bin_package but the SRC_URI hasn't extracted anything into ${S}, which is easily done when writing a recipe by hand, instead of silently shippping an empty package abort the build. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-29distrodata.bbclass: make upstream version check more useful for git upstreamsAlexander Kanavin
Specifically: 1) remove +git${SRCPV} stuff from comparison and output; it's just unnecessary clutter; 2) write the commit id of the latest version tag into the output; this saves quite a bit of trouble of manually checking what that commit id is when doing version updates; 3) when UPSTREAM_CHECK_COMMITS is set, ignore the tags altogether; instead check if the latest commit is different to the one we use, and if so, report that the recipe can be updated to said commit (which is also written into the output, as in 2). Multiple recipes are failing the upstream check because they never issue tags, now we can fix them. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-21image_types: Add debugging code to ext4 fs creationSaul Wold
We have seen a small number of issues with ROOTFS_SIZE not getting computed correctly, resulting in a failure in the mke2fs processing and populating the resulting new filesystem. This information should help us to reproduce [YOCTO #12304] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-21qemuboot: Improve relative path handlingRichard Purdie
qemuconf files are currently written relative to TOPDIR. What makes more sense is to write paths relative to the location of the file. This makes moving them around and decoding the end paths in runqemu much easier. The effect of this should allow less use of bitbake to determine variables and allow us to simplify runqemu. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-21classes/cross: Add addto_recipe_sysroot task to cross recipesRichard Purdie
This is particularly useful if you want to use gdb-cross as there is no other good way to access it now with RSS. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-21base: add automatic dependency on xz-native for .txz SRC_URIAndré Draszik
.txz is .tar.xz, so add it, as this can actually be found in the wild. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-21siteinfo.bbclass: Add microblaze(eb/el) linux site info targetsNathan Rossi
Add mappings for the microblaze(eb/el) linux and linux-musl variants to use architecture common linux site data. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-21insane.bbclass: add microblaze-*-elf to machine dictionaryNathan Rossi
Add the definitions for microblaze-*-elf targets to the machine dictionary. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-10package_ipk.bbclass: handle only whitespace in PACKAGE_EXCLUDEAndre McCurdy
If PACKAGE_EXCLUDE is constructed using _append then it's possible that the final value will contain only a space. Currently that results in build failures due to an invalid opkg command line. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-10base.bbclass: increase indent in get_layers_branch_rev() and buildcfg_vars()Andre McCurdy
Although it may not appeal so much to users to prefer 80x24 consoles, the general trend is for screens to get bigger and the current output has started to look a little cramped on a modern HD display. Increasing from 17 to 20 is obviously arbitrary, but does give enough space to cleanly display layers such as "meta-nodejs-contrib" and "meta-virtualization" while still keeping the output fairly compact. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-10devtool: implement conditional patch handlingPaul Eggleton
If you have a recipe that uses overrides to conditionally extend SRC_URI to add additional patches, then you will often need to update those patches if you're making other changes to the source tree (for example if you're upgrading the underlying source). Make this possible with devtool by creating devtool-override-* branches for each override that conditionally appends/prepends SRC_URI, and have devtool update-recipe / finish check each branch out in turn and update the corresponding patches. A current example of a recipe that does this is the quota recipe - it applies an additional patch if musl is the selected C library (i.e. libc-musl is in OVERRIDES). Note that use of this functionality does require some care - in particular, updates to patches that appear on the main branch (named "devtool" by default) should be made there and not only on one of the specific devtool-override-* branches that are created for each override. The recommended procedure is to make the changes you want to make to the main branch first, then check out and rebase each devtool-override-* branch, testing each one by activating the corresponding configuration, and then finally run devtool finish. Fixes [YOCTO #11516]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-10testimage: Ensure full logs are shown for failuresRichard Purdie
Currently, the fact an error message is shown means the rest of the task logs are suppressed. In this case we don't want that as it hides the real errors and useful information. Therefore override this behaviour. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-09gtk-doc.bbclass: correctly make the list of directories with shared librariesAlexander Kanavin
Previously it was working only if only one shared library was found, and broke when there were several. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-11-09testimage: Pass the logger into OERuntimeTestContextExecutor.getTarget()Richard Purdie
I have no idea why we didn't do this but it means the code has nowhere to log to unless we do this. This means we can then use the logger to log data to the task logs. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-08image.bbclass: let do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDSMing Liu
The licenses of EXTRA_IMAGEDEPENDS recipes are being referenced in image postcommand write_deploy_manifest, but a dependency is missing between do_image and do_populate_lic of EXTRA_IMAGEDEPENDS recipes, this leads some license files not present when write_deploy_manifest runs, hence will cause build errors. Fixed by letting do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDS recipes. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08externalsrc: fix ExpansionError if the source dir does not exist yetLuca Ceresoli
The externalsrc class code assumes that the source directory (EXTERNALSRC) exists before bitbake is called. Otherwise do_configure will fail obviously since externalsrc does not fetch anything. Commit 3ca6085729d9 ("externalsrc: Handle .git not being a directory") changed this behaviour. Now on a missing EXTERNALSRC directory we get a bb.data_smart.ExpansionError during _parsing_, way before do_configure can be run. This new behaviour creates two problems: * First, there error message is very cryptic (and it's hard to provide a better message since no task is ever run): ERROR: ExpansionError during parsing /<...>/<...>.bb Traceback (most recent call last): bb.data_smart.ExpansionError: Failure expanding variable do_compile[file-checksums], expression was ${@srctree_hash_files(d)} which triggered exception FileNotFoundError: [Errno 2] No such file or directory: '<...>' * Second, this prevents creating a class based on externalsrc that automatically fetches the code in EXTERNALSRC before do_compile runs. Fix both problems by simply calling git with '-C ${EXTERNALSRC}' instead of calling git inside the non-existing directory. This changes from a bb.data_smart.ExpansionError to a subprocess.CalledProcessError, which is in line with what's actually going on: git is telling us it can't find the git dir. Also remove a comment that does not apply anymore. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Joshua Watt <jpewhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08image.bbclass: Fix 'vardepsexclude' mechanism for image_cmd_${FSTYPE}Igor Romanov
Current mechanism doesn't allow to use any non-determenistic variable, except 'DATE' and 'DATETIME', inside IMAGE_CMD_${FSTYPE} prototype. Passing 'vardepsexclude' values from IMAGE_CMD_${FSTYPE}, so users will be able to avoid taskhash mismatch problems. Signed-off-by: Igor Romanov <i.romanov@inango-systems.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08base.bbclass: use d instead on e.dataLeonardo Sandoval
According to the bitbake documentation, the "d" global datastore should be used instead of "e.data" because the latter is deprecated. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08useradd-staticids: explain how to fix the the problemPatrick Ohly
When a distro uses useradd-staticids.bbclass and some developer unfamiliar with the static ID mechanism tries to add a recipe which needs new IDs, the resulting error or warning is typically not something that the developer will understand. Even experienced developers do not get enough information. They first must find out whether the missing ID is for a system user or group, then locate the file(s) in which the ID could be added. Both of this is now part of the message: ERROR: .../meta/recipes-extended/cronie/cronie_1.5.1.bb: cronie - cronie: system groupname crontab does not have a static ID defined. Add crontab to one of these files: /.../conf/distro/include/my-distro-group The case that no file was found is also handled: ERROR: .../meta/recipes-extended/cronie/cronie_1.5.1.bb: cronie - cronie: system groupname crontab does not have a static ID defined. USERADD_GID_TABLES file(s) not found in BBPATH: files/group It would be nice if the error message could also list the range in which a new ID needs to be allocated, but /etc/login.defs isn't available at the time of creating the message, so that part is still something that a developer needs to know. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08useradd-staticids: skip recipes without static IDsPatrick Ohly
When enabling useradd-staticids.bbclass, one has to define static IDs for all recipes in a world build, otherwise those without static IDs generate parse errors or warnings, depending on USERADD_ERROR_DYNAMIC. Defining unused IDs is a lot of work and clutters the passwd/group file of a distro. Distros which want to avoid this can now set USERADD_ERROR_DYNAMIC = "skip" and recipes which would have triggered a message then silently get disabled. Only trying to build them shows the error message: $ bitbake apt ... ERROR: Nothing PROVIDES 'apt' ERROR: apt was skipped: apt - apt: username _apt does not have a static ID defined. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-07useradd.bbclass: print a warn when useradd not foundRobert Yang
Exit quietly makes it very hard for debugging when user is not added as expected, print a warning helps a lot. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05buildhistory: enable committing history by defaultPaul Eggleton
The most common usage for buildhistory is with commits enabled so that you actually collect history, rather than just keeping a snapshot of the most recent build state, therefore default BUILDHISTORY_COMMIT to "1". This really ought to have been the default in the beginning, I can't really explain why it wasn't. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05goarch: There is no GOARCH defined for mips64-n32Joe Slater
Defeat building for mipsarchn32 because there is no corresponding GOARCH. Neither "mips" nor "mips64" allows go-runtime to compile. Existing mips32 code assumes the o32 ABI. Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05kernel-arch.bbclass: Add riscv to kernel arch mapKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05siteinfo: Define data for riscv32 and riscv64Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05insane: Add entries for riscv 32bit/64bitKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-10-16goarch.bbclass: Define HOST_GO386 and TARGET_GO386Paul Barker
These variables are used to control the floating-point instructions emitted by the go compiler for x86 architectures. The default is '387' which disables the use of sse/sse2 instructions and is safe to use on all x86 processors from the i486 onwards. If TUNE_FEATURES contains a feature set which is known to support sse/sse2 instructions then they are set to 'sse2' to enable the use of these instructions. This is suitable for most processors from Pentium 4 onwards. Only the 'core2' and 'corei7' TUNE_FEATURES are defined in the oe-core layer and are known to support ss2 instructions. Other layers may introduce additional tunings which support sse2 instructions and for these layers, TARGET_GO386 or go_map_386 should be overridden as needed. Signed-off-by: Paul Barker <pbarker@toganlabs.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-10-16own-mirrors.bbclass: allow other settings of PREMIRRORS have effectChen Qi
If we inherit own-mirrors.bbclass, other settings of PREMIRRORS in our project would have no effect. This patch modifies the setting in own-mirrors.bbclass to allow other settings of PREMIRRORS to still have effect. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>