diff options
Diffstat (limited to 'meta/classes')
-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 ba139dd7f8..0df61cdef0 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -631,7 +631,31 @@ do_validate_branches() { | |||
631 | # if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to | 631 | # if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to |
632 | # check and we can exit early | 632 | # check and we can exit early |
633 | if [ "${machine_srcrev}" = "AUTOINC" ]; then | 633 | if [ "${machine_srcrev}" = "AUTOINC" ]; then |
634 | linux_yocto_dev='${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "1", "", d)}' | ||
635 | if [ -n "$linux_yocto_dev" ]; then | ||
636 | git checkout -q -f ${machine_branch} | ||
637 | ver=$(grep "^VERSION =" ${S}/Makefile | sed s/.*=\ *//) | ||
638 | patchlevel=$(grep "^PATCHLEVEL =" ${S}/Makefile | sed s/.*=\ *//) | ||
639 | sublevel=$(grep "^SUBLEVEL =" ${S}/Makefile | sed s/.*=\ *//) | ||
640 | kver="$ver.$patchlevel" | ||
641 | bbnote "dev kernel: performing version -> branch -> SRCREV validation" | ||
642 | bbnote "dev kernel: recipe version ${LINUX_VERSION}, src version: $kver" | ||
643 | echo "${LINUX_VERSION}" | grep -q $kver | ||
644 | if [ $? -ne 0 ]; then | ||
645 | version="$(echo ${LINUX_VERSION} | sed 's/\+.*$//g')" | ||
646 | versioned_branch="v$version/$machine_branch" | ||
647 | |||
648 | machine_branch=$versioned_branch | ||
649 | force_srcrev="$(git rev-parse $machine_branch 2> /dev/null)" | ||
650 | if [ $? -ne 0 ]; then | ||
651 | bbfatal "kernel version mismatch detected, and no valid branch $machine_branch detected" | ||
652 | fi | ||
653 | |||
654 | bbnote "dev kernel: adjusting branch to $machine_branch, srcrev to: $force_srcrev" | ||
655 | fi | ||
656 | else | ||
634 | bbnote "SRCREV validation is not required for AUTOREV" | 657 | bbnote "SRCREV validation is not required for AUTOREV" |
658 | fi | ||
635 | elif [ "${machine_srcrev}" = "" ]; then | 659 | elif [ "${machine_srcrev}" = "" ]; then |
636 | if [ "${SRCREV}" != "AUTOINC" ] && [ "${SRCREV}" != "INVALID" ]; then | 660 | if [ "${SRCREV}" != "AUTOINC" ] && [ "${SRCREV}" != "INVALID" ]; then |
637 | # SRCREV_machine_<MACHINE> was not set. This means that a custom recipe | 661 | # SRCREV_machine_<MACHINE> was not set. This means that a custom recipe |