aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2018-07-27testsdk.bbclass: check python module testtools and subunitrbt/testtoolsRobert Yang
The testtools or subunit is not part of python's standard library, so check them before use. Fixed when they are not installed on host: $ bitbake core-image-minimal -ctestsdk Exception: ImportError: No module named 'testtools' Now it can run with a warning: WARNING: core-image-minimal-1.0-r0 do_testsdk: Failed to import testtools or subunit, the testcases will run serially Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2018-07-26classes/package: fix variable name in commentPaul Eggleton
The variable is PACKAGE_WRITE_DEPS as seen in the default below the comment. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-26autotools.bbclass: fix autoreconf bbnote commandline argumentsAndre McCurdy
Leaving -Wcross out of the bbnote version of the autoreconf command seems to be a long standing inconsistency (dating back to the very first commit in oe-core) but there's no obvious reason to do so. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26lib/oe: split out machine to ELF data dictionaryRoss Burton
2018-07-26distutils/setuptools, distutils3/setuptools3: improve reproducibilityHongxu Jia
- Unify var-DISTUTILS_INSTALL_ARGS in distutils and setuptools - Supply "--root" directory to the "install" command, and use it as a prefix to strip off the purported filename encoded in bytecode files. (It strips build path prefix from .pyc files) [YOCTO #8446] [YOCTO #12084] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26distutils/setuptools-native, distutils3/setuptools3-native: do not try to ↵Hongxu Jia
fetch code during do_compile If a python recipe is using setuptools and the setup_requires argument, where setuptools will use easy_install to fetch the module if it isn't present. The build failed on a machine where a proxy was required, but succeeded on a machine which had direct access to the internet Add var-NO_FETCH_BUILD, and set it in distutils_do_compile which does not allow to fetch code from internet during do_compile. Example result: ... ERROR: Do not try to fetch `pytest-runner1' for building. Please add its native recipe to DEPENDS. Traceback (most recent call last): File "setup.py", line 56, in <module> ... The improvement is flexible for test_requirements argument (used at `setup.py test'), where use easy_install also. [YOCTO #12084] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-25license_image: Fix raceRichard Purdie
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 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-25license: Split image license functions to a separate classRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-25package: Use subprocess to be consistent with the rest of the classRichard Purdie
Using 'sub' in one function just confuses things, standardise and fix formatting of the parameters too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-25Revert "relocate_sdk.py: remove hardcoded SDK path"Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package/package_manager: multiprocess_exec -> multiprocess_launchRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Clean up getstatusoutput usageRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24sstate/bitbake.conf: Use pigz if availableRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Call file to determine elf status in parallelRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Refactor to remove isElf/is_elf function duplicationRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Allow parallel processing of shlib analysisRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Allow parallel processing of debug splittingRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Don't use subshell to execute fileRichard Purdie
We don't need any functionality from the shell here, its just extra fork overhead. Therefore remove it and use subprocess directly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Drop subshell usage for dwarfsrcfile generation.Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package_ipk|deb: Use oe.utils.multiprocess_launchRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package: Rework PACKAGELOCK based upon sstate for do_packagedataRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24relocate_sdk.py: remove hardcoded SDK pathRuslan Bilovol
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 Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package.bbclass: exclude packages as shlib providersOleksii Konoplitskyi
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> Signed-off-by: Oleksii Konoplitskyi <okonopli@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18recipes: Enforce ARM ISA just for arm arches <= armv5Khem Raj
armv7+ used thumb2 ISA and it compiles fine with thumb2 issues are only when using thumb1 ISA Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18spdx.bbclass: Encode strings before passing to hashlibOlof Johansson
In python3, passing a unicode object to hashlib will result in an exception that encourages you to encode it first. Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18spdx.bbclass: Make use of bb.utils' sha1_file()Olof Johansson
The same functionality already exists within bitbake, so avoid duplicating. Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18spdx.bbclass: Fix undefined variable errorOlof Johansson
The path variable is used in an error message a few lines later, but was never defined. Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18spdx.bbclass: Replace deprecated string.replace with str.replaceOlof Johansson
The string.replace function is removed in python3. Instead, the str method "replace" should be used instead. Signed-off-by: Olof Johansson <olofjn@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18insane: optimise buildpath searchRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18classes/buildhistory: properly process escaped chars from pkgdataPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18classes/buildhistory: handle packaged files with names containing spacesPaul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18populate_sdk_base: Use default value assignment for SDK_TITLE/SDKEXTPATHRichard Purdie
This allows the user mode flexibility about centrally overriding these rather than needing to do it on a per recipe basis. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-16testsdk: Enable multiprocess executionRichard Purdie
This uses the new concurrenttest code to enable parallel test execution if specified. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-16oeqa/core/threaded: Remove in favour of using concurrenttestsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-13image-live: fix check for rootfs size with hddimg imagesAnuj Mittal
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] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-10distutils3: pass build arguments when doing a cleanRoss Burton
We should pass the build arguments to setup.py when doing a clean, because sometimes the arguments are required for setup.py get started. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-10meson: improve code styleRoss Burton
Use elif for consistency. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-10kernel.bbclass: move variables for kernel artifacts names to separate bbclassMartin Jansa
* 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}" Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-10kernel.bbclass: use the consistent naming schema for initramfsMartin Jansa
* 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} Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-10kernel-devicetree.bbclass: Fix and simplify instalation of DTB filesMartin Jansa
* 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 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-10kernel-devicetree.bbclass: Use lowercase names for shell variablesMartin Jansa
* 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 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-07rootfs-postcommands: split ssh_allow_empty_passwordJackie Huang
"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. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06classes/sstate: Remove unused argumentJoshua Watt
Removes an unused argument to pstaging_fetch() Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06classes/sstate: Remove trailing whitespaceJoshua Watt
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06setuptools.bbclass: depend on python-setuptoolsRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-06meson: map mipsel TARGET_ARCH to mips for the cross fileRoss Burton
Meson uses 'mips' for both big- and little-endian MIPS machines, so map mipsel to mips. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06testsdk.bbclass: set PREMIRRORS for kernel to speed up testChen Qi
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] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06patch: Jail patch_task_patch_prefunc in classes/patch into the workdirPablo Saavedra
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06distutils: clean the build tree in do_configureRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-05Revert "kernel-devicetree: Corrected normalize_dtb"Martin Jansa
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 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>