diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 30f07de4ca..d38b60f519 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -614,7 +614,31 @@ do_validate_branches() { | |||
614 | # if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to | 614 | # if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to |
615 | # check and we can exit early | 615 | # check and we can exit early |
616 | if [ "${machine_srcrev}" = "AUTOINC" ]; then | 616 | if [ "${machine_srcrev}" = "AUTOINC" ]; then |
617 | linux_yocto_dev='${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "1", "", d)}' | ||
618 | if [ -n "$linux_yocto_dev" ]; then | ||
619 | git checkout -q -f ${machine_branch} | ||
620 | ver=$(grep "^VERSION =" ${S}/Makefile | sed s/.*=\ *//) | ||
621 | patchlevel=$(grep "^PATCHLEVEL =" ${S}/Makefile | sed s/.*=\ *//) | ||
622 | sublevel=$(grep "^SUBLEVEL =" ${S}/Makefile | sed s/.*=\ *//) | ||
623 | kver="$ver.$patchlevel" | ||
624 | bbnote "dev kernel: performing version -> branch -> SRCREV validation" | ||
625 | bbnote "dev kernel: recipe version ${LINUX_VERSION}, src version: $kver" | ||
626 | echo "${LINUX_VERSION}" | grep -q $kver | ||
627 | if [ $? -ne 0 ]; then | ||
628 | version="$(echo ${LINUX_VERSION} | sed 's/\+.*$//g')" | ||
629 | versioned_branch="v$version/$machine_branch" | ||
630 | |||
631 | machine_branch=$versioned_branch | ||
632 | force_srcrev="$(git rev-parse $machine_branch 2> /dev/null)" | ||
633 | if [ $? -ne 0 ]; then | ||
634 | bbfatal "kernel version mismatch detected, and no valid branch $machine_branch detected" | ||
635 | fi | ||
636 | |||
637 | bbnote "dev kernel: adjusting branch to $machine_branch, srcrev to: $force_srcrev" | ||
638 | fi | ||
639 | else | ||
617 | bbnote "SRCREV validation is not required for AUTOREV" | 640 | bbnote "SRCREV validation is not required for AUTOREV" |
641 | fi | ||
618 | elif [ "${machine_srcrev}" = "" ]; then | 642 | elif [ "${machine_srcrev}" = "" ]; then |
619 | if [ "${SRCREV}" != "AUTOINC" ] && [ "${SRCREV}" != "INVALID" ]; then | 643 | if [ "${SRCREV}" != "AUTOINC" ] && [ "${SRCREV}" != "INVALID" ]; then |
620 | # SRCREV_machine_<MACHINE> was not set. This means that a custom recipe | 644 | # SRCREV_machine_<MACHINE> was not set. This means that a custom recipe |