From 65993e1e501ffba84290aacb7b534175c296c0d3 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Fri, 4 Apr 2014 19:18:29 +0200 Subject: [PATCH] meta-digi-arm: add framework to set external branches for git repos Starting with Yocto 1.6 there is a need to configure in which branch a specific SHA1 revision is included. We need a framework to set such branches both for internal git repos and for external ones (Github). If the branch is not specified in the SRC_URI, the do_fetch task may fail even though the SHA1 revision exists in the repository. Signed-off-by: Javier Viguera --- .../imx-bootlets-dey/imx-bootlets-dey_git.bb | 8 ++++++-- .../recipes-bsp/u-boot/u-boot-dey-rev_2009.08.inc | 6 ++++-- .../recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc | 6 ++++-- .../recipes-bsp/u-boot/u-boot-dey-rev_2013.04.inc | 8 +++++--- .../kernel-module-atheros/kernel-module-atheros.bb | 6 ++++-- meta-digi-arm/recipes-kernel/linux/linux-dey.inc | 4 ++-- .../recipes-kernel/linux/linux-dey_2.6.35.14.bb | 5 +++-- meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb | 12 ++++++++---- 8 files changed, 36 insertions(+), 19 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/imx-bootlets-dey/imx-bootlets-dey_git.bb b/meta-digi-arm/recipes-bsp/imx-bootlets-dey/imx-bootlets-dey_git.bb index 03a56ac55..f90facda0 100644 --- a/meta-digi-arm/recipes-bsp/imx-bootlets-dey/imx-bootlets-dey_git.bb +++ b/meta-digi-arm/recipes-bsp/imx-bootlets-dey/imx-bootlets-dey_git.bb @@ -7,12 +7,16 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425 PR = "${DISTRO}.r0" +SRCBRANCH_external = "" +SRCBRANCH_internal = "master" +SRCBRANCH = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCBRANCH_internal}', '${SRCBRANCH_external}', d)}" + SRCREV_external = "" SRCREV_internal = "967bc502cdb5073ca05fa13dfe588a5509066735" SRCREV = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCREV_internal}', '${SRCREV_external}', d)}" -SRC_URI_external = "${DIGI_GITHUB_GIT}/imx-bootlets.git;protocol=git" -SRC_URI_internal = "${DIGI_MTK_GIT}linux/imx-bootlets.git;protocol=ssh" +SRC_URI_external = "${DIGI_GITHUB_GIT}/imx-bootlets.git;protocol=git;branch=${SRCBRANCH}" +SRC_URI_internal = "${DIGI_MTK_GIT}linux/imx-bootlets.git;protocol=ssh;branch=${SRCBRANCH}" SRC_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRC_URI_internal}', '${SRC_URI_external}', d)}" S = "${WORKDIR}/git" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2009.08.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2009.08.inc index 277d31220..90811d9ed 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2009.08.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2009.08.inc @@ -1,12 +1,14 @@ # Copyright (C) 2013 Digi International -SRCBRANCH = "master" +SRCBRANCH_external = "" +SRCBRANCH_internal = "master" +SRCBRANCH = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCBRANCH_internal}', '${SRCBRANCH_external}', d)}" SRCREV_external = "" SRCREV_internal = "b23ff7f11a0577037becc20bbcfe61640fe87fb4" SRCREV = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCREV_internal}', '${SRCREV_external}', d)}" -SRC_URI_external = "${DIGI_GITHUB_GIT}/yocto-uboot.git;protocol=git" +SRC_URI_external = "${DIGI_GITHUB_GIT}/yocto-uboot.git;protocol=git;branch=${SRCBRANCH}" SRC_URI_internal = "${DIGI_GIT}u-boot-denx.git;protocol=git;branch=${SRCBRANCH}" SRC_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRC_URI_internal}', '${SRC_URI_external}', d)}" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc index eaee01afe..5df24c310 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc @@ -1,12 +1,14 @@ # Copyright (C) 2013 Digi International -SRCBRANCH = "v2013.01/master" +SRCBRANCH_external = "" +SRCBRANCH_internal = "v2013.01/master" +SRCBRANCH = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCBRANCH_internal}', '${SRCBRANCH_external}', d)}" SRCREV_external = "" SRCREV_internal = "181c8eddf0cee183d317ad400b5d01dce3c2dbe6" SRCREV = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCREV_internal}', '${SRCREV_external}', d)}" -SRC_URI_external = "${DIGI_GITHUB_GIT}/yocto-uboot.git;protocol=git" +SRC_URI_external = "${DIGI_GITHUB_GIT}/yocto-uboot.git;protocol=git;branch=${SRCBRANCH}" SRC_URI_internal = "${DIGI_GIT}u-boot-denx.git;protocol=git;branch=${SRCBRANCH}" SRC_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRC_URI_internal}', '${SRC_URI_external}', d)}" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.04.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.04.inc index fdcdc9302..b773d9867 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.04.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.04.inc @@ -1,11 +1,13 @@ # Copyright (C) 2013 Digi International -SRCBRANCH = "v2013.04/master" +SRCBRANCH_external = "" +SRCBRANCH_internal = "v2013.04/master" +SRCBRANCH = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCBRANCH_internal}', '${SRCBRANCH_external}', d)}" SRCREV_external = "" SRCREV_internal = "${AUTOREV}" SRCREV = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCREV_internal}', '${SRCREV_external}', d)}" -SRC_URI_external = "${DIGI_GITHUB_GIT}/yocto-uboot.git;protocol=git" -SRC_URI_internal = "${DIGI_LOG_GIT}u-boot-denx.git;protocol=git;branch=${SRCBRANCH}" +SRC_URI_external = "${DIGI_GITHUB_GIT}/yocto-uboot.git;protocol=git;branch=${SRCBRANCH}" +SRC_URI_internal = "${DIGI_GIT}u-boot-denx.git;protocol=git;branch=${SRCBRANCH}" SRC_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRC_URI_internal}', '${SRC_URI_external}', d)}" diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb index 05b812e71..ba1b88bb1 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb +++ b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb @@ -12,13 +12,15 @@ PR = "r1" # from busybox does not support '--ignore-install' option. RDEPENDS_${PN} = "kmod" -SRCBRANCH = "dey-1.6/maint" +SRCBRANCH_external = "" +SRCBRANCH_internal = "dey-1.6/maint" +SRCBRANCH = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCBRANCH_internal}', '${SRCBRANCH_external}', d)}" SRCREV_external = "" SRCREV_internal = "fdb797adf47514f5c94921fb20e64b4ecadb7a52" SRCREV = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCREV_internal}', '${SRCREV_external}', d)}" -SRC_URI_external = "${DIGI_GITHUB_GIT}/atheros.git;protocol=git" +SRC_URI_external = "${DIGI_GITHUB_GIT}/atheros.git;protocol=git;branch=${SRCBRANCH}" SRC_URI_internal = "${DIGI_GIT}linux-modules/atheros.git;protocol=git;branch=${SRCBRANCH}" SRC_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRC_URI_internal}', '${SRC_URI_external}', d)}" SRC_URI += " \ diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc index 0dd063a69..96819ef5a 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc @@ -4,8 +4,8 @@ require recipes-kernel/linux/linux-imx.inc LOCALVERSION = "-dey" -SRC_URI_external = "${DIGI_GITHUB_GIT}/yocto-linux.git;protocol=git" -SRC_URI_internal = "${DIGI_GIT}linux-2.6.git;protocol=git;branch=${KBRANCH}" +SRC_URI_external = "${DIGI_GITHUB_GIT}/yocto-linux.git;protocol=git;branch=${SRCBRANCH}" +SRC_URI_internal = "${DIGI_GIT}linux-2.6.git;protocol=git;branch=${SRCBRANCH}" SRC_URI = " \ ${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRC_URI_internal}', '${SRC_URI_external}', d)} \ file://defconfig \ diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_2.6.35.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_2.6.35.14.bb index 079ee4a93..342ff8f67 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_2.6.35.14.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_2.6.35.14.bb @@ -4,8 +4,9 @@ require recipes-kernel/linux/linux-dey.inc COMPATIBLE_MACHINE = "(mxs|mx5)" -KBRANCH_DEFAULT = "del-5.9/meta-digi" -KBRANCH = "${KBRANCH_DEFAULT}" +SRCBRANCH_external = "" +SRCBRANCH_internal = "del-5.9/meta-digi" +SRCBRANCH = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCBRANCH_internal}', '${SRCBRANCH_external}', d)}" SRCREV_external = "" SRCREV_internal = "${AUTOREV}" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb index d4b3de93e..c7ec257e2 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb @@ -5,10 +5,14 @@ require recipes-kernel/linux/linux-dtb.inc DEPENDS += "lzop-native bc-native" -KBRANCH_DEFAULT = "v3.10/master" -KBRANCH = "${KBRANCH_DEFAULT}" -KBRANCH_mxs = "v3.10.y/maint" -KBRANCH_mx6 = "v3.10/dey-1.6/maint" +SRCBRANCH_external = "" +SRCBRANCH_external_mxs = "" +SRCBRANCH_external_mx6 = "" + +SRCBRANCH_internal = "v3.10/master" +SRCBRANCH_internal_mxs = "v3.10.y/maint" +SRCBRANCH_internal_mx6 = "v3.10/dey-1.6/maint" +SRCBRANCH = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCBRANCH_internal}', '${SRCBRANCH_external}', d)}" SRCREV_external = "" SRCREV_internal = "${AUTOREV}"