summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* base.bbclass: define PACKAGECONFIG_CONFARGS before only sometimes appending ↵Martin Jansa2019-06-191-0/+2
| | | | | | | | | | | | | | | | | | | | | to it * just to make sure it's expaned by bitbake before it gets executed in shell * e.g. with cmake.bbclass and cmake recipe (any recipe without PACKAGECONFIG options have this issue) it looks like this: bitbake -e cmake | grep EXTRA_OECMAKE= EXTRA_OECMAKE=" -DCMAKE_DOC_DIR=share/doc/cmake-3.14 -DCMAKE_USE_SYSTEM_LIBRARIES=1 -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 -DKWSYS_CHAR_IS_SIGNED=1 -DBUILD_CursesDialog=0 -DKWSYS_LFS_WORKS=1 \${PACKAGECONFIG_CONFARGS}" (From OE-Core rev: 745b63f4e11a6536cabd97013973562631a0e080) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* binconfig: don't try to fix up .la filesRoss Burton2019-06-191-9/+0
| | | | | | | | | | If we're going to clean buildpaths from installed .la files then we should do it globally, not in a class that only six recipes in oe-core use. (From OE-Core rev: bd4e2cd3f70243f52215f8c92bcd7eb088a9b9f6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: remove empty test that does nothingRoss Burton2019-06-191-7/+0
| | | | | | | (From OE-Core rev: 5da7ad1a483d0840a9a2e3b95fa62a1901be73f2) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: improve buildpath warning messagesRoss Burton2019-06-191-1/+2
| | | | | | | | | | | | | | | | Instead of reporting large chunks of the work directory and not the package name: "File /work/corei7-64-poky-linux/libidn2/2.2.0-r0/packages-split/libidn2-dev/usr/lib/pkgconfig/libidn2.pc in package contained reference to tmpdir" We can clean up the paths and be more useful: "File /usr/lib/pkgconfig/libidn2.pc in package libidn2-dev contains reference to TMPDIR" (From OE-Core rev: 156329247b40e9ee97e6249468ac3b9af4dffb68) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: introduce FIT_HASH_ALGAyoub Zaki2019-06-191-5/+8
| | | | | | | | | | sanitize fitImage hash algorithm selection with FIT_HASH_ALG switch default hash algorithm from sha1 to sha256 (From OE-Core rev: 8c9d5d59cb1575fac17c461090937df4cbb3d3b5) Signed-off-by: Ayoub Zaki <ayoub.zaki@embexus.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: show time spent writting buildhistoryMartin Jansa2019-06-191-0/+4
| | | | | | | | | | | * especially when pushing longer history to slow remote git server or when it timeouts during the push, it's useful to see where the time was actually spent (From OE-Core rev: 96f1225d47985d94d9ed91eb5e7affdd70671c79) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uboot: compress arm64 kernelsBonnans, Laurent2019-06-181-2/+2
| | | | | | | | | | AArch64 images are not self-decompressing, thus usually much larger. Boot times can be reduced by compressing them in FIT and uImages. (From OE-Core rev: a725d188b5d6b5d3c5cf21cc2f3070a0fe711e18) Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devicetree.bbclass: Combine stderr into stdout to see actual dtc errorJaewon Lee2019-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the subprocess command to run dtc was not properly displaying the error on console. Combining stderr into stdout for the dtc subprocess so the actual error can be seen on console without having to open the do_compile log. For example, previously on a dtc error, just the following stack trace and dtc command was being shown on console: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:devicetree_do_compile(d) 0003: File: function: devicetree_do_compile 0127: if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)): 0128: continue # skip non-.dts files and non-overlay files 0129: except: 0130: continue # skip if can't determine if overlay *** 0131: devicetree_compile(dtspath, includes, d) ... Exception: subprocess.CalledProcessError: Command '['dtc', '-R', '8', '-b', '0', '-p', '0x1000', '-i', '${INCLUDES}, '-o', 'system-top.dtb', '-I', 'dts', '-O', 'dtb', 'system-top.dts.pp']' returned non-zero exit status 1 with this patch, the actual error from the dtc command will be appended like the following: Subprocess output: Error: Label or path not found FATAL ERROR: Syntax error parsing input tree (From OE-Core rev: 1da43a558ffd5040a1b5aaebfc1c5118f5e59c01) Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scons: inherit python3nativeAnuj Mittal2019-06-141-0/+5
| | | | | | | | | | | | | | | | | | | scons tries to get build time vars by loading sysconfigdata. Inherit python3native instead of using host python and unset _PYTHON_SYSCONFIGDATA_NAME to avoid the need to depend on target python3 for sysconfigdata when using scons to build. Avoids build errors on still supported CentOS 7: | DEBUG: Executing shell function do_compile | scons: *** SCons version 3.0.5 does not run under Python version 3.4.8. | Python 2.7 or >= 3.5 is required. (From OE-Core rev: 44f303ba9fb193a985e8e4b7c6962883ae3970d1) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: uboot-sign: Check UBOOT_DTB_BINARY before adding depsAlex Kiernan2019-06-122-2/+2
| | | | | | | | | | | | Since UBOOT_DTB_BINARY empty means we don't need to inject signatures into the U-Boot DTB, we can remove the dependencies between consumers of these two classes and resolve a circular dependency between u-boot and kernel. (From OE-Core rev: c6b49cb75285e71909d1f9e4bf636f186941b519) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib: add override for image recipeChangqing Li2019-06-121-0/+2
| | | | | | | | | | | | | MACHINE set to qemux86-64 for lib32-core-image-sato, during do_rootfs, it will run install_complementary, which will get localedir by d.getVar("libdir"), without override, libdir will still be lib64. add override to fix it. (From OE-Core rev: 8ed0cf040abbfb0999ac92b59ca9b7067d340202) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: Avoid passing empty prefix to os.path.relpathMike Crowe2019-06-121-7/+7
| | | | | | | | | | | | | | | | With meta-micro, ${prefix} is the empty string. This means that CMAKE_INSTALL_BINDIR:PATH and friends end up containing paths starting with many instances of "../", presumably due to os.path.relpath attempting to find its way to the current directory. Let's avoid this by ensuring that the root path always ends in a slash. If it already ends in a slash then adding another one shouldn't cause any problems. (From OE-Core rev: 67b19414c1c17f71f39c971b9f9fdd1f776516a1) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Make task clean depend on cleaning of make-mod-scriptsHaiqing Bai2019-06-111-0/+1
| | | | | | | | | | | | | | | | The package 'make-mod-scripts' creates files in 'kernel-build-artifacts/include/config' which are removed by 'cleanall/cleansstate' of 'virtual/kernel'. And this causes the below error while building out of tree kernel module: ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. Suggested-by: Jun Nie <jun.nie@linaro.org> (From OE-Core rev: f79c95f6a883e999e0c2ecfd60b6b696b7595497) Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: license: fix non-SPDX license being removed from INCOMPATIBLE_LICENSEQuentin Schulz2019-06-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A non-SPDX license (which is not an alias to an SPDX license) cannot currently be marked as incompatible in INCOMPATIBLE_LICENSE. In the current state, we take all INCOMPATIBLE_LICENSE and pass them through expand_wildcard_licenses which is only adding SPDX licenses that match the glob regexp of what is in INCOMPATIBLE_LICENSE (be it a direct match to an SPDX license or via an alias). This does not work well with custom licenses. E.g.: foo.bb: LICENSE = "FooLicense" conf/local.conf: INCOMPATIBLE_LICENSE = "FooLicense" `bitbake foo` Gives no warning, no error, builds and packages successfully, because INCOMPATIBLE_LICENSE is basically empty since FooLicense is neither in SPDXLICENSEMAP nor in SRC_DISTRIBUTE_LICENSES. Let's add the original licenses to the list returned by expand_wildcard_licenses to be able to handle the aforementioned case. INCOMPATIBLE_LICENSE = "FooLicense GPLv2 GPLv3+" used to "resolve" to "GPLv2 GPLv3". It now resolves to "FooLicense GPLv2 GPLv3 GPLv3+" which fixes the issue with custom licenses not being in SPDXLICENSEMAP or SRC_DISTRIBUTE_LICENSES and thus being left out of the blacklisted licenses. I needed to pass a list to expand_wildcard_licenses from the license_image class instead of the current output of map() because the operator [:] does not work on this kind of type, and list(map()) or anything that iterates over map() actually moves the iterator and breaks the forloop right after in expand_wildcard_licenses. (From OE-Core rev: 2d976587d703462db2b7b78661b05ac22fb93787) Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Add OE_EXTRA_IMPORTSChris Laplante2019-06-081-1/+3
| | | | | | | | | | | | OE_IMPORTS is not intended to be touched by users, but there are cases in which layers might want to make additional Python modules available to Python functions. For example, Python modules defined in the layer themselves (under meta-layer/lib). (From OE-Core rev: 00fa8391365863fa7805ad61b2d1a8425b9ea040) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: consider QB_DEFAULT_FSTYPEAdrian Freihofer2019-06-081-1/+5
| | | | | | | | | | | | testimage.bbclass starts qemu with the first image type found in the IMAGE_FSTYPES list. It's weird: this ['wic', 'tar'] works but this ['tar'. 'wic'] does not. If QB_DEFAULT_FSTYPE is defined, this fstype is booted. (From OE-Core rev: aedb6bf9b6ccf37f69372642bc4c5dbbca92d0d9) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scons.bbclass: use python3-sconsTim Orling2019-06-081-1/+1
| | | | | | | | | | | SCons has supported python3 since 3.0.0 release, use it. [YOCTO #13381] (From OE-Core rev: 2ce507d65cd2558edc9e7929aff7b80463c26998) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Clean up writing of runtime pkgdata filesPeter Kjellerstedt2019-06-071-38/+18
| | | | | | | | | | This introduces a variable, PKGDATA_VARS, that contains the names of the variables that are to be output in the runtime pkgdata files. (From OE-Core rev: 43e55bfa040425cf93d94ac626a31f6fd00a7a74) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package: Sort ELF file listJoshua Watt2019-06-041-0/+6
| | | | | | | | | | | Sorts the list of detected ELF files by path before processing. This ensures that when multiple files are hardlinked together the first one found is always the same. This is required to have reproducible builds. (From OE-Core rev: de86bfeda6e3845336a0b56c883b49219967128f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Ensure do_populate_sysroot has dependency on useradd variablesRichard Purdie2019-06-011-0/+1
| | | | | | | | | | | | | | | The do_populate_sysroot task doesn't rerun if you change any of the USERADD_PARAM or GROUPADD_PARAM variables, only do_package will. If another task depends on the recipe, this means it won't see any updated changes. This patch adds in the missing vardeps ensuring the code is deterministic. [YOCTO #13232] (From OE-Core rev: 37d0382a3c67f47f8cfdd977a041069bf912b8c3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Fix build architecture corruption of sstate artefactsRichard Purdie2019-05-312-3/+5
| | | | | | | | | | | | | | | | | | | | When mixing aarch64 and x86_64 host builds with common sstate, useradd failures were found. This was due to references to: /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/aarch64/pseudo-native/usr/bin/pseudo or /home/pokybuild/yocto-worker/qemuarm/build/build/tmp/sysroots-components/x86_64/pseudo-native/usr/bin/pseudo on the wrong architecture within the useradd postinst files. Instead of using COMPONENTS_DIR as the FIXME, use PSEUDO_SYSROOT which contains the arch component as well to avoid this. Add extra comments to cause the relavent sstate to be rebuilt. (From OE-Core rev: 0384622f72a6c0bd8225cf06f692340fdef67d4a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: package modules.builtin.modinfoBruce Ashfield2019-05-311-1/+1
| | | | | | | | | | | | | | As of commit 898490c010b [moduleparam: Save information about built-in modules in separate file] (kernels v5.2-rc1+), modules.builtin.modinfo is generated as part of the kernel build process. We package it along with the other module artifacts, so it can be used by scripts/other build steps. (From OE-Core rev: 112a4d3b2b4a829dd5657b6533b1c1bb589d6c8e) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "image_types: use pigz to create .gz files"Anuj Mittal2019-05-301-1/+1
| | | | | | | | | | | | This reverts commit a559ffab30b7b45849ace023808c1fb20811d43d. This is not needed now that pigz has been marked as a drop-in replacement. (From OE-Core rev: 3a73662ea72fbf0180d9a66032b6d92248ae4ddf) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: add named SRCREVs to the sstate hashMichael Ho2019-05-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several fetchers support named sources that require setting a SRCREV with the source name as a suffix. These named SRCREV variables are not captured in the sstate hash calculation because they're only referenced within the bitbake fetcher function. Several recipes avoid this bug by adding the different SRCREVs to their packaging versioning but this is not enforced so it is very trivial to trip this bug case. Add a snippet to the base.bbclass anonymous python to add all named SRCREV variables to the vardeps of do_fetch to capture them in the sstate hash calculation. Testing of the bug can be shown by running the following bitbake commands with this patch set not applied: bitbake vulkan-demos | tee sed -i 's/SRCREV_gli = ".*"/SRCREV_gli = "xxx"/' \ ../meta/recipes-graphics/vulkan/vulkan-demos_git.bb bitbake vulkan-demos | tee; The above results in no errors despite a broken SRCREV because the recipe is considered unchanged by the bitbake sstate hash. After applying this patch the above commands instead result in a fetcher error which is correct. (From OE-Core rev: fdc000b8ae1577f1b29efb2cc4927664ad41e21c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: Use compiler launcher variable when ccache is enabledPhilippe Normand2019-05-301-2/+9
| | | | | | | | | | | Setting the CMAKE_C{,XX}_COMPILER_LAUNCHER variables is the recomended way to deal with ccache in CMake. It allows build scripts to optionally opt-out of ccache, which is especially useful when the pre-processed GCC output is required. (From OE-Core rev: 0a36d1b342c0b4760bc75794c2e941a17012bc19) Signed-off-by: Philippe Normand <philn@igalia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Switch from bz2 to xzRichard Purdie2019-05-301-2/+2
| | | | | | | | (From OE-Core rev: 29fc9210b973be68de474e75068e4c72371afe5a) (From OE-Core rev: b6645596f2d2faf8f1fdfbedfe1edd004fbce6bc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: Use highest compression level for xzRichard Purdie2019-05-291-1/+1
| | | | | | | | | Whilst this may take longer to compress, it reduces network transfer and potentially extraction time so is worthwhile. (From OE-Core rev: 0a89d486cf596da791c27cff14ef3d6ca1cbb75a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* layer.conf: Whitelist lttng-tools->lttng-modules dependencyRichard Purdie2019-05-271-0/+3
| | | | | | | | | | | The API between lttng-tools and lttng-modules is safe, whitelist it as the dependency fixes tools failures. This needs a hack in the multilib class as right now there is no way to know if a given recipe is a kernel module or not. This needs to be revisited. (From OE-Core rev: 584e713bf7f6885a13c440cd45c0f469feb3a694) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson.bbclass: Make meson support aarch64_be.Lei Maohui2019-05-271-0/+2
| | | | | | | | | Added aarch64_be into cpu family. (From OE-Core rev: 40187613038aa9c1ca16eaa46d0669f69f80a398) Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: add sanity checks to SRC_URIRoss Burton2019-05-211-1/+12
| | | | | | | | | | | | The SRC_URI almost definitely shouldn't be using ${PN}, and GitHub */archive/* tarballs are dynamically generated so the checksums will change over time. Detect both of these, and emit a QA warning if found. (From OE-Core rev: 21f84fcdd659544437fe393285c407e1e9432043) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: remove some temporary build filesJean-Marie LEMETAYER2019-05-211-0/+1
| | | | | | | | | | | | | | | | | | Fixes [YOCTO #11028] When dealing with node modules which use "node-gyp" [1] to build native addons to node. Some temporary build files stay in the image: object files, static library files, dependency files, ... This commit does not keep only the required files, but remove the files which can leads to QA issues (staticdev with static library files). [1]: https://github.com/nodejs/node-gyp (From OE-Core rev: bac9075f51f6acba2fcfbe9f79f97f5171186d9c) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: fix node and npm default directory conflictJean-Marie LEMETAYER2019-05-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes [YOCTO #13349] When dealing with node modules which have declared "bin" files [1], npm will create a link in '/usr/bin' with a relative link to '../lib/node_modules/<module bin file>'. The commits e9270af4296ce2af292059617a717e42fc17425c and 2713d9bcc39c712ef34003ce8424416441be558e explicitely use '/usr/lib/node/' as install directory, but does not care about the "bin" symbolic linked files. In order to keep valid links, and to keep it as simple as possible, the path '/usr/lib/node_modules/' is used as install directory for npm. And a symbolic link is created to have a valid '/usr/lib/node/' path, needed for node. [1]: https://docs.npmjs.com/files/package.json#bin (From OE-Core rev: 2d72007deea7ed529f82b8a6e67e2715dd0a0dca) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: get npm package name from npm packJean-Marie LEMETAYER2019-05-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | Fixes [YOCTO #12534] When using npm packages with exotic names, like "JSONSelect" (with uppercase) or "@angular/cli" (with at sign and slash), there are three different names: - the recipe name ("jsonselect" or "angular-cli") - the npm module name ("JSONSelect" or "@angular/cli") - the npm pack name ("JSONSelect" or "angular-cli") The commit fa9c077068a2acea04389fa2b44eb2e93548fce2 allow to have different recipe name and npm module name by setting the NPMPN variable. This commit allows to have yet another npm pack name. The pack filename is now dynamically retrieved from the 'npm pack' command. (From OE-Core rev: b6ffa59d03fbf53d1681fce5f8c3c1f163cf9923) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* grub-efi-cfg, systemd-boot-cfg: use MACHINE_ARCHMartin Jansa2019-05-162-0/+6
| | | | | | | | | | | | | | | | | | | | | | * both use KERNEL_IMAGETYPE variable which is MACHINE specific * fixes: === Comparing signatures for task do_configure.sigdata between hammerhead and mako === ERROR: grub-bootconf different signature for task do_configure.sigdata between hammerhead and mako basehash changed from 710332f3ec15670302dd690708730c9e418d53790ce36d6a91b049ae4f7069b1 to c9a46e58b4634b5fd47d20683f8320e15f5c4cb7628e3a62ed97d8528d7aabd2 Variable KERNEL_IMAGETYPE value changed from 'zImage-dtb' to 'zImage' ERROR: systemd-bootconf different signature for task do_configure.sigdata between hammerhead and mako basehash changed from 2abbaf6d7760696fbf1ff5df5705239b475ccbf6f0c831fc4031984c0ce0e9f2 to 24f1e7886dee02b04bc180acc1c946ad82ce842655e5a5f4a8006f4a8490f985 Variable KERNEL_IMAGETYPE value changed from 'zImage-dtb' to 'zImage' detected with: openembedded-core/scripts/sstate-diff-machines.sh --targets=world --tmpdir=tmp-glibc/ --analyze --machines="hammerhead mako qemux86" (From OE-Core rev: 90a47da8c50da49ecaf0e2786dc4d9a78c61189e) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: adjust a condition checkingMing Liu2019-05-161-1/+2
| | | | | | | | | | | do_bundle_initramfs does not have to depend on ${INITRAMFS_IMAGE}:do_image_complete if INITRAMFS_IMAGE_BUNDLE is not set. (From OE-Core rev: 6676411fccff2d331878e4ca1f9411aafb056a80) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: Add RDEPENDS frpm PN-ptest to PN packageRichard Purdie2019-05-151-0/+1
| | | | | | | | | | | | | Many different ptests are breaking as they assume that ${PN}-ptest depends on ${PN}. It doesn't currently but should. If we fix this, many different ptests start passing when they previously failed. It does depend on fixing an issue in the dbus-test recipe which is done in the preceeding patch (mentioned in case this gets backported). (From OE-Core rev: b47194b57d94260b4e6438c5bf74914027f0b520) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils: Tidy and simplify for readabilityDouglas Royds2019-05-152-29/+19
| | | | | | | | | | | | | Line lengths, remove duplication, and use the PYTHON variable provided by pythonnative.bbclass. Coincidentally fixes a dormant defect in distutils3.bbclass in which we were sedding for STAGING_BINDIR_NATIVE/python-python3/python3. (From OE-Core rev: 7b8dd17c65e2d7d163f452833f21469918bf222e) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Fix u-boot-nodtb symlinksYing-Chun Liu (PaulLiu)2019-05-091-2/+2
| | | | | | | | | | When using u-boot-nodtb, the symlink didn't install correctly to the ${DEPLOYDIR}. This commit fixes this bug. (From OE-Core rev: c4eddb65e2ddb61bf519b768fab1e131fb0c297b) Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: Restore mask and preset targets, fix instance creationAlex Kiernan2019-05-091-9/+28
| | | | | | | | | | | | | | | Ensure that anyone who sets SYSTEMD_AUTO_ENABLE_${PN} = "mask" (or "preset") retains the previous behaviour. In addition fix "enable" so it can (again) create instance units out of templates. Remove over-zealous quoting of SYSTEMD_SERVICE_ESCAPED as it's already safely escaped (and can be multiple arguments). Reported-by: Paul Barker <paul@betafive.co.uk> (From OE-Core rev: e9444649f49431a8e203e6e2009a1de05e505007) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: Default to non-stateless imagesAlex Kiernan2019-05-091-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | When creating images, for anything other than the explicitly stateless case, touch /etc/machine-id so that the images can be booted without an initramfs and with `ro` set on the kernel command line, otherwise system refuses to start: [ 7.222134] systemd[1]: No hostname configured. [ 7.227266] systemd[1]: Set hostname to <localhost>. [ 7.232622] systemd[1]: System cannot boot: Missing /etc/machine-id and /etc is mounted read-only. [ 7.241750] systemd[1]: Booting up is supported only when: [ 7.247362] systemd[1]: 1) /etc/machine-id exists and is populated. [ 7.253752] systemd[1]: 2) /etc/machine-id exists and is empty. [ 7.259757] systemd[1]: 3) /etc/machine-id is missing and /etc is writable. If IMAGE_FEATURES includes `stateless-rootfs` then systemctl-native is not run on the image leaving the image for population at runtime by systemd. (From OE-Core rev: c5fb399f5894c16cf8eeadd507dc38c29b0fd657) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cml1.bbclass: fix undefined behaviorStefan Müller-Klieser2019-05-081-1/+1
| | | | | | | | | | | | | Whenever cml1 do_configure is used with a defconfig, oldconfig waits for input. This silently fails on recent kconfig projects with: "Error in reading or end of file." We cannot use a more up to date kconfig target such as olddefconfig, because busybox does not support it. (From OE-Core rev: 7ad50a8fc1448dd152eaba57aaeb63a8229fdb21) Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils: Run python from the PATH in the -native case as wellDouglas Royds2019-05-082-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The python distutils generate a python wrapper script for each package, containing shebang lines pointing to the python executable. In our case, this is a fully-qualified path to python-native in the recipe-sysroot-native. Ubuntu 18.04 restricts the useful length of the shebang line to 125 characters, and Ubuntu 16.04 restricts it to 77. In both cases, the staged python script fails to run due to the length of the path to the python-native executable. Replace the shebang line with nativepython or nativepython3 as appropriate. The nativepython symlink is installed by the python-native recipe: #!/usr/bin/env nativepython We were already doing this for on-target distutils components. This change applies the sed-line to -native distutils components as well. In this way, -native clients of these components can invoke the wrapper scripts directly, without themselves needing to inherit pythonnative. This works around a known setuptools issue: https://github.com/pypa/setuptools/issues/494 Even once this issue has been resolved upstream, we will still need to replace `python` with `nativepython` (From OE-Core rev: 0a5bd4f30182a3d55153e5ade76f1dfd5b52b482) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go: Exclude vcs files when installing depsAlex Kiernan2019-05-081-1/+1
| | | | | | | | | | | | | | | | Because our clones use the host git, on (say) Ubuntu 18.04, the local git directories acquire perl scripts such as fsmonitor-watchman.sample. During packaging, this leads to failures: ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: QA Issue: /usr/lib/go/pkg/dep/sources/https---github.com-nsf-termbox--go/.git/hooks/fsmonitor-watchman.sample contained in package go-hsperfdata-staticdev requires /usr/bin/perl, but no providers found in RDEPENDS_go-hsperfdata-staticdev? [file-rdeps] ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: QA run found fatal errors. Please consider fixing them. ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: ERROR: go-hsperfdata-1.0.3+gitAUTOINC+b58598ac84-r0 do_package_qa: Function failed: do_package_qa (From OE-Core rev: 2ee246524ab881d57d8aac204f671215a25a58d3) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cpio/tar/native.bbclass: move rmt to sbindir and add a prefix to avoid ↵Hongxu Jia2019-05-081-0/+1
| | | | | | | | | | | | | | | | | | native clashing The rmt in cpio-native and tar-native is clashing, since tar-native has set var-NATIVE_PACKAGE_PATH_SUFFIX, we move rmt to sbindir, and add suffix NATIVE_PACKAGE_PATH_SUFFIX to sbindir could avoid the clashing. And in Ubuntu, rmt is in sbindir $ which rmt /usr/sbin/rmt (From OE-Core rev: e9ac5ac2f4d135734f549d17cce3ebc52132b7d0) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-icon-cache: clean up DEPENDSRoss Burton2019-05-071-2/+2
| | | | | | | | | | Use gtk+3-native instead gtk-icon-utils-native as that recipe no longer exists and is provided by gtk+3-native for compatibility. (From OE-Core rev: 078950f6ff88d406894229337b2b367ba049ff44) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image: Use new oe.path.copyhardlink() helperPaul Barker2019-05-071-3/+3
| | | | | | | | | | | This change allows us to support the placement of WORKDIR and DEPLOY_DIR on different devices. (From OE-Core rev: f064a581ba31764839459bd667130bccbbedefab) Signed-off-by: Paul Barker <paul@betafive.co.uk> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids: print exception after parse_args() errorMax Kellermann2019-05-071-4/+4
| | | | | | | | | | Without this, the user has no idea what went wrong. (From OE-Core rev: c1d887d63f098a10c7d6286399801d89fd3ebdb0) Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Fix build when UBOOT_DTB_BINARY is emptyAlex Kiernan2019-05-031-7/+7
| | | | | | | | | | | | | | | | When UBOOT_DTB_BINARY is empty and because the code now changes directory into ${B}, the test for the existence becomes `[ -f ]` which succeeds and subsequently the install fails. Reorder the code so it's clear that UBOOT_DTB_BINARY empty is an expected configuration and then quote UBOOT_DTB_BINARY everywhere so no one trips over this again. Fixes: bacb59079eb6 ("uboot-sign: add support for different u-boot configurations") (From OE-Core rev: e79f0db0745625b35dd83483747e486d08eebfde) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: call systemctl preset-all for imagesAlex Kiernan2019-05-031-1/+8
| | | | | | | | | | | | | | | Rather than rely on systemd's default invocation of preset-all at runtime, we pre-populate the symlink tree as part of of the image. This is done late so any overrides of presets during rootfs construction should already have happened. Whilst we don't strictly need this for the read-write root case, it avoids boot time churn; for read-only root we have to do it here. (From OE-Core rev: a57678a076109c42fbdf7531e90ff4491b387d53) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: create preset files instead of installing in imageJonas Bonn2019-05-031-22/+19
| | | | | | | | | | | | | | | | | | | At first boot, systemd will create the /etc/systemd/system directory from service preset files. As such, for a normal, writable /etc (writable rootfs), there is no need to set up this directory at image creation time. This patch changes the systemd machinery to create preset files and to rely on systemd to do the service enablement. This breaks the read-only-rootfs case; there's a fix for this in a follow-up patch. (From OE-Core rev: 154abbc3296eded11d2bbe3e102470b6986d42cd) Signed-off-by: Jonas Bonn <jonas@norrbonn.se> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>