summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* oeqa: make it work for multiple usersRobert Yang2019-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | | There are failures when multiple users run oe-selftest on the same host: PermissionError: [Errno 13] Permission denied: '/tmp/oe-saved- tests/201812250324_qemu' This is because /tmp/oe-saved-tests was created by user A, while user B tries to write data in it, then the error will happen. This patch can fix the problem. Move the dumped data to ${LOG_DIR}/runtime-hostdump/ rather than /tmp/oe-saved-tests/ to fix the problem. (From OE-Core rev: e219fe5329599cd6c3682f521eaee3852a2c8980) 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>
* classes/icecc: Remove trailing whitespaceJoshua Watt2019-01-111-1/+1
| | | | | | | | (From OE-Core rev: d065c592977ad742515121e07ed3b7698db55f25) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/icecc: Check blacklist for BPNJoshua Watt2019-01-111-2/+9
| | | | | | | | | | | | | | If a given PN is listed in the icecream blacklist, there is a very good chance that the native, nativesdk, and multilib variants should also be skipped. Check the blacklist entries against BPN to cover them. [YOCTO #13128] (From OE-Core rev: 1863f695a1411e95e7e547a3eb3e7ef6604a93bf) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: simplify buildhistory_list_files()Jacob Kroon2019-01-111-4/+6
| | | | | | | | | | Avoid duplicating shell code for the two cases, fakeroot/non-fakeroot. (From OE-Core rev: c4a931df28f45f95f19a13062b8dc38db60da342) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Do not hide cpio's errorRobert Yang2019-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | | We use subprocess.check_output() to run the command, which means that we need care about the error, so the 2>/dev/null should not be used, otherwise it is hard to debug when the error happens. I guess it was copied from previous lines, but that command's error can be ignored (excpet: pass): try: subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) except subprocess.CalledProcessError: # Can "fail" if internal headers/transient sources are attempted pass But we don't do this in the current location, so remove "2>/dev/null" (From OE-Core rev: 017a53d2743be2b5d4965a39b4e126fb74f700ad) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign.bbclass: silence warnings when UBOOT_DTB_BINARY is emptyAlex Kiernan2019-01-111-2/+2
| | | | | | | | | | | | When UBOOT_DTB_BINARY is set to "", the keys for signed booting are expected to be already present in U-Boot's DTB, so don't issue warnings for this. (From OE-Core rev: 04656f5df326a72747fc5878ce201b636a2a419c) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distro_features_check.bbclass: show all error info at one timeKai Kang2019-01-111-17/+12
| | | | | | | | | | | | | In distro_features_check.bbclass it checks whether items in REQUIRED_DISTRO_FEATURES and CONFLICT_DISTRO_FEATURES exist in DISTRO_FEATURES. But it only shows one required or conflict distro feature when error occurs. Update to show them all at one time. (From OE-Core rev: d0441c40afdba119a65189d6a5aca5c533f68279) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Sort FILES_INFO by keyJacob Kroon2019-01-111-1/+1
| | | | | | | | | | | | Observing depsig.do_package for a package inbetween rebuilds indicated that FILES_INFO was changing content order randomly. Force it to be deterministic by sorting with respect to the keys when serializing. Suggested-by: Joshua Watt <jpewhacker@gmail.com> (From OE-Core rev: b0364be65bf0b3dee44f81379f4062e9f707c128) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes: adjust perl-related classes to the new recipesAlexander Kanavin2019-01-114-13/+57
| | | | | | | | | | | | This mostly means tweaking the paths to match upstream defaults. get_perl_arch() functions are taken from the patch by Jens Rehsack: http://lists.openembedded.org/pipermail/openembedded-core/2018-November/276546.html (From OE-Core rev: d6b36b1babb4d3e8d41278111e71c71fde9af39e) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch: reproducibility: Fix host umask leakageDouglas Royds2019-01-111-0/+1
| | | | | | | | | | | | | | | | | Some patch files create entirely new files, so their permissions are subject to the host umask. If such a file is later installed into a package with no change in permissions, it breaks the reproducibility of the package. This was observed on libpam, for instance: The patch file pam-security-abstract-securetty-handling.patch creates a new file (tty_secure.c). This file is later copied into the -dbg package with no change in permissions. (From OE-Core rev: 2a2bbd755b330cd63f7f6e2f2b374a3ae065b37a) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: run post-relocate scripts for every environmentRoss Burton2019-01-081-23/+23
| | | | | | | | | | | SDKs for multilib configurations have multiple environment scripts, so re-arrange the post-relocate hook invocation so that it runs the post-relocate hooks after sourcing each environment script. (From OE-Core rev: c4897001cb3eeda1f4f11197b28c09c950bdcf02) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Fix for QEMU_USE_KVMRobert Yang2019-01-081-7/+1
| | | | | | | | | | | | | | | | | | | | | | Fixed: MACHINE = "qemux86" QEMU_USE_KVM = "qemux86" IMAGE_CLASSES += "testimage" $ oe-selftest -r runqemu.RunqemuTests.test_boot_rootfs [snip] File "/buildarea1/lyang1/poky/meta/lib/oe/types.py", line 122, in boolean raise ValueError("Invalid boolean value '%s'" % value) ValueError: Invalid boolean value 'qemux86' Now QEMU_USE_KVM can only be boolean, can not contain MACHINE any more, kvm will be enabled if target_arch == build_arch or both of them are x86 archs. (From OE-Core rev: 7c1a8a624cad8d967635c6cb5f99cf655bde3d44) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Implement hash equivalence sstateJoshua Watt2019-01-081-8/+97
| | | | | | | | | | | | | | | | | | | | | Converts sstate so that it can use a hash equivalence server to determine if a task really needs to be rebuilt, or if it can be restored from a different (equivalent) sstate object. The unique hashes are cached persistently using persist_data. This has a number of advantages: 1) Unique hashes can be cached between invocations of bitbake to prevent needing to contact the server every time (which is slow) 2) The value of each tasks unique hash can easily be synchronized between different threads, which will be useful if bitbake is updated to do on the fly task re-hashing. [YOCTO #13030] (From OE-Core rev: d889acb4f8f06f09cece80fa12661725e6e5f037) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sstate: Handle unihash in hash checkJoshua Watt2019-01-081-1/+1
| | | | | | | | | | | | Handles the argument that passes task unique hash in the hash check function, as it is now required by bitbake [YOCTO #13030] (From OE-Core rev: 1c14b6969e58b51a325c1c1acf9c96e55675035c) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Fix incorrect deploying of fitimage.initramfsManjukumar Matha2019-01-071-0/+3
| | | | | | | | | | | | | | | | | When kernel-fitimage and initramfs is enabled using INITRAMFS_IMAGE_BUNDLE = "1", kernel do_deploy tries to deploy fitImage.initramfs with following error | install: cannot stat 'arch/arm64/boot/fitImage.initramfs': No such file or directory Skip deploying fitimage.initramfs, since fitimage does not create fitimage.initramfs (From OE-Core rev: 0f87f8522a2c1b5a7042738887952b98060fbd9d) Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-alternatives.bbclass: Stabilize iteration orderClemens Lang2019-01-071-7/+6
| | | | | | | | | | | | | | | The use of a dictionary for link_rename causes problems for higher-order alternatives, i.e. when an alternative link points to another alternative link, since these links must be processed in the order in which they were originally added for symlink correction to work. Switch from a dict to a list of tuples to ensure processing happens in the original order. (From OE-Core rev: 326220267ffc43ec1f507ad0cc47ac59caafd5b7) Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: avoid git diff churn by sorting more dictionariesJacob Kroon2019-01-071-2/+2
| | | | | | | | | | Sort 'srcrevs' and 'tag_srcrevs' before iterating over them in order to avoid unnecessary changes in the build history. (From OE-Core rev: 031d708aedda11d65ba9746af4f01b91264a1f86) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: fix python unclosed file ResourceWarningChen Qi2019-01-031-1/+2
| | | | | | | | | | | | Fix the following warning. ResourceWarning: unclosed file <_io.TextIOWrapper name='/.../systemd/1_239-r0/debugsources.list' mode='a' encoding='UTF-8'> (From OE-Core rev: 91810a57f0edd8b37c5f3f989a5aca69d9a40b37) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: add support for caching shared workdir tasksMichael Ho2019-01-031-0/+6
| | | | | | | | | | | | | | | | | The sstate bbclass uses workdir as a hardcoded string in path manipulations. This means that the sstate caching mechanism does not work for the work-shared directory which the kernel uses to share its build configuration and source files for out of tree kernel modules. This commit modifies the path manipulation mechanism to use the work-shared directory if detected in the paths when handling the sstate cache packages. (From OE-Core rev: 27642449f95e38598f9c83948ce109c5891e5877) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMUAníbal Limón2019-01-031-6/+7
| | | | | | | | | | | | | When use simpleremote target the flash/boot process is executed manually, the IMAGE_FSTYPES validation is only needed when execute testimage against qemu. The supported_fstypes comes from oeqa.core.target.qemu module. (From OE-Core rev: e7dc5963adbacc091fe8943119262166977623ad) Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Added armeb into meson.bbclass.Lei Maohui2019-01-031-0/+2
| | | | | | | (From OE-Core rev: b0021e3d33ba0fb60a340d4553267b18d296b2be) Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: catch ValueError from incorrectly written sstate manifestsMartin Jansa2019-01-031-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * in some rare cases the file format might be broken, e.g. when you run out of disk space while writing to it (hint: make sure to use BB_DISKMON_DIRS on _all_ the builds, to make sure that they can stop gracefully before this happens). * will show error like this: ERROR: Invalid line '/OE/build/luneos-thud/webos-ports' in sstate manifest '/OE/build/luneos-thud/webos-ports/tmp-glibc/sstate-control/index-allarch' when the file isn't complete, like in my case: $ tail -n 2 /OE/build/luneos-thud/webos-ports/tmp-glibc/sstate-control/index-allarch /OE/build/luneos-thud/webos-ports/tmp-glibc/stamps/all-webos-linux/org.webosports.app.calculator/0.1.1+gitrAUTOINC+9e9eb67c28-r0 /OE/build/luneos-thud/webos-ports/tmp-glibc/sstate-control/manifest-allarch-org.webosports.app.calculator /OE/build/luneos-thud/webos-ports/tmp-glibc/work/all-webos-linux/org.webosports.app.calculator/0.1.1+gitrAUTOINC+9e9eb67c28-r0 /OE/build/luneos-thud/webos-ports * instead of much longer exception which doesn't really show what's wrong to selectively fix that (other than removing while TMPDIR): ERROR: Command execution failed: Traceback (most recent call last): File "/OE/build/luneos-thud/webos-ports/bitbake/lib/bb/command.py", line 113, in runAsyncCommand self.cooker.updateCache() File "/OE/build/luneos-thud/webos-ports/bitbake/lib/bb/cooker.py", line 1562, in updateCache bb.event.fire(event, self.databuilder.mcdata[mc]) File "/OE/build/luneos-thud/webos-ports/bitbake/lib/bb/event.py", line 225, in fire fire_class_handlers(event, d) File "/OE/build/luneos-thud/webos-ports/bitbake/lib/bb/event.py", line 134, in fire_class_handlers execute_handler(name, handler, event, d) File "/OE/build/luneos-thud/webos-ports/bitbake/lib/bb/event.py", line 106, in execute_handler ret = handler(event) File "/OE/build/luneos-thud/webos-ports/openembedded-core/meta/classes/sstate.bbclass", line 1083, in sstate_eventhandler2 (stamp, manifest, workdir) = l.split() ValueError: not enough values to unpack (expected 3, got 1) (From OE-Core rev: 870ba5d80e76e0f989971532fc2adc0ebe811ab6) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-module-split.bbclass: Fix modinfo decoding in old kernelsPau Espin Pedrol2019-01-031-1/+2
| | | | | | | | | | | | | Before linux commit d36b691077dc59c74efec0d54ed21b86f7a2a21a, some strings contained invalid utf-8 character which made split_kernel_module_packages unhappy when parsing ums-isd200.ko: Exception: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 21: invalid start byte (From OE-Core rev: 503b977acf6984120818cbc5cfd35ff2cffb39cd) Signed-off-by: Pau Espin Pedrol <pespin@sysmocom.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: remove boot parameter systemd.log_targetKai Kang2018-12-271-7/+1
| | | | | | | | | | | | | | | | | | | Boot parameter systemd.log_target=console affects command journalctl's output and causes oe selftest case test_systemd_boot_time fail to pass. | Error at obtaining the boot time from journalctl | RESULTS: | RESULTS - systemd.SystemdJournalTests.test_systemd_boot_time - Testcase -1: SKIPPED (0.74s) systemd.log_target=console was introduced by oe-core commit a0bb649 and work with parameter systemd.log_level to enable systemd debug. systemd.log_level has been removed already, so remove systemd.log_target too to make case test_systemd_boot_time pass. (From OE-Core rev: caa776bdcf8ea34c857f45970370bf771075f4bc) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ip.bbclass: add xz threadingAlejandro del Castillo2018-12-271-1/+1
| | | | | | | | | | Before, threading was enabled via a patch to opkg-build. Now that opkg-build provides a hook for extra arguments, use that. (From OE-Core rev: b288f4e825a036b9cc15b27301d264fe695dba65) Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass, classextend.py: Drop catering to gcc-initialKhem Raj2018-12-261-1/+0
| | | | | | | (From OE-Core rev: 5d0307fbefbc8e6667edfa93d527166059a30100) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* crosssdk/cross-canadian: Set LIBCOVERRIDE correctlyRichard Purdie2018-12-262-0/+4
| | | | | | (From OE-Core rev: 94bece16c23c9ec8850fd497aea37e6a265da30a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext.bbclass: Include site.conf in parsing for contents for ↵Khem Raj2018-12-201-0/+5
| | | | | | | | | | | | | local.conf Some distros use site.conf to emit certain variables which are important for eSDK e.g. DISTRO with out which eSDK will not be able to ger right metadata when it tries to build (From OE-Core rev: 95659bed3f6f3216b346f70cfc9ffae9788c0fc1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc: patchelf is needed by icecc-create-envDouglas Royds2018-12-201-1/+5
| | | | | | | | | | | Although we could potentially build patchelf and all its dependencies, they would all have to be blacklisted to avoid trying to build them with icecc. We use the host patchelf instead. (From OE-Core rev: 0860216a81092fba084d29696db6d0c65a226c85) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc: Don't generate recipe-sysroot symlinks at recipe-parsing timeDouglas Royds2018-12-201-37/+25
| | | | | | | | | | | | | | | | | | | | | | | | | The python function icecc_path() was being invoked inline by set_icecc_env(), meaning that it was being invoked at recipe-parsing time. As a side-effect, icecc_path() was creating the recipe-sysroot directory and symlinking icecc into it. Because this was done at parsing time (rather than configure time), we were generating otherwise-empty WORKDIRs for *all* parsed recipes, and for all virtual classes (-native, -nativesdk). In my build, this generated more than 800 of these otherwise-empty WORKDIRs. I have simplified icecc_path() to return only the intended path to the icecc symlinks in the recipe-sysroot, with no side-effect. We then create the directory and the icecc symlinks at configure time. Because get_cross_kernel_cc() is still invoked at parse-time, it needs a guard-clause for the non-kernel case. We are now finding the host icecc at do_configure time, so icecc needs to be in the HOSTTOOLS. I have made this non-fatal, so that we can still inherit icecc without icecc installed. (From OE-Core rev: d2fcaeb153fdc3f8d7143ea823139f1537055ff1) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc: Syntax error meant that we weren't waiting for tarball generationDouglas Royds2018-12-201-1/+1
| | | | | | | | | | | | If two bitbake processes try to generate the ICECC_VERSION tarball at the same time, the thread that fails to get the lock will wait 30 sec for the first to finish. A syntax error meant that this was not happening, and in particular, if tarball generation failed (eg. for lack of patchelf), it did so silently. (From OE-Core rev: 4455c46bf7f49c2b44f250aa89b63b342368e2e3) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc: Trivial simplificationDouglas Royds2018-12-201-1/+1
| | | | | | | (From OE-Core rev: fa6bae80bc3392bf99ce53bbe19a0e05dbd0c4ee) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc: readlink -f on the recipe-sysroot gcc/g++Douglas Royds2018-12-201-1/+1
| | | | | | | | | We were accidentally doing a readlink -f on simply 'gcc', for instance (From OE-Core rev: 6d6788a3ea45d9693743d9b3319fb0368a4d5d33) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distrodata: RemoveRichard Purdie2018-12-181-425/+0
| | | | | | | | | | | | | | The code in the tasks within this class are old and there are much better ways to do these things now such as through tinfoil rather than writing csv files incrementally with start/stop events and lock files. Existing users of the code (mainly the do_checkpkg task) have been ported over to tinfoil. Drop the class, any other users should also make use of the tinfoil functionality. (From OE-Core rev: 6e2a488f01e5e8bc6f06b6fac1d336bf5372a82b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* upstream-tracking.inc: Remove the long deprecated fileRichard Purdie2018-12-181-1/+0
| | | | | | (From OE-Core rev: 22447eba250656489a6ed636fe58cb304d74e975) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* defaultsetup: Include maintainers.inc by defaultRichard Purdie2018-12-181-1/+0
| | | | | | | | | There is little harm in including this file rather than having a rather obscure and soon to be obsolete bbclass adding this information. (From OE-Core rev: 98536be8d1a5dcf620ee6d07135f23126a09d98f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Add comments for gcc links to ccacheRobert Yang2018-12-151-0/+4
| | | | | | | (From OE-Core rev: ce6bf125aba7344d56368885605949e373b06393) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Add possibility to pass parmeters to qemuErik Botö2018-12-151-1/+4
| | | | | | | | | | | Add a variable called TEST_QEMUPARAMS in testimage.bbclass to make it possible to pass parameters to qemu. This can be useful for e.g. increasing the amount of RAM available during testimage runs. (From OE-Core rev: 1a9163f5779d233c884c8fd50e0812eabab4fdf3) Signed-off-by: Erik Botö <erik.boto@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: add package specific skips to sstate hashMichael Ho2018-12-141-0/+7
| | | | | | | | | | | | | | | | | The bbclass currently adds INSANE_SKIP to the sstate hash dependencies however the package specific skips such as INSANE_SKIP_${PN} are not added automatically because of how the class references them. This causes the problem that modifying INSANE_SKIP_${PN} does not invalidate the sstate cache and can mask build breaking warnings. Add an anonymous python snippet to explicitly include these additional relevant skips to the sstate hash. Singed-off-by: Michael Ho <Michael.Ho@bmw.de> (From OE-Core rev: 8690332183f10a5e5689da7ec030567dfd1ac091) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: append includedir to implicit include dirsMichael Ho2018-12-141-0/+4
| | | | | | | | | | | | | This resolves issues with paths being marked as system includes that differ from /usr/include but are considered implicit by the toolchain. This enables developers to add directories to system includes to supress compiler compiler warnings from them. (From OE-Core rev: 9c2227d5d960f93e00791157354f0c920fbecf39) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Cc: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: BPF objects may mismatch in endianness and bitness tooKhem Raj2018-12-131-2/+2
| | | | | | | | | | | | | This ensures that bitness and endianness is ignored for BPF objects Fixes QA issues like Bit size did not match (32 to 64) kernel-selftest on /work/qemumips-yoe-linux/kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/bpf/test_btf_nokv.o (From OE-Core rev: 26722e59ca5df14bd90fc09306d97ff0fd078f32) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: map mips64el TARGET_ARCH to mips64 for the cross fileAndrea Adami2018-12-081-0/+2
| | | | | | | | | | Meson uses 'mips64' for both big- and little-endian MIPS64 machines, so map mips64el to mips64. (From OE-Core rev: 8d1023f222f32ef64d37c3cb15b7dcf9c3e5990d) Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign.bbclass: fix signature and deploymentRobert Yang2018-12-082-44/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: MACHINE = "beaglebone-yocto" KERNEL_CLASSES += "kernel-fitimage" KERNEL_IMAGETYPE_beaglebone-yocto = "fitImage" UBOOT_MACHINE_beaglebone-yocto = "am335x_boneblack_vboot_config" UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000" UBOOT_SIGN_KEYDIR = "${TOPDIR}/conf" UBOOT_SIGN_KEYNAME = "dev" UBOOT_SIGN_ENABLE = "1" IMAGE_INSTALL_remove = "kernel-image-zimage" $ cd conf $ openssl genrsa -F4 -out dev.key 2048 $ openssl req -batch -new -x509 -key dev.key -out dev.crt $ cd ../ $ bitbake u-boot linux-yocto $ grep signature tmp/deploy/images/beaglebone-yocto/*.dtb Binary file tmp/deploy/images/beaglebone-yocto/u-boot-beaglebone-yocto-2018.07-r0.dtb matches Binary file tmp/deploy/images/beaglebone-yocto/u-boot-beaglebone-yocto.dtb matches Binary file tmp/deploy/images/beaglebone-yocto/u-boot.dtb matches And there would be no signature info when rebuild from sstate: $ bitbake u-boot linux-yocto -cclean $ bitbake u-boot linux-yocto $ grep signature tmp/deploy/images/beaglebone-yocto/*.dtb No result This s because kernel directly edit ${DEPLOY_DIR_IMAGE}/u-boot.dtb, (Note, it is global ${DEPLOY_DIR_IMAGE}, not recipe's DEPLOYDIR), so that the modified info is not in sstate, and would be lost when rebuild from sstate. There are other problems in previouse code: - The u-boot.dtb is provided by u-boot, but edited by kernel during signing, so it should be deployed by kernel rather than u-boot. - The u-boot.do_concat_dtb directly install files to global ${DEPLOY_DIR_IMAGE}, this is incorrect, the ${DEPLOY_DIR_IMAGE} should be installed by do_deploy. - It seems that it assumes do_deploy depends on do_install according the comments, but they have no relationships: # do_concat_dtb is scheduled _before_ do_install as it overwrite the # u-boot.bin in both DEPLOYDIR and DEPLOY_IMAGE_DIR. - The do_concat_dtb should be run after do_compile, but it doesn't have this dependency. Make u-boot install u-boot.dtb to ${datadir}, kernel copies u-boot.dtb from ${STAGING_DATADIR} to ${B} and deploy it can fix the problem. [YOCTO #12112] Reported-by: Christian Andersen <c.andersen@kostal.com> (From OE-Core rev: 493f70cfb177f1d452a13329647a38642bf2b161) 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>
* kernel: don't assign the build user/hostFederico Sauter2018-12-081-2/+2
| | | | | | | | | | | | | | The KBUILD_BUILD_USER and KBUILD_BUILD_HOST variables were assigned at the kernel class level, which made it impossible to override them in the local configuration. By setting only the default values of those variables in the kernel class, it is now possible to override them as expected. (From OE-Core rev: a3e8cdf9c3ba966fa4b5a21235540eb0b00fb487) Signed-off-by: Federico Sauter <federico.sauter@ableton.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo: Remove unused function argumentJoshua Watt2018-12-081-4/+2
| | | | | | | | | | Removes the listvars argument to image_buildinfo_outputvars(). It doesn't appear that this argument ever did anything. (From OE-Core rev: 66ff9408291f3df98e8a6cb3e6e348d7ec8f401d) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: Replace tabs with spaces in pythonAlex Kiernan2018-12-081-3/+3
| | | | | | | | | | | Fix: WARNING: python should use 4 spaces indentation, but found tabs in kernel-fitimage.bbclass, line 24 (From OE-Core rev: 4ec42465e9df8cef20a97be11243726aa7dfb8c1) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Correctly markup regex stringsRichard Purdie2018-12-085-19/+19
| | | | | | | | | There are various escape characters in these stings which python warns about so use the correct regex markup for them. (From OE-Core rev: 252b69c9f2abe3258366c540f56b156ed63e5437) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: respect PACKAGE_NO_GCONVKai Kang2018-12-051-0/+5
| | | | | | | | | | | | | | | It installs locale-base-* packages according to var IMAGE_LINGUAS. Packages locale-base-* are split in libc-package.bbclass if variable PACKAGE_NO_GCONV is not set. When none of ditro features libc-charsets libc-locales and libc-locale-code is set, PACKAGE_NO_GCONV is set. Then no locale-base-* is created and fails to create image. Clear IMAGE_LINGUAS in such situation. (From OE-Core rev: 85240094175a8ea726bfba19c00d4556a62862fc) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glibc-locale: fix installed-vs-shipped qa issueKai Kang2018-12-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variable PACKAGE_NO_GCONV is set in libc-package.bbclass when none of libc-charsets, libc-locales and libc-locale-code set in DISTRO_FEATURES. Then it causes installed-vs-shipped qa issue of glibc-locale: | ERROR: glibc-locale-2.28-r0 do_package: QA Issue: glibc-locale: | Files/directories were installed but not shipped in any package: | /usr/share/i18n | /usr/share/i18n/charmaps | /usr/share/i18n/locales | /usr/share/i18n/charmaps/CP737.gz | ... | /usr/share/i18n/locales/ru_RU | ... | /usr/lib64/gconv/gconv-modules | Please set FILES such that these items are packaged. Alternatively if they | are unneeded, avoid installing them or delete them within do_install. | glibc-locale: 843 installed and not shipped files. [installed-vs-shipped] So check PACKAGE_NO_GCONV during do_install and not copy those files if PACKAGE_NO_GCONV has been set. Simplify call of bb.utils.contains() in libc-package.bbclass as well. (From OE-Core rev: 39840ed10af559bbcc306b378baa4723921668f5) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/waf: Fix builds when B != SJoshua Watt2018-12-051-3/+5
| | | | | | | | | | | | | | | Waf requires that the current working directory be ${S} (the location of the wscript) when building. Most of the time, this was true only because B defaults to S. However, anything that changed that behavior (notably, using externalsrc) would break the recipe. Remedy this by explicitly changing cwd to ${S} when running waf commands. As a happy side effect, B can be set up for "out of tree" builds to keep the source directory clean. (From OE-Core rev: 62dffb71ce22222c635bd90eaa47dd01f70f9c0f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>