summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* license_image: Fix raceRichard Purdie2018-07-252-53/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code pokes into do_deploy manifests from do_image_complete when the do_image_complete task may or may not depend upon the do_deploy tasks in question. Often it gets lucky, sometimes it results in build failures. To fix this, split the functionality to its own task which can have the correct task dependencies. This means the data in BB_TASKDEPDATA is definitive, the other code can be dropped, as can the IMAGE_EXTRATYPES do_populate_lic dependencies from image.bbclass. This fixes bugs which show up as: NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Started ERROR: core-image-minimal-1.0-r0 do_image_complete: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:write_deploy_manifest(d) 0003: File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 33, function: write_deploy_manifest 0029: 'w+').write(output) 0030:} 0031: 0032:python write_deploy_manifest() { *** 0033: license_deployed_manifest(d) 0034:} 0035: 0036:python license_create_manifest() { 0037: import oe.packagedata File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 191, function: license_deployed_manifest 0187: # It is necessary to mark this will be used for image manifest 0188: man_dic[dep]["IMAGE_MANIFEST"] = True 0189: man_dic[dep]["PN"] = dep 0190: man_dic[dep]["FILES"] = \ *** 0191: " ".join(get_deployed_files(dep_dic[dep])) 0192: with open(os.path.join(lic_dir, dep, "recipeinfo"), "r") as f: 0193: for line in f.readlines(): 0194: key,val = line.split(": ", 1) 0195: man_dic[dep][key] = val[:-1] File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 289, function: get_deployed_files 0285: """ 0286: 0287: dep_files = [] 0288: excluded_files = [] *** 0289: with open(man_file, "r") as manifest: 0290: all_files = manifest.read() 0291: for f in all_files.splitlines(): 0292: if ((not (os.path.islink(f) or os.path.isdir(f))) and 0293: not os.path.basename(f) in excluded_files): Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/sstate-control/manifest-qemux86_64-linux-yocto.deploy' ERROR: core-image-minimal-1.0-r0 do_image_complete: Function failed: write_deploy_manifest ERROR: Logfile of failure stored in: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_complete.50537 NOTE: recipe core-image-minimal-1.0-r0: task do_image_complete: Failed ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/recipes-core/images/core-image-minimal.bb:do_image_complete) failed with exit code '1' NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Succeeded (From OE-Core rev: b54cdaea7844ee3bf0c39eb97cc7c4c17ed5818c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license: Split image license functions to a separate classRichard Purdie2018-07-252-283/+285
| | | | | | | | | | | This means the image code is only included in image recipes through the IMAGE_CLASSES variable. This sets things up to allow us to fix image deploy dependency problems. (From OE-Core rev: fd44b8b4b2484f2d35c7a0e749e7dc316d601989) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Use subprocess to be consistent with the rest of the classRichard Purdie2018-07-251-4/+4
| | | | | | | | | Using 'sub' in one function just confuses things, standardise and fix formatting of the parameters too. (From OE-Core rev: a740c638148ed7236c49eed55ae9a15b94e55b9f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "relocate_sdk.py: remove hardcoded SDK path"Richard Purdie2018-07-251-0/+5
| | | | | | | | | | | | | This reverts commit 6671a4d980c8bef8f402780a308f6c43a25044aa. This breaks uninative tarball since the call of relocate_sdk.py from uninative.bbclass wasn't updated to account for this change. It isn't clear what value that code could pass in and this isn't simple to fix so revert until a better fix can be found that doesn't break uninative. (From OE-Core rev: b247392b4ced57cfe694656032f6a6723740a9e8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package/package_manager: multiprocess_exec -> multiprocess_launchRichard Purdie2018-07-241-2/+2
| | | | | | | | | | | | After this replacement, the parent exception handling works so we don't need subprocess wrapping with bb.error in the underlying functions. The underlying contexts also have better module handling so the imports can be cleaned up. (From OE-Core rev: aa8260adf53139d776a2affe6118d28b295c1fab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Clean up getstatusoutput usageRichard Purdie2018-07-241-13/+11
| | | | | | | | | | | | | | | | Replace usage of oe.utils.getstatusoutput() with direct subprocess calls. The call is just a wraper to the subprocess call of the same name and requires the caller to handle exceptions themselves. We usually do this badly, failing to show the output or the command or the return code. Its much safer to rely on a call like subprocess.check_output() instead. This also makes it easier to spot and remove cases where shell=True isn't needed in a later cleanup. (From OE-Core rev: 9f058857fb692f1251deb43bcaa7ed0120140093) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate/bitbake.conf: Use pigz if availableRichard Purdie2018-07-241-2/+9
| | | | | | | | | | | | | | Currently the compression of sstate objects is single threaded. In the case of ltp, this takes around 33s. If we add pigz into the list of non-fatal HOSTTOOLS and then use if it available when building the sstate object, this time drops to around 6s. Since pigz is now widely available this is an optimisation we should utilise. (From OE-Core rev: 2de56aa0792ec93445130d801936a8ea643fad27) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Call file to determine elf status in parallelRichard Purdie2018-07-242-37/+52
| | | | | | | | | | This allows the calls to is_elf (which calls file) to happen in parallel allowing a speedup of do_package and do_populate_sysroot for native recipes. (From OE-Core rev: bbe0d3e26484f3f347262d40a8a9d415ce21fb43) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Refactor to remove isElf/is_elf function duplicationRichard Purdie2018-07-241-36/+4
| | | | | | | | | | | There are probably further cleanups needed here but this at least removes the major code duplication between these two similar funcitons, keeping the kernel module ".ko" extension check for efficiency to avoid opening and reading file contents in the general case. (From OE-Core rev: 7ad0c0d6ab12bebeac097fc0f5210c876dcfe9be) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Allow parallel processing of shlib analysisRichard Purdie2018-07-241-17/+30
| | | | | | | | | | | This function is a bit more invasive to add parallelism to but allows the shlibs analysis to happen in multiple threads. In order to return values correctly/safely the data types needed tweaking to avoid lists and use immutable objects. (From OE-Core rev: b5788fb1f795f2f35d1788d8311e12984ffb2122) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Allow parallel processing of debug splittingRichard Purdie2018-07-241-11/+13
| | | | | | | | | | Adjust the code so that the splitting of debug symbols from files happens in parallel. To to this we need to move some path handling code into the main function and pass more parameters in. (From OE-Core rev: 9f0c2ed5d44a16e8268ac521236c4752f930f26a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Don't use subshell to execute fileRichard Purdie2018-07-241-6/+2
| | | | | | | | | We don't need any functionality from the shell here, its just extra fork overhead. Therefore remove it and use subprocess directly. (From OE-Core rev: bcc03ea19e103f6aa93bada2f49fcc5cc7bc0790) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Drop subshell usage for dwarfsrcfile generation.Richard Purdie2018-07-241-2/+10
| | | | | | | | | | | | The command for running dwarfsrcfiles is simple and does not need a subshell for each execution. By expanding out this function to use check_output() from subprocess and a list of arguments, the shell overhead can be dropped. For recipes with lots of files this gives a significant saving. (From OE-Core rev: 6334129dfbe266602fab70ce445641053a05be6c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk|deb: Use oe.utils.multiprocess_launchRichard Purdie2018-07-242-100/+2
| | | | | | | | | | | | | | | The current code had broken exception handling due to the use of a "traceback" variable as well as an import. Use the new library code for this instead which reduces code duplication and has fixed/improved exception handling. The chdir code can be dropped since any directory changes are in other processes now so there is no need for it here and the code no longer changes directory. (From OE-Core rev: bcd47389f4b1fc69d2bb4da01933bfa1fdcae092) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Rework PACKAGELOCK based upon sstate for do_packagedataRichard Purdie2018-07-241-14/+9
| | | | | | | | | | | | | | | | | | I think this lock dates from before we had sstate for do_packagedata. Since WORKDIR is recipe specific and we write into WORKDIR, we no longer need any write locks in the do_packagedata code itself, its handled by the sstate task lock for the final copy in at the end. The final write lock can be simply removed. The only time we need read locking is when actually reading data from the shared directory. We can therefore reduce the window the lock is held significantly as well, hence improving the speed of packagedata tasks running in parallel. (From OE-Core rev: f7106cdf2190d9ec59132a1cb2bb431d653cd9c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* relocate_sdk.py: remove hardcoded SDK pathRuslan Bilovol2018-07-241-5/+0
| | | | | | | | | | | | | | | | This patch removes hardcodes added to relocate_sdk.py during SDK build, making it flexible and reusable. Now default SDK path is passed to the script as parameter rather then harcoded inside it. This allows to reuse this script for multiple relocations, and adds possibility to relocate SDK multiple times (From OE-Core rev: 6671a4d980c8bef8f402780a308f6c43a25044aa) Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: exclude packages as shlib providersOleksii Konoplitskyi2018-07-241-2/+14
| | | | | | | | | | | | | | | | | | | | | Some packages containing shared libraries might be registered as shlib providers when they shouldn't (for example, the lib is for their private use and must not generate any dependency). EXCLUDE_FROM_SHLIBS is targeted at that, but it could be set for entire recipe only. This patch allows to set list of packages that are not candidates for shlib providers. Variable EXCLUDE_PACKAGES_FROM_SHLIBS is used, e.g.: EXCLUDE_PACKAGES_FROM_SHLIBS = "glibc-ptest glibc-mtest" Cc: Andrii Bordunov <aborduno@cisco.com> (From OE-Core rev: 43be374a6deceeaf105794f034957c65bb6bec72) Signed-off-by: Oleksii Konoplitskyi <okonopli@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Enforce ARM ISA just for arm arches <= armv5Khem Raj2018-07-181-1/+5
| | | | | | | | | | armv7+ used thumb2 ISA and it compiles fine with thumb2 issues are only when using thumb1 ISA (From OE-Core rev: c0ef8a91f671f30acd92e2734144f7ddf1acda53) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx.bbclass: Encode strings before passing to hashlibOlof Johansson2018-07-181-1/+1
| | | | | | | | | | | In python3, passing a unicode object to hashlib will result in an exception that encourages you to encode it first. (From OE-Core rev: b06a44f1081ea422a365e80bc79b2aeb2783d23f) Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx.bbclass: Make use of bb.utils' sha1_file()Olof Johansson2018-07-181-7/+2
| | | | | | | | | | | The same functionality already exists within bitbake, so avoid duplicating. (From OE-Core rev: 978f5a8f16bf5942aad73d761df2a00aeb36339d) Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx.bbclass: Fix undefined variable errorOlof Johansson2018-07-181-1/+2
| | | | | | | | | | | The path variable is used in an error message a few lines later, but was never defined. (From OE-Core rev: 863ff90b788f66241860e27e1fd3a791b00984cc) Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* spdx.bbclass: Replace deprecated string.replace with str.replaceOlof Johansson2018-07-181-1/+1
| | | | | | | | | | | The string.replace function is removed in python3. Instead, the str method "replace" should be used instead. (From OE-Core rev: 8538aabf62d866f36764b4b136ee8575308df690) Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: optimise buildpath searchRoss Burton2018-07-181-2/+2
| | | | | | | | | | | Instead of decoding every file we open as UTF-8 (with many errors as machine code isn't UTF-8), convert the build path to the UTF-8 byte representation and search for that instead. (From OE-Core rev: ffb52d383bfe413cf31fef13663fe9937a146c76) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: properly process escaped chars from pkgdataPaul Eggleton2018-07-181-1/+1
| | | | | | | | | | | | | | | | | | All values written out to pkgdata are escaped (see write_if_exists() in package.bbclass). In practice there tend not to be characters that need escaping except in the scriptlets (pkg_preinst, pkg_postinst, pkg_prerm and pkg_postrm) where currently we still see the escape codes in the corresponding files within buildhistory (e.g. \n and \t) and thus also in the output of buildhistory-diff, hindering proper diffing of changes. To fix this, when we read values from pkgdata and write them out to buildhistory, we need to interpret the escape codes by doing the exact reverse of what we do in package.bbclass. (From OE-Core rev: c258379181a438cb01728d223b3d05e0ab205941) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: handle packaged files with names containing spacesPaul Eggleton2018-07-181-1/+2
| | | | | | | | | | | | | | | | | The FILELIST field of the package info file in the buildhistory repository is a space-separated list of all of the files in the package. If a name of a file packaged by a recipe contains a space character then of course the result was that we didn't handle its name properly. To fix that, use quotes around any filename containing spaces and at the other end use these quotes to extract the proper entries. Fixes [YOCTO #12742]. (From OE-Core rev: 801b705957dc683030d11393f43407d0b3506b6a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: Use default value assignment for SDK_TITLE/SDKEXTPATHRichard Purdie2018-07-181-2/+2
| | | | | | | | | This allows the user mode flexibility about centrally overriding these rather than needing to do it on a per recipe basis. (From OE-Core rev: b0fb5bbd5f62857c32b2e071bcac841f856b1f1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk: Enable multiprocess executionRichard Purdie2018-07-181-1/+6
| | | | | | | | | This uses the new concurrenttest code to enable parallel test execution if specified. (From OE-Core rev: 07d19fb3adab7a8d83ba83d9a16395f70d7b7a47) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/threaded: Remove in favour of using concurrenttestsRichard Purdie2018-07-181-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | We have several options for parallel processing in oeqa, parallel execution of modules, threading and mulitple processes for the runners. After much experimentation is appears the most scalable and least invasive approach is multiple processes using concurrenttestsuite from testtools. This means we can drop the current threading code which is only used by the sdk test execution. oeqa/decorator/depends: Remove threading code Revert "oeqa/sdk: Enable usage of OEQA thread mode" This reverts commit adc434c0636b7dea2ef70c8d2c8e61cdb5c703b1. Revert "oeqa/core/tests: Add tests of OEQA Threaded mode" This reverts commit a4eef558c9933eb32413b61ff80a11b999951b40. Revert "oeqa/core/decorator/oetimeout: Add support for OEQA threaded mode" This reverts commit d3d4ba902dee8b19fa1054330cffdf73f9b81fe7. (From OE-Core rev: a98ab5e560e73b6988512fbae5cefe9e42ceed53) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-live: fix check for rootfs size with hddimg imagesAnuj Mittal2018-07-151-5/+5
| | | | | | | | | | | | | | | | | | | | | Currently we check if the rootfs.img size is greater than 4 GB and use mcopy to copy it over to a hddimg, a FAT32 volume. This results in problems when IMAGE_ROOTFS_SIZE is set to be exact 4 GB (4294967296 bytes). mcopy uses the max offset/file size to be 4294967295 and as a result, it errors out without any warning to the user. Change the 4 GB check to '-ge' to catch these cases. Since we allow IMAGE_ROOTFS_SIZE to be in KBs, the maximum allowed is 4194303 KB. Also, tweaked the error message to refer to wic too. Fixes [YOCTO #12776] (From OE-Core rev: 16956dacd4be2c64e5816ccb2b222b5b128838c9) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils3: pass build arguments when doing a cleanRoss Burton2018-07-101-1/+1
| | | | | | | | | | We should pass the build arguments to setup.py when doing a clean, because sometimes the arguments are required for setup.py get started. (From OE-Core rev: f9324af88a99eca28b160fa31aa4516fd397e44b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: improve code styleRoss Burton2018-07-101-1/+1
| | | | | | | | | Use elif for consistency. (From OE-Core rev: 2ad89f12c9819326b29588a8a6c642aaae990f18) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: move variables for kernel artifacts names to separate bbclassMartin Jansa2018-07-102-17/+20
| | | | | | | | | | | | | | | | * this makes it easier to access these variables from some other bbclass e.g. sdcard_image-rpi.bbclass in meta-raspberry where we need to know how some files in deploy are named, but we cannot inherit kernel.bbclass as it's used in image recipe not kernel recipe * alternatively we can move these to bitbake.conf like similar image variables are: meta/conf/bitbake.conf:IMAGE_BASENAME = "${PN}" meta/conf/bitbake.conf:IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}" meta/conf/bitbake.conf:IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}" (From OE-Core rev: 7d0ef0eaa1bfe97015a774c26f5791622e7e8b12) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: use the consistent naming schema for initramfsMartin Jansa2018-07-101-10/+9
| | | | | | | | | | | | | | | * use INITRAMFS_BASE_NAME and INITRAMFS_SYMLINK_NAME variables, like other kernel artifacts are using * use "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" instead of "${PV}-${PR}-${MACHINE}-${DATETIME}" to be consistent with other files * allow to modify default symlink name with INITRAMFS_SYMLINK_NAME instead of currently used: initramfs_symlink_name=${type}-initramfs-${MACHINE} (From OE-Core rev: 935b9d5a2bd12effad65f69a631ecff96b8bb553) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devicetree.bbclass: Fix and simplify instalation of DTB filesMartin Jansa2018-07-102-32/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add 2 new variables: KERNEL_DTB_BASE_NAME KERNEL_DTB_SYMLINK_NAME instead of reusing KERNEL_IMAGE_SYMLINK_NAME and than expecting that default value ${MACHINE} was being used in e.g.: DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` * install normal DTB files only once even if there is multiple entries in KERNEL_IMAGETYPE_FOR_MAKE and don't prefix them with the type of the kernel image, use the KERNEL_IMAGETYPE_FOR_MAKE as a prefix only when installing them bundled with kernel or initramfs image. * deploy the files from ${D}/${KERNEL_IMAGEDEST}/ instead of kernel build directory, so that we don't need to call DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"` again in do_deploy * create all links in do_deploy task, because default KERNEL_DTB_BASE_NAME like KERNEL_IMAGE_BASE_NAME contains PKGR and PKGR is different in do_install and do_deploy, because kernel.bbclass calls meta/classes/kernel.bbclass:do_install[prefuncs] += "package_get_auto_pr" meta/classes/kernel.bbclass:do_deploy[prefuncs] += "package_get_auto_pr" * the filenames are a bit different, but with separate variable it should be easier for other bbclasses which use these DTB files to find them correctly, just use either the cannonical name $dtb_base_name.$dtb_ext or $dtb_base_name-${KERNEL_DTB_SYMLINK_NAME}.$dtb_ext because PKGR (and other PKG* variables) might be different in your task and kernel.do_deploy task. * fix DTB files being deployed with incorrect filenames when KERNEL_IMAGE_SYMLINK_NAME isn't set to ${MACHINE}, e.g. instead of the default: -rw-r--r-- 2 bitbake bitbake 1.4K Nov 20 07:41 deploy/images/raspberrypi3-64/Image-1-4.9.59+git0+e7976b2aff-r0.2-lirc-rpi-20171120043031.dtbo lrwxrwxrwx 2 bitbake bitbake 64 Nov 20 07:41 deploy/images/raspberrypi3-64/Image-lirc-rpi.dtbo -> Image-1-4.9.59+git0+e7976b2aff-r0.2-lirc-rpi-20171120043031.dtbo lrwxrwxrwx 2 bitbake bitbake 64 Nov 20 07:41 deploy/images/raspberrypi3-64/lirc-rpi.dtbo -> Image-1-4.9.59+git0+e7976b2aff-r0.2-lirc-rpi-20171120043031.dtbo I was getting: -rw-r--r-- 2 bitbake bitbake 1348 Nov 20 10:28 deploy/images/raspberrypi3-64/Image-linux-raspberrypi-lirc-rpi.dtbo lrwxrwxrwx 2 bitbake bitbake 37 Nov 20 10:28 deploy/images/raspberrypi3-64/Image-linux-raspberrypi-lirc-rpi-master-20171120102653.dtbo -> Image-linux-raspberrypi-lirc-rpi.dtbo lrwxrwxrwx 2 bitbake bitbake 37 Nov 20 10:28 deploy/images/raspberrypi3-64/lirc-rpi.dtbo -> Image-linux-raspberrypi-lirc-rpi.dtbo and e.g. sdcard_image-rpi.bbclass from meta-raspberrypi: https://github.com/agherzan/meta-raspberrypi/blob/37e4e18f4a745ce8dc11f7e40a29da0859ff13c6/classes/sdcard_image-rpi.bbclass was failing in: mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb because ${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb doesn't exist in my build, due to DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` not replacing whole "${KERNEL_IMAGE_SYMLINK_NAME}" (read ${MACHINE}) with just ${DTB_BASE_NAME} * with this change applied the deploy dir looks like this: -rw-r--r-- 2 bitbake bitbake 1.4K Nov 20 15:49 deploy/images/raspberrypi3-64/lirc-rpi-1-4.9.59+git0+e7976b2aff-r0.8-raspberrypi3-64-20171120154716.dtbo lrwxrwxrwx 2 bitbake bitbake 74 Nov 20 15:49 deploy/images/raspberrypi3-64/lirc-rpi.dtbo -> lirc-rpi-1-4.9.59+git0+e7976b2aff-r0.8-raspberrypi3-64-20171120154716.dtbo lrwxrwxrwx 2 bitbake bitbake 74 Nov 20 15:49 deploy/images/raspberrypi3-64/lirc-rpi-raspberrypi3-64.dtbo -> lirc-rpi-1-4.9.59+git0+e7976b2aff-r0.8-raspberrypi3-64-20171120154716.dtbo and works correctly even with DISTRO using different naming scheme * the sdcard_image-rpi.bbclass still needs to be modified, I've provided updated version here: https://github.com/agherzan/meta-raspberrypi/pull/159 * mpc8315e-rdb.conf MACHINE in meta-yocto-bsp also needs small fix: https://lists.yoctoproject.org/pipermail/poky/2018-July/011436.html (From OE-Core rev: 1860d9d3c62e2e94cd68a809385873ffd8270b6d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devicetree.bbclass: Use lowercase names for shell variablesMartin Jansa2018-07-101-40/+40
| | | | | | | | | | | | * just to make it more clear what is local shell variable and what is replaced by bitbake from the metadata and also to prevent the variable to be incorrectly expanded by bitbake if someone happens to define e.g. DTB_BASE_NAME (From OE-Core rev: 98b0f13f0650d970aac7441e7fcfc1089570785f) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: split ssh_allow_empty_passwordJackie Huang2018-07-092-4/+23
| | | | | | | | | | | | | "allow root login" should not be bundled in ssh_allow_empty_password, because some distro may want only one of "allow root login" and "allow empty password", so split it out into ssh_allow_root_login and add new imagefeature allow-root-login so they can be controlled separately, debug-tweaks will still include both of them. (From OE-Core rev: 1ab494f06a12548a902298afabd0a842161ef10d) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sstate: Remove unused argumentJoshua Watt2018-07-061-2/+2
| | | | | | | | | Removes an unused argument to pstaging_fetch() (From OE-Core rev: ab0eb2bf0db6e7da7c9b9bb4d46621dbf76dcc2a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sstate: Remove trailing whitespaceJoshua Watt2018-07-061-1/+1
| | | | | | | (From OE-Core rev: dc7c181f231db1290ea7d7d5e42476e70a488d73) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* setuptools.bbclass: depend on python-setuptoolsRoss Burton2018-07-061-1/+1
| | | | | | | | | | | | python-distribute is obsolete and is now simply a PROVIDES of python-setuptools, so use the right name. The identical change for setuptools3.bbclass was done in 2015 in 8922e60. (From OE-Core rev: 87e38f0306400609aeac92bc13fd6f41d61e6271) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: map mipsel TARGET_ARCH to mips for the cross fileRoss Burton2018-07-061-0/+2
| | | | | | | | | | Meson uses 'mips' for both big- and little-endian MIPS machines, so map mipsel to mips. (From OE-Core rev: 23734432a24da77aa838ad4bdcbcc294cde08348) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk.bbclass: set PREMIRRORS for kernel to speed up testChen Qi2018-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if we do a testsdkext task for the image, it would take very long time to finish. The time is mostly spent fetching kernel source via network. We have done some configuration in auto.conf, trying to make use of own-mirrors.bbclass to avoid fetching kernel via network. However, the solution normally does not work. Below is some log from log.do_fetch. DEBUG: Fetcher failure: Unable to find file \ file:///path/to/downloads/git2_git.yoctoproject.org.linux-yocto.git.tar.gz \ anywhere. The tar.gz file is not available. It is generated only if BB_GENERATE_MIRROR_TARBALLS is set to "1". The default value of BB_GENERATE_MIRROR_TARBALLS is "0", and according to the manual, users need choose to set it to "1" only if they are trying to make a source mirror. So generally, this var's value is "0". Anyway, we do need to avoid fetching kernel source from network when doing testsdkext. So set PREMIRRORS in auto.conf to achieve this. After this change, the time reduces from 4209.131s to 1399.436s on my local machine. [YOCTO #12729] (From OE-Core rev: fd18ddb0664f69d77681590774b0123251a98728) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patch: Jail patch_task_patch_prefunc in classes/patch into the workdirPablo Saavedra2018-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With PATCHTOOL=git patches the changes in the patch_task_postfunc of the classes/patch. This works OK when the S dir is a Git repo but doesn't if the source is a tarball. The while condition in the patch_task_patch_prefunc must be jailed into the WORKDIR. In the opposite, when you are executing the recipe out of a Git subtree the function simply fails but when your recipes are into a Git repo the patch_task_postfunc execute a commit over your BSP local Git repo adding the changes in an arbitrary Git repo found in the path from the SOURCE directory to the '/'. This situation is highly probable in cases like ~home directories under the control of a .git repo or Yocto BSP which manage the meta layers as git submodules. This patch fix the changes introduced in classes/patch: when PATCHTOOL = "git" double-check the repository commit: 86ab56b55164393924b5e688b20e8f3f3f8fc578 Author: Paul Eggleton <paul.eggleton@linux.intel.com> Date: Tue Dec 5 14:36:58 2017 +1300 classes/patch: when PATCHTOOL = "git" double-check the repository 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. (From OE-Core rev: db6ce9d8838b1f9064604654ab579da3e237f361) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils: clean the build tree in do_configureRoss Burton2018-07-061-1/+7
| | | | | | | | | | | base_do_configure() tries to do "make clean" if there is a Makefile present. For most recipes using distutils there is not a Makefile, but we do know that "setup.py clean" will work so call that instead. (From OE-Core rev: b805cefb24566772a2beb5d02036266e45370913) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "kernel-devicetree: Corrected normalize_dtb"Martin Jansa2018-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2e7f3b2b9318d1e5395ad58131eafb873f614326. It was breaking quite common use case that the dtb files are in some subdirectory and then kernel build fails to build them. As reported by khem: http://lists.openembedded.org/pipermail/openembedded-core/2018-July/152578.html me: http://lists.openembedded.org/pipermail/openembedded-core/2018-July/152579.html on raspberrypi3 build: make[3]: *** No rule to make target 'arch/arm/boot/dts/dwc2.dtbo'. Stop. arch/arm/Makefile:345: recipe for target 'dwc2.dtbo' failed make[2]: *** [dwc2.dtbo] Error 2 Makefile:146: recipe for target 'sub-make' failed and trevor on the IRC: 20:35:49 < tlwoerner> the recent 2e7f3b2b9318d1e5395ad58131eafb873f614326 commit in oe-core seems to cause dragonboard-410c's kernel to fail to build 20:36:26 < tlwoerner> for the dragonboard-410c, KERNEL_DEVICETREE is set to "qcom/apq8016-sbc.dtb" but the build failure is: 20:36:37 < tlwoerner> *** No rule to make target 'arch/arm64/boot/dts/dts/qcom/apq8016-sbc.dtb'. Stop. 20:36:44 < tlwoerner> i.e. the "qcom/" is getting removed 20:37:08 < tlwoerner> oops!! 20:37:33 < tlwoerner> wrong copy&paste, the actual error is: 20:37:36 < tlwoerner> *** No rule to make target 'arch/arm64/boot/dts/apq8016-sbc.dtb'. Stop. 20:37:53 < tlwoerner> i.e., the "qcom/" is being stripped out (From OE-Core rev: 0d725c76c113dec441a7319a6ee997e4ae8c4c88) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: add support for ext2.gz initramfs filesChunrong Guo2018-07-051-1/+1
| | | | | | | | (From OE-Core rev: e2e0c91c2c8229d9ed0958de98b5a9b14c6805d1) Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: map architecture to correct values in cross fileRoss Burton2018-07-051-2/+14
| | | | | | | | | | | | | The cross file specifies the host/target cpu_family, which should be one of a defined set of values[1] but if it isn't Meson won't complain and instead recipes may behave unexpectedly. [1] http://mesonbuild.com/Reference-tables.html#cpu-families (From OE-Core rev: e33b902a1dc4294dac148715f4d3ca5b0a6ee1b7) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: various class improvementsRoss Burton2018-07-051-3/+4
| | | | | | | | | | | | | - Ensure that the PACKAGECONFIG arguments are always in EXTRA_OEMESON - Log the arguments that are being passed in do_configure. - Do verbose builds so the compile logs are useful for debugging build problems (From OE-Core rev: 3112ff268d095a65ecb893dd6ca88a85b0f70446) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib: Tweak previous cross-canadian multilib fixRichard Purdie2018-07-041-0/+2
| | | | | | | | As well as setting RECIPE_SYSROOT we also need to set STAGING_DIR_HOST/TARGET. (From OE-Core rev: 59a0a05235d80c86251cf45d7142bfc57f2e70d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Always use the default sysroot for allarch recipesRichard Purdie2018-07-041-0/+3
| | | | | | | | Without this, recipes can't find allarch data files like autoconf-archive. (From OE-Core rev: 8ae70703f68853a8714a4fb8fa5d959b5e21a02d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devicetree: Corrected normalize_dtbPaulo Neves2018-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The normalize_dtb function was buggy because it only converted from .dts suffix to .dtb suffix if the user passed a full source path to KERNEL_DEVICETREE containing the /dts/ path. The problem is that if the user did that there would be a warning. On the othet hand if user just set the variable KERNEL_DEVICETREE="file.dts" the bbclass translation to the respective .dtb target did not occur and make would fail saying it has no rule to make target file.dts This patch decouples the logic of having /dts/ in the path from the target translation. (From OE-Core rev: 2e7f3b2b9318d1e5395ad58131eafb873f614326) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>