]> code.ossystems Code Review - openembedded-core.git/commitdiff
linux-yocto: split meta data from kernel repository
authorBruce Ashfield <bruce.ashfield@windriver.com>
Tue, 21 Jul 2015 15:21:04 +0000 (11:21 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 25 Jul 2015 13:40:57 +0000 (14:40 +0100)
The linux-yocto tree has always been a combined set of kernel changes
and configuration (meta) data carried in a single tree. While this
format is effective at keeping kernel configuration and source
modifications synchronized, it isn't always obvious to developers on
how to manipulate the meta data versus the source.

With this change, we remove the meta data processing from the
kernel-yocto class and use the external meta-data repository that
has always been used to seed the linux-yocto meta branch.

After this change, linux-yocto can no longer process combined trees,
and is simplified as a result.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-yocto.bbclass
meta/recipes-kernel/linux/linux-yocto-dev.bb
meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb
meta/recipes-kernel/linux/linux-yocto_3.14.bb
meta/recipes-kernel/linux/linux-yocto_3.19.bb

index 2f9a41f34d0fb783bd800e49e2bc8cee2f46423a..231e08deba683cf7de2d79facb3c658e5d34090f 100644 (file)
@@ -33,6 +33,7 @@ def find_kernel_feature_dirs(d):
     for url in fetch.urls:
         urldata = fetch.ud[url]
         parm = urldata.parm
+        type=""
         if "type" in parm:
             type = parm["type"]
         if "destsuffix" in parm:
@@ -112,17 +113,6 @@ do_kernel_metadata() {
                fi
        fi
 
-       # if we have a defined/set meta branch we should not be generating
-       # any meta data. The passed branch has what we need.
-       if [ -n "${KMETA}" ]; then
-               createme_flags="--disable-meta-gen --meta ${KMETA}"
-       fi
-
-       createme -v -v ${createme_flags} ${ARCH} ${machine_branch}
-       if [ $? -ne 0 ]; then
-               bbfatal_log "Could not create ${machine_branch}"
-       fi
-
        sccs="$sccs ${@" ".join(find_sccs(d))}"
        patches="${@" ".join(find_patches(d))}"
        feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}"
@@ -189,34 +179,18 @@ do_patch() {
 do_kernel_checkout() {
        set +e
 
-       # A linux yocto SRC_URI should use the bareclone option. That
-       # ensures that all the branches are available in the WORKDIR version
-       # of the repository.
        source_dir=`echo ${S} | sed 's%/$%%'`
        source_workdir="${WORKDIR}/git"
-       if [ -d "${WORKDIR}/git/" ] && [ -d "${WORKDIR}/git/.git" ]; then
-               # case2: the repository is a non-bare clone
-
+       if [ -d "${WORKDIR}/git/" ]; then
+               # case: git repository (bare or non-bare)
                # if S is WORKDIR/git, then we shouldn't be moving or deleting the tree.
                if [ "${source_dir}" != "${source_workdir}" ]; then
                        rm -rf ${S}
                        mv ${WORKDIR}/git ${S}
                fi
                cd ${S}
-       elif [ -d "${WORKDIR}/git/" ] && [ ! -d "${WORKDIR}/git/.git" ]; then
-               # case2: the repository is a bare clone
-
-               # if S is WORKDIR/git, then we shouldn't be moving or deleting the tree.
-               if [ "${source_dir}" != "${source_workdir}" ]; then
-                       rm -rf ${S}
-                       mkdir -p ${S}/.git
-                       mv ${WORKDIR}/git/* ${S}/.git
-                       rm -rf ${WORKDIR}/git/
-               fi
-               cd ${S} 
-               git config core.bare false
        else
-               # case 3: we have no git repository at all. 
+               # case: we have no git repository at all. 
                # To support low bandwidth options for building the kernel, we'll just 
                # convert the tree to a git repo and let the rest of the process work unchanged
                
@@ -235,7 +209,6 @@ do_kernel_checkout() {
                git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
                git clean -d -f
        fi
-       # end debare
 
        # convert any remote branches to local tracking ones
        for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
@@ -246,24 +219,8 @@ do_kernel_checkout() {
                fi
        done
 
-               # If KMETA is defined, the branch must exist, but a machine branch
-       # can be missing since it may be created later by the tools.
-       if [ -n "${KMETA}" ]; then
-               git show-ref --quiet --verify -- "refs/heads/${KMETA}"
-               if [ $? -eq 1 ]; then
-                       bberror "The branch '${KMETA}' is required and was not found"
-                       bberror "Ensure that the SRC_URI points to a valid linux-yocto"
-                       bbfatal_log "kernel repository"
-               fi
-       fi
-       
-
        # Create a working tree copy of the kernel by checking out a branch
        machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
-       git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
-       if [ $? -ne 0 ]; then
-               machine_branch="master"
-       fi
 
        # checkout and clobber any unimportant files
        git checkout -f ${machine_branch}
@@ -313,7 +270,7 @@ python do_kernel_configcheck() {
         kmeta = "." + kmeta
 
     pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH', True), "${S}/scripts/util/")
-    cmd = d.expand("cd ${S}; kconf_check -config- %s/meta-series ${S} ${B}" % kmeta)
+    cmd = d.expand("cd ${S}; kconf_check -config %s/meta-series ${S} ${B}" % kmeta)
     ret, result = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd))
 
     config_check_visibility = int(d.getVar( "KCONF_AUDIT_LEVEL", True ) or 0)
@@ -351,7 +308,6 @@ python do_kernel_configcheck() {
 do_validate_branches() {
        set +e
        cd ${S}
-       export KMETA=${KMETA}
 
        machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
        machine_srcrev="${SRCREV_machine}"
@@ -377,28 +333,6 @@ do_validate_branches() {
                force_srcrev=${machine_srcrev}
        fi
 
-       ## KMETA branch validation.
-       target_meta_head="${SRCREV_meta}"
-       if [ "${target_meta_head}" = "AUTOINC" ] || [ "${target_meta_head}" = "" ]; then
-               bbnote "SRCREV validation skipped for AUTOREV or empty meta branch"
-       else
-               meta_head=`git show-ref -s --heads ${KMETA}`
-
-               git cat-file -t ${target_meta_head} > /dev/null
-               if [ $? -ne 0 ]; then
-                       bberror "${target_meta_head} is not a valid commit ID"
-                       bbfatal_log "The kernel source tree may be out of sync"
-               fi
-               if [ "$meta_head" != "$target_meta_head" ]; then
-                       bbnote "Setting branch ${KMETA} to ${target_meta_head}"
-                       git branch -m ${KMETA} ${KMETA}-orig
-                       git checkout -q -b ${KMETA} ${target_meta_head}
-                       if [ $? -ne 0 ];then
-                               bbfatal_log "Could not checkout ${KMETA} branch from known hash ${target_meta_head}"
-                       fi
-               fi
-       fi
-
        git checkout -q -f ${machine_branch}
        if [ -n "${force_srcrev}" ]; then
                # see if the branch we are about to patch has been properly reset to the defined
index 588a89f6411b6d70ad263c4c1249fb1d8cf6ae45..0be30893acec73153ae9364b5f80d5ee5b66fa52 100644 (file)
@@ -23,9 +23,10 @@ python () {
 }
 
 KBRANCH = "standard/base"
-KMETA = "meta"
+KMETA = "kernel-meta"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=master;destsuffix=${KMETA}"
 
 # Set default SRCREVs. Both the machine and meta SRCREVs are statically set
 # to the korg v3.7 tag, and hence prevent network access during parsing. If
index 9bdbc49ffeb250dd3a3201d5d6706ba166ba4a60..0bd94f0c600d318b9c0b535dc53d07988b79375a 100644 (file)
@@ -5,15 +5,16 @@ require recipes-kernel/linux/linux-yocto.inc
 
 SRCREV_machine ?= "863ba0912f559ba9d64ab94bf04f0226fdf0cb49"
 SRCREV_machine_qemuppc ?= "9d464d6696a0fc755c65a2cf75ad7a4656ac6e1e"
-SRCREV_meta ?= "94fa1d7e980c97fcd59b37daedcd863bd6daaee4"
+SRCREV_meta ?= "b55cfc0308bf7158843db4b8f69f866487a0919e"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.14;destsuffix=${KMETA}"
 
 LINUX_VERSION ?= "3.14.36"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
-KMETA = "meta"
+KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
 LINUX_KERNEL_TYPE = "preempt-rt"
index bd7b6da28c2c124589472a8c60109501e4b767d0..f486d41efad9667c3c29ce1bdbe9f071c127110e 100644 (file)
@@ -6,15 +6,16 @@ require recipes-kernel/linux/linux-yocto.inc
 
 LINUX_VERSION ?= "3.14.36"
 
-KMETA = "meta"
+KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
 SRCREV_machine ?= "7534aeb01883b48cc42eb4900d0a8c64e8160e14"
-SRCREV_meta ?= "94fa1d7e980c97fcd59b37daedcd863bd6daaee4"
+SRCREV_meta ?= "b55cfc0308bf7158843db4b8f69f866487a0919e"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;branch=${KBRANCH};name=machine; \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.14;destsuffix=${KMETA}"
 
 COMPATIBLE_MACHINE = "(qemux86)"
 
index 172d3b4800092c765ab3895f4ec8f47dccaa814a..c82da372681db000529b3cf4334fbbcf9ac0405b 100644 (file)
@@ -6,15 +6,16 @@ require recipes-kernel/linux/linux-yocto.inc
 
 LINUX_VERSION ?= "3.19.5"
 
-KMETA = "meta"
+KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
 SRCREV_machine ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
-SRCREV_meta ?= "a70b2eb273ef6349d344920474a494697474b98e"
+SRCREV_meta ?= "361c186effc0b0038dfbfd3fe71ecf3df5edb43d"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.19;destsuffix=${KMETA}"
 
 COMPATIBLE_MACHINE = "(qemux86)"
 
index 7f32c7a1b52c33e60b2ba314dc67e666d7ac44da..9bbcecc76f33e46ad59d254cf9a904b7003c178d 100644 (file)
@@ -19,15 +19,16 @@ SRCREV_machine_qemux86 ?= "48833301518748d82cbc2412fea3617eeee6d01b"
 SRCREV_machine_qemux86-64 ?= "7534aeb01883b48cc42eb4900d0a8c64e8160e14"
 SRCREV_machine_qemumips64 ?= "c910c6d8338ab7291f066edc06de83de5b645d8f"
 SRCREV_machine ?= "7534aeb01883b48cc42eb4900d0a8c64e8160e14"
-SRCREV_meta ?= "94fa1d7e980c97fcd59b37daedcd863bd6daaee4"
+SRCREV_meta ?= "b55cfc0308bf7158843db4b8f69f866487a0919e"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;branch=${KBRANCH};name=machine; \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.14;destsuffix=${KMETA}"
 
 LINUX_VERSION ?= "3.14.36"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
-KMETA = "meta"
+KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
 COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
index cab06266f931a635faf08c2db41c5e4f0d73fad5..364f1f60ddcdd87421ccef754f988fa68499dc4f 100644 (file)
@@ -19,15 +19,16 @@ SRCREV_machine_qemux86 ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
 SRCREV_machine_qemux86-64 ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
 SRCREV_machine_qemumips64 ?= "3eb70cea3532e22ab1b6da9864446621229e6616"
 SRCREV_machine ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
-SRCREV_meta ?= "a70b2eb273ef6349d344920474a494697474b98e"
+SRCREV_meta ?= "361c186effc0b0038dfbfd3fe71ecf3df5edb43d"
 
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;name=machine;branch=${KBRANCH}; \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.19;destsuffix=${KMETA}"
 
 LINUX_VERSION ?= "3.19.5"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
-KMETA = "meta"
+KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
 COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"