summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
AgeCommit message (Collapse)Author
2022-08-12classes: Update classes to match new bitbake class scope functionalityRichard Purdie
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add SPDX license identifiersRichard Purdie
As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add copyright statements to files without oneRichard Purdie
Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-04kernel-yocto.bbclass: Reset to exiting on non-zero return code at end of taskStefan Wiehler
Several tasks deactivate exiting on non-zero return codes via set +e because they run subcommands that have legitimate non-zero return codes. However when appending to those tasks, this behavior is not expected and can lead to builds silently proceeding in case of an error. Therefore reset the default behavior at the end of the respective tasks via set -e. Signed-off-by: Stefan Wiehler <stefan.wiehler@nokia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-15kernel-yocto.bbclass: say what SRC_URI entry is being droppedRoss Burton
If there is a defconfig set by KBUILD_DEFCONFIG and something that looks like a defconfig in SRC_URI, the SRC_URI is dropped. This happens even if the entry in SRC_URI is called my_defconfig_frag.cfg. Arguably, this is a bug and the behaviour should be changed, but for now if we're going to remove entries from SRC_URI we should make it clear what entry is being removed. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-30kernel-yocto: allow patch author date to be commit dateBruce Ashfield
In situations where a buid needs to be reproducible, it is sometimes desireable to use a patches author date, versus the time when it is applied. This generates a consistent hash between different patch applications. We leverage the existing KERNEL_DEBUG_TIMESTAMPS to trigger the use of a new option to kgit-s2q. This allows us to use the author date in a reproducible configuration, but disable it if we need the current time/date. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-21kernel-yocto.bbclass: Fixup do_kernel_configcheck usage of KMETARuss Dill
The do_kernel_configcheck task requires a meta directory, normally set by ${KMETA}. The meta directory is taken as a relative path from ${S}: outfile = "{}/{}/cfg/mismatch.txt".format( s, kmeta ) However, when checking for the presence of ${KMETA} the current working directory is searched. This will almost always fail and "kgit --meta" is used instead. If the user does have a path in their current working directory that matches the ${KMETA} variable but the path is not present within the kernel source directory, the build will fail if it tries to write config errors/ warnings to that path. If ${KMETA} is not set, the same problem exists with the hard-coded "meta" directory. Fix these issues by checking for ${KMETA} within ${S} rather than the current working directory. Additionally, drop the hardcoded backup directory "meta" as it hasn't been functioning and probably has no users Signed-off-by: Russ Dill <russ.dill@nikolamotor.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2021-10-07kernel-yocto: don't apply config metadata patches twiceBruce Ashfield
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-04kernel-yocto: Simplify no git repo case in do_kernel_checkoutPaul Barker
If the kernel sources are not fetched via git, a local git repository is created in do_kernel_checkout. In this case we know that there will be no remote branches and we will already be on the correct branch (since only one branch will exist). So we can simplify things by skipping these steps. This also removes the assumption that the default git branch name will be "master". Prior to this change, the final git checkout command in do_kernel_checkout could fail if a local git repo was created and the user had changed init.defaultBranch in their gitconfig. Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17linux-yocto-dev: base AUTOREV on specified versionBruce Ashfield
linux-yocto-dev tracks the latest mainline kernel, and uses standard/* for that support. Archived -dev versions are under v<kernel version>/standard/base. This policy works, except that a released branch will still follow the new kernel versions, causing potential breakage with newer kernels than are supported in that release. Rather than lock the SRCREVs and update branches in old releases, we can preserve the AUTOREV nature of -dev, and allow them to switch automatically to the archived branch based on the LINUX_VERSION in the -dev recipe (which is unchanged in the release branch). This is consistent with the other branch switching done for the kernels and with the -dev workflow. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-18kernel-yocto: provide debug / summary information for metadataBruce Ashfield
It was mentioned that when developing a BSP, the information about what definition was used, or what fragments have been applied is not obvious and requires looking at the code. With this change, we can trigger a full summary of the meta data gathering phase when KCONF_AUDIT_LEVEL > 0. Sample output follows: NOTE: do_kernel_metadata: for summary/debug, set KCONF_AUDIT_LEVEL > 0 NOTE: kernel meta data summary for qemux86-64 (standard): NOTE: ====================================================================== NOTE: BSP entry point / definition: /build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.34+gitAUTOINC+bca3bfbc74_85c17ad073-r0/kernel-meta/bsp/common-pc-64/common-pc-64-standard.scc NOTE: Fragments from SRC_URI: /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/kubernetes.scc NOTE: KERNEL_FEATURES: features/nfsd/nfsd-enable.scc features/debug/printk.scc features/kernel-sample/kernel-sample.scc features/netfilter/netfilter.scc cfg/virtio.scc features/drm-bochs/drm-bochs.scc cfg/sound.scc cfg/paravirt_kvm.scc features/scsi/scsi-debug.scc features/gpio/mockup.scc features/aufs/aufs-enable.scc cfg/fs/flash_fs.scc cfg/virtio.scc NOTE: Final scc/cfg list: /build/tmp/work/qemux86_64-poky-linux/linux-yocto/5.10.34+gitAUTOINC+bca3bfbc74_85c17ad073-r0/kernel-meta/bsp/common-pc-64/common-pc-64-standard.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xt-checksum.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/ebtables.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/vswitch.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/lxc.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/docker.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/cgroup-hugetlb.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/xen.scc /poky/meta-virtualization/recipes-kernel/linux/linux-yocto/kubernetes.scc features/nfsd/nfsd-enable.scc features/debug/printk.scc features/kernel-sample/kernel-sample.scc features/netfilter/netfilter.scc cfg/virtio.scc features/drm-bochs/drm-bochs.scc cfg/sound.scc cfg/paravirt_kvm.scc features/scsi/scsi-debug.scc features/gpio/mockup.scc features/aufs/aufs-enable.scc cfg/fs/flash_fs.scc cfg/virtio.scc Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-24kernel-yocto.bbclass: chdir to ${WORKDIR} for do_kernel_checkoutKai Kang
It chdirs to ${S} at the beginning of task do_kernel_checkout. Then it removes ${S} when it still resides in ${S}. It may fail to run the task do_kernel_checkout when bitbake is called by third-part wrapper script. So chdir to ${WORKDIR} by default for do_kernel_checkout. And it will chdir to ${S} afterwards in task do_kernel_checkout. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-06kernel-yocto: fix do_kernel_configme indentationYann Dirson
Signed-off-by: Yann Dirson <yann@blade-group.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-25kernel-yocto: add KBUILD_DEFCONFIG search location to failure messageBruce Ashfield
It was pointed out that since the check for the existence of KBUILD_DEFCONFIG knows where it is looking, that should be part of the error/log message. We only look in one location for the defconfigs, so add where we checked to the message. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-03kernel-yocto: only replace leading -I in include pathsYanfei Xu
We just want to remove the first '-I' in $d, hence removing the g' of sed avoid changing the real path which is include '-I' We also add an anchor to the regex to only match -I at the start of the path. Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28kernel-yocto: checksum all modifications to available kernel fragments ↵Bruce Ashfield
directories This is based on the patch from Zhaolong Zhang <zhangzl2013@126.com> [kernel-yocto: checksum indirect cfg and scc files] While the recommended manner to share/reuse feature fragments is to maintain them in a kernel-meta repository and track the changes via the standard SRCREV fetcher mechanism, that method is not always practical for small sets of features or for quick testing of changes. These other flows use .scc files on the SRC_URI. It has been noted that config fragments or other features indirectly included by those .scc files will not trigger the kernel meta-data to be re-run and hence a build can continue with stale data (or not be triggered at all). To solve this issue, we can collect the directories that are searchable via FILESEXTRAPATHS and add them to the do_kernel_metadata task checksum. This allows modifications, additions and removals from the potential kernel feature directories to trigger a re-execution of the meta data task. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28kernel-yocto: allow promotion of configuration warnings to errorsBruce Ashfield
It was requested to add the ability to upgrade configuration warnings to errors, so that they can't be missed in a build. Add a flag KMETA_AUDIT_WERROR, that when set, triggers a bb.fatal at the end of configuration checking if any warnings are found. This is off by default, but is available for those that want to enable it in their kernel recipe or bbappend. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-13kernel-yocto: split meta data gathering into patch and config phasesBruce Ashfield
do_kernel_metadata gathers and sanitizes the meta-data that is used in later steps of the kernel-yocto build process. The processing takes the form of configuration and patch gathering. The current single pass of both config and patch gathering means that patches can't modify in-tree configuration elements (although this makes tracing configuration changes harder, it is a valid workflow). We can divide the routine into a patch and configuration phase, and call the config variant after patching is done. This keeps the common parts of the gahering intact, but allows us flexibilty in when the stages happen. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-13kernel-yocto: set cwd before querying the meta data dirBruce Ashfield
To aid classifying options and streamling reports, fragments and classification info are consolidated into a kernel meta directory. The name of the meta directory is (somewhat) flexible, and hence is queried by the tools and created if it doesn't exist. The recent enhancements to the .config auditing introduced a new query for the meta directory, but isn't being run in the kernel's source directory .. and is hence creating an unwanted file in $TOPDIR. We set the kernel source directory as the cwd for the call, and everything goes back to where it belongs. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-08kernel-yocto: enhance configuration queue analysis capabilitiesBruce Ashfield
Enable the kernel-yocto bbclass to use enhanced capabilities from the kern-tools symbol_why.pl. We bump the kern-tools SRCREV to pickup the reworking of symbol_why, which uses Kconfiglib to provide analysis on configuration values. This is useful for debugging why a symbol specified in a fragment did not end up in the final .config. We introduce two ways to interact with the new symbol_why: 1) a replacement of the existing kconf_check script 2) a dedicated task that is explicitly invoked to dump details on the configuration. The kconf_check replacement is transparent to the user, and is run in exactly the same way as it was previously. But we get better output and more detailed diagnostics if there are symbols that don't make it into the final .config The second way to interact with symbol why is via the new task do_config_analysis. This is invoked like any other task, and by default will provide a full configuration analysis and point the user at files to look at for details. If a more targetted analysis is desired, then specific symbols can be set in the CONFIG_ANALYSIS variable. When this variable is set, the task will only run for the given symbols and provide per-variable links to the user. This variable can be set like any other, including specification in the local.conf: CONFIG_ANALYSIS_pn-linux-yocto-dev = 'NF_CONNTRACK LOCALVERSION' Which produces output as follows: WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration analysis executed, see: tmp/work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/NF_CONNTRACK-config-analysis.txt for details WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration audit executed, see: tmp/work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/NF_CONNTRACK-config-audit.txt for details WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration analysis executed, see: tmp/work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/LOCALVERSION-config-analysis.txt for details WARNING: linux-yocto-dev-5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0 do_config_analysis: Configuration audit executed, see: work/qemuarm64-poky-linux/linux-yocto-dev/5.8-rc++gitAUTOINC+d22beb8f8a_8fc484ed37-r0/LOCALVERSION-config-audit.txt for details Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-06kernel/yocto: allow dangling KERNEL_FEATURESBruce Ashfield
KERNEL_FEATURES are explicitly checked by the kern-tools, and trigger and error when not present. This is since the KERNEL_FEATURES are specified by layers or BSPs as elements that are requied for correct operation. That being said, in order to support more kernel recipes that are using fragments, but not necessarily the yocto kernel-cache for meta-data, this change introduces: KERNEL_DANGLING_FEATURES_WARN_ONLY As you'd expect, when set, missing kernel features only print a message and warn that runtime issues may occur, but otherwise allow the kernel configuration and build process to continue. This was noticed/required when meta-virtualization adopted a more generic kernel bbappend (to serve the needs of more layers in the ecosystem), but also specifies some KERNEL_FEATURES. If layers using a recipe derived from kernel-yocto, but not the main kernel-cache, used meta-virtualization and error would be thrown due to missing features. We now can both allow them to continue, and also provide a more useful message to resolve the issue. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-20kernel-yocto: account for extracted defconfig in elements checkBruce Ashfield
The test for whether or not scc should to invoked to generate a config.queue was missing the newly created sccs_defconfig variable. We need to test for that variable as well, or we may miss generating the config.queue in some cases. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-08kernel/yocto: fix search for defconfig from src_uriAndrey Zhizhikin
Fetcher provides full paths to defconfig and scc files, which awk comparison operator does not catch during construction of src_uri_defconfig and sccs_from_src_uri lists. This causes the src_uri_defconfig variable to come out empty, and fails further validation if defconfig is only supplied via SRC_URI. Replace comparison operator with awk match function which searches for sub-string during filtering, effectively placing defconfig from SRC_URI into src_uri_defconfig and scc files in sccs_from_src_uri respectively. Fixes: 23dcff0d396c (kernel/yocto: ensure that defconfigs are processed first) Cc: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-30kernel/yocto: ensure that defconfigs are processed firstBruce Ashfield
It is uncommon that a BSP definition and a defconfig are used in a single configuration. That being said, it is a valid way to organize kernel configuration meta data. When a defconfig is used, either on the src_uri or from in the kernel tree, it is normally expected that it is the baseline, with all options applied on top of it. With this commit, we detect either type of defconfig and ensure that it is used first, followed by the fragments in their previous order. This allows existing configuration stacks to remain the same, while ensuring that a defconfig combined stack works as expected. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-24kernel-yocto.bbclass: Fix deps when externalsrc is usedPaul Barker
do_kernel_configme was recently removed from SRCTREECOVEREDTASKS so this task still runs when externalsrc is used. This task normally runs after do_patch but when externalsrc is used, do_patch is removed and this ordering restriction does nothing. This allows bitbake to execute do_kernel_configme too early, causing races with do_unpack. This is fixed by adding in a dependency on do_unpack when externalsrc is used. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-10kernel-yocto.bbclass: Support config fragments with externalsrcPaul Barker
The merging of config fragments is performend in the do_kernel_configme task and so config fragments will not be supported when this task is removed from the dependency tree. kernel-yocto adds additional tasks which may modify the source directory to SRCTREECOVEREDTASKS so that they are removed when using externalsrc. However, do_kernel_configme should be safe to use, the only modification to the source tree is the potential creation of the '.kernel-meta' directory and the '.metadir' file. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06kernel-yocto.bbclass: fix a wrong inter-task dependencyMing Liu
do_kernel_checkout and do_symlink_kernsrc are both modifying ${S}, they could conflict with eacher other, move do_kernel_checkout after do_symlink_kernsrc does fix that. Signed-off-by: Ming Liu <liu.ming@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kern-tools: fix merge_config when LD contains parametersBruce Ashfield
To ensure that the kernel linker is used when allno/mod/yes config merge_config steps were executed, the call to make was tweaked to explicitly pass LD. But since the variable wasn't quoted, any parameters to LD (like the sysroot) were mistakenly passed to make, and hence could trigger an error on some architectures. We also tweak the logging to hightlight errors like this in the future and avoid losing it in the noise of merge configs sometimes overly verbose output. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kernel-yocto: fix defconfig detection in find_sccs()Gavin Li
The current code would cause a file like "config.bin" to added to the config sources list. I am sure the intention was to add any files with defconfig in its name and not the other way around. Signed-off-by: Gavin Li <gavinli@thegavinli.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, ↵Martin Jansa
merge_config_build.log and fail when /.config wasn't created * for whatever reason, instead of silently continuing to build default kernel config Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kernel-yocto.bbclass: set KERNEL_LD also for merge_config.shMartin Jansa
* when ld-is-gold is used, merge_config.sh silently fails and doesn't generate anything useful in .config (and also include directory isn't created): tmp-glibc-bfd-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build: total 164K drwxr-xr-x 4 martin martin 4.0K Feb 5 02:27 . drwxrwxr-x 7 martin martin 4.0K Feb 5 02:27 .. -rw-rw-r-- 1 martin martin 133K Feb 5 02:28 .config -rw-rw-r-- 1 martin martin 39 Feb 5 02:27 .gitignore drwxr-xr-x 4 martin martin 4.0K Feb 5 02:27 include -rw-rw-r-- 1 martin martin 201 Feb 5 02:27 Makefile drwxrwxr-x 4 martin martin 4.0K Feb 5 02:27 scripts lrwxrwxrwx 1 martin martin 61 Feb 5 02:27 source -> /OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source tmp-glibc-gold-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build: total 28K drwxr-xr-x 3 martin martin 4.0K Feb 5 02:26 . drwxrwxr-x 7 martin martin 4.0K Feb 5 02:26 .. -rw-rw-r-- 1 martin martin 74 Feb 5 02:26 .config -rw-rw-r-- 1 martin martin 39 Feb 5 02:26 .gitignore -rw-rw-r-- 1 martin martin 201 Feb 5 02:26 Makefile drwxrwxr-x 4 martin martin 4.0K Feb 5 02:26 scripts lrwxrwxrwx 1 martin martin 61 Feb 5 02:26 source -> /OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source $ cat tmp-glibc-gold-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/.config CONFIG_LOCALVERSION="-yocto-standard" * and because the failure is silent, it will happily start building kernel with default defconfig, which even builds OK for qemux86-64 but on qemux86 I've noticed this issue, because incorrectly configured kernel build fails with: $ tail -n 20 tmp-glibc-gold-qemux86/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/log.do_compile LD /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/libsubcmd-in.o AR /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/libsubcmd.a HOSTCC scripts/mod/mk_elfconfig CC scripts/mod/devicetable-offsets.s CC scripts/mod/empty.o cc1: error: code model 'kernel' not supported in the 32 bit mode cc1: sorry, unimplemented: 64-bit mode not compiled in make[2]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/scripts/Makefile.build:99: scripts/mod/devicetable-offsets.s] Error 1 make[2]: *** Waiting for unfinished jobs.... cc1: error: code model 'kernel' not supported in the 32 bit mode cc1: sorry, unimplemented: 64-bit mode not compiled in make[2]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/scripts/Makefile.build:266: scripts/mod/empty.o] Error 1 make[1]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/Makefile:1111: prepare0] Error 2 make[1]: *** Waiting for unfinished jobs.... LD /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/objtool-in.o /OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/tools/objtool LINK /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/objtool make: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/Makefile:179: sub-make] Error 2 WARNING: exit code 1 from a shell command. * the issue happens in log.do_kernel_configme, but the log is completely useless: cat tmp-glibc-gold-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/log.do_kernel_configme DEBUG: Executing python function extend_recipe_sysroot NOTE: Direct dependencies are ['virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-devtools/bison/bison_3.5.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', 'virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-extended/bc/bc_1.07.1.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/binutils/binutils-cross_2.33.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_9.2.bb:do_populate_sysroot'] NOTE: Installed into sysroot: ['bison-native', 'bc-native', 'binutils-cross-i686', 'gcc-cross-i686', 'autoconf-native', 'xz-native', 'flex-native', 'gnu-config-native', 'automake-native', 'libtool-native', 'texinfo-dummy-native', 'gettext-minimal-native', 'readline-native', 'zlib-native', 'gmp-native', 'libmpc-native', 'mpfr-native', 'linux-libc-headers', 'm4-native', 'ncurses-native', 'pkgconfig-native'] NOTE: Skipping as already exists in sysroot: ['kern-tools-native', 'quilt-native'] DEBUG: sed -e 's:^[^/]*/:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/:g' /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/bison-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gcc-cross-i686/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/autoconf-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gnu-config-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/automake-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/libtool-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gmp-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/ncurses-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/pkgconfig-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/OE/build/oe-core/tmp-glibc/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/OE/build/oe-core/tmp-glibc/pkgdata/qemux86:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/fifo.10476:g' DEBUG: Python function extend_recipe_sysroot finished DEBUG: Executing shell function do_kernel_configme DEBUG: Shell function do_kernel_configme finished ]because merge_config.sh is redirected to work-shared/qemux86/kernel-source/.kernel-meta/cfg/merge_config_build.log and bbfatal_log called in do_kernel_configme only when merge_config.sh fails which it should in this case but doesn't. The merge_config_build.log shows 5.4 specific error: scripts/Kconfig.include:39: gold linker 'i686-oe-linux-ld' not supported but then it happily continues reporting what isn't applied in not created .config file --- tmp-glibc-bfd-qemux86-do_kernel_configme/work-shared/qemux86/kernel-source/.kernel-meta/cfg/merge_config_build.log 2020-02-05 02:28:01.455520207 +0100 +++ tmp-glibc-gold-qemux86-do_kernel_configme/work-shared/qemux86/kernel-source/.kernel-meta/cfg/merge_config_build.log 2020-02-05 02:26:30.656470909 +0100 @@ -171,586 +171,5113 @@ HOSTCC scripts/kconfig/symbol.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --alldefconfig Kconfig -./.tmp.config.jDjIEYi9Yq:2208:warning: unexpected data: # -./.tmp.config.jDjIEYi9Yq:2209:warning: unexpected data: # Generic Driver Options -./.tmp.config.jDjIEYi9Yq:2210:warning: unexpected data: # -./.tmp.config.jDjIEYi9Yq:3102:warning: symbol value 'm' invalid for SAMPLE_SECCOMP -./.tmp.config.jDjIEYi9Yq:3119:warning: symbol value 'm' invalid for NF_CT_PROTO_GRE -./.tmp.config.jDjIEYi9Yq:3120:warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP -./.tmp.config.jDjIEYi9Yq:3121:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE -# -# configuration written to .config -# +scripts/Kconfig.include:39: gold linker 'i686-oe-linux-ld' not supported +make[2]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/scripts/kconfig/Makefile:73: alldefconfig] Error 1 +make[1]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/Makefile:567: alldefconfig] Error 2 make[1]: Leaving directory '/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build' +make: *** [Makefile:179: sub-make] Error 2 +grep: /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/.config: No such file or directory +Value requested for CONFIG_LOCALVERSION not in final .config +Requested value: CONFIG_LOCALVERSION="" +Actual value: + +grep: /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/.config: No such file or directory +Value requested for CONFIG_LOCALVERSION_AUTO not in final .config +Requested value: # CONFIG_LOCALVERSION_AUTO is not set +Actual value: * I don't know why merge_config.sh uses separate more difficult to find merge_config_build.log instead of leaving the output to end in log.do_kernel_configme, I'll send it as separate commit so that it can be discussed there. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kernel-yocto: Only override CONFIG_LOCALVERSION if LINUX_VERSION_EXTENSION ↵Paul Barker
is set CONFIG_LOCALVERSION may already be set in a defconfig or config fragment and this should not be unconditionally overridden. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kernel-yocto: Drop setting of unused variables in do_kernel_metadataPaul Barker
The machine_branch and machine_srcrev variables were set but not used in do_kernel_metadata. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08kernel-yocto: Move defaults and tasks from linux-yocto.inc into bbclassPaul Barker
This allows the kernel-yocto bbclass to be inherited in a recipe without needing to include linux-yocto.inc. The bbclass should stand on its own and linux-yocto.inc does a few things which may not be desired in other kernel recipes (such as modifying KERNEL_FEATURES). The LINUX_VERSION_EXTENSION default is not moved as other kernel recipes may not want this setting in place. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-04kernel-yocto.bbclass: export LD in the environment used by kconf_checkMartin Jansa
* resolves following exceptions in log.do_kernel_configcheck: DEBUG: Executing python function do_kernel_configcheck Traceback (most recent call last): File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2776, in _expand_macro res += args[int(new_args[0])] ValueError: invalid literal for int() with base 10: 'error-if' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/symbol_why.py", line 295, in <module> conf = kconfiglib.Kconfig( kconf, show_errors, show_errors ) File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 947, in __init__ self._init(filename, warn, warn_to_stderr, encoding) File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 1085, in _init self._parse_block(None, self.top_node, self.top_node).next = None File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2982, in _parse_block prev = self._parse_block(None, parent, prev) File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2907, in _parse_block while self._next_line(): File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2234, in _next_line self._tokens = self._tokenize(line) File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2364, in _tokenize self._parse_assignment(s) File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2604, in _parse_assignment s, i = self._expand_macro(s, i, ()) File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2780, in _expand_macro res += self._fn_val(new_args) File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2843, in _fn_val return py_fn(self, *args) File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 6769, in _error_if_fn kconf.filename, kconf.linenr, msg)) kconfiglib.KconfigError: scripts/Kconfig.include:39: gold linker 'x86_64-oe-linux-ld --sysroot=/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot ' not supported Traceback (most recent call last): File "/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/usr/bin/kconfiglib.py", line 2776, in _expand_macro res += args[int(new_args[0])] ValueError: invalid literal for int() with base 10: 'error-if' * there is still 291 mismatched options in default 5.4.15 builds, but at least the 11804 lines long log doesn't start with 9022 lines of above exceptions DEBUG: Executing python function do_kernel_configcheck [mismatch (291)]: /OE/build/oe-core/tmp-glibc/work-shared/qemux86-64/kernel-source/.kernel-meta/cfg/mismatch.txt There were hardware options requested that do not have a corresponding value present in the final ".config" file. This probably means you aren't getting the config you wanted. WARNING: [kernel config]: specified values did not make it into the kernel's final configuration: ... Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-30kernel-yocto: allow external (aka non-integrated) BSPs to supply patchesBruce Ashfield
By default, only explicitly specified .scc files or patches are applied to a BSP as part of the patching phase. This allows the reference BSPs to be integrated into a kernel tree, and use the same meta data for tree generation and for runtime building. It also greatly simplies the processing of kernel meta data. That being said, if an external (and fully standalone) kmeta repository is used, it very well may contain both patches and configuration. To allow the BSP definition to supply patches and config, we introduce a new kernel meta data definition: define KMETA_EXTERNAL_BSP t This can be set in any .scc file that wants to specify both patches and configuration. If specifying this per-BSP is not desired, a secondary variable is used: KMETA_EXTERNAL_BSPS When that is set in a bbappend, any located BSP definitions will be used for both patches and configuration. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-12linux-yocto: fix SRC_URI patching with unified reposBruce Ashfield
As reported by Paul Barker, my attempt to allow the patching of kernel meta data broke other repository configurations, since the meta data patch routing was matching too broadly and the same repo would end up being patched twice. Using his suggested fix, we are up and running with both types of repos again. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-06kernel-yocto: allow kernel-meta repositories to be patchedBruce Ashfield
For testing purposes, it is often easier to patch a fragment in a kernel-meta repository versus needing to make a copy or modify the source repository. We can allow this sort of patching when a patchdir of kernel-meta is passed (to indicate the nested kernel-meta repository). Also note that we must patch the meta data before they are processed/gathered, since migrated copies to the kernel source directory will be used later. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-05devtool: Support kmeta directory usage with devtool modify/finishJaewon Lee
When using Kmeta directories, devtool finish will add every single file in the directory to the bbappend. This is because in the current implementation, the get_recipe_local_files function treats the kmeta directory like a file. Modifying the function to loop through the provided directories and return all included files instead of just the top level directory. This will enable correct file to file comparison when determing which files are new/changed and need to be added to the bbappend. Adding an extra check in devtool-source.bbclass to not copy the cfg file if its already included somewhere in the kmeta directory Also during 'modify', when moving necessary files in the kmeta directory from the workdir to oe-local-files, the dangling parent directories are left behind. This in itself is not an issue as the temporary devtool workspace is automatically deleted, but this causes an incorrect include directory to be added in kernel-yocto.bbclass. Changing the order of the if statements to catch the correct conditional. This is safe to do as when not in the devtool context, there will be no oe-local-files directory. Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-27kernel-yocto.bbclass: fix "referenced before assignment" errorMax Kellermann
If "scc --configs" fails, do_kernel_configcheck() crashes like this: 0338: try: 0339: configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8') 0340: except subprocess.CalledProcessError: *** 0341: bb.fatal( "Cannot gather config fragments for audit: %s" % configs) 0342: 0343: try: 0344: subprocess.check_call(['kconf_check', '--report', '-o', 0345: '%s/%s/cfg' % (s, kmeta), d.getVar('B') + '/.config', s, configs], cwd=s, env=env) Exception: UnboundLocalError: local variable 'configs' referenced before assignment This crash bug was introduced by commit 21de5cc43cfedc703e5bc0515507a6dae36afb74 Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28kernel-yocto: restore BSP audit visibilityBruce Ashfield
During the re-working of kernel fragments and status output cleanup the visibility for BSP level errors was dropped/removed. The audit phase can detect errors, redefinition and invalid configuration fragments. We control the visibility of these reports via the existing KCONF_BSP_AUDIT_LEVEL variable. By default, errors and invalid configuration values will be displayed as a warning. If redefinition values are to be shown the audit level must be raised above the deafult value of '2'. We inhibit these by default, since there are many valid reasons why a BSP will change a default / base config .. and showing them offers no value to the BSP user. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28classes/kernel-yocto: Cleanup getstatusoutput usageJoshua Watt
Replace usage of os.utils.getstatusoutput() with direct subprocess calls. Pass a modified environment and working directory where necessary to bypass the need to execute in a shell. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14kernel-yocto.bbclass: Adds oe-local-files path (devtool) to include directivesJaewon Lee
The devtool-source class moves all local files specified in SRC_URI to an oe-local-files directory. When using devtool and a recipe space kernel-meta, devtool modify throws an error because the paths the kernel-yocto class is looking for feature directories in, don't include the oe-local-files directory which devtool is using. This patch checks for feature directories in oe-local-files, and if present, adds that path to include directives. [YOCTO #12855] Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-08kernel: specify dependencies for compilation for config tasksBruce Ashfield
With recent kernels (i.e. 4.17+) the configuration phase of the kernel will check for capabilities/options of the compiler for CVE and other mitigation support. For a general kernel, we want to ensure that CC is fully defined when the config targets are invoked (so the proper compiler will be checked). For linux-yocto, we also need to specify the compiler/tools dependencies for the configme task since it executes before configure and hence the main kernel build DEPENDS will not always be in the sysroot before it executes. Without those dependencies the kernel will be incorrectly configured (i.e. bison is missing) or the configuration will fail the mitigation tests. [YOCTO #12757] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-03kernel-yocto: check git config during checkoutJustin Bronder
Initialize the git config prior creating a git repository in a plain directory. Signed-off-by: Justin Bronder <jsbronder@cold-front.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-26kernel-yocto: make SRC_URI defconfig removal more specificBruce Ashfield
commit 7e98c295c1bb511e [kernel-yocto: ensure that only a single defconfig is processed] has an overly broad replacement strategy for 'defconfig' and hence will chop up any fragment name that happens to contain that string. If we change the processing to split on whitespace and drop any full work 'defconfig' fragments, we'll get the behaviour we want (no duplicate defconfigs, but fragments with defconfig in their name are fine). [YOCTO #12487] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-12-10kernel-yocto: ensure that only a single defconfig is processedBruce Ashfield
As a follow up to the changes to ensure that KBUILD_DEFCONFIG will always get its defconfig into the processing, we also should ensure that we don't get both a KBUILD_DEFCONFIG and a SRC_URI defconfig in the configuration queue. If both are in the configuration queue, we end up with competing values and a potentially long running check of 5000+ options x 2 against the final .config. By removing the defconfig found from the SRC_URI when one is found via KBUILD_DEFCONFIG, we ensure that only one will be processed. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10kernel-yocto: Stop the build if defconfig is missingSaul Wold
The bberror does not stop the build correctly, this should be a bbfatal_log to ensure the failure correctly stops the build and logs the failure. Part of [YOCTO #12162] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10kernel-yocto: ensure sccs variable is set when using KBUILD_DEFCONFIGSaul Wold
When using KBUILD_DEFCONFIG, $sccs should be set to the $WORKDIR/defconfig regardless if it compares or is copied. Otherwise $sccs is not set and the defconfig is not found correctly. Part of [YOCTO #12162] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>