mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
linux-yocto: locate and use out of tree features specified on the SRC_URI
In a similar manner to calling the patch.bbclass to locate patches that were listed on the SRC_URI, it is also useful to query about 'other' items that are on the SRC_URI. In the case of linux-yocto, it allows us to know about kernel features that were specific on the URI and then apply them to the current tree. (From OE-Core rev: 3e2ce87566124db8c78472f9a4f00ab26410f213) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
44f0a2cfc5
commit
568bdc78f9
@@ -10,6 +10,16 @@ def find_patches(d):
|
|||||||
|
|
||||||
return patch_list
|
return patch_list
|
||||||
|
|
||||||
|
def find_sccs(d):
|
||||||
|
sources=src_patches(d, True)
|
||||||
|
sources_list=[]
|
||||||
|
for s in sources:
|
||||||
|
base, ext = os.path.splitext(os.path.basename(s))
|
||||||
|
if ext and ext in ('.scc'):
|
||||||
|
sources_list.append(s)
|
||||||
|
|
||||||
|
return sources_list
|
||||||
|
|
||||||
do_patch() {
|
do_patch() {
|
||||||
cd ${S}
|
cd ${S}
|
||||||
if [ -f ${WORKDIR}/defconfig ]; then
|
if [ -f ${WORKDIR}/defconfig ]; then
|
||||||
@@ -42,6 +52,7 @@ do_patch() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
patches="${@" ".join(find_patches(d))}"
|
patches="${@" ".join(find_patches(d))}"
|
||||||
|
sccs="${@" ".join(find_sccs(d))}"
|
||||||
|
|
||||||
# This loops through all patches, and looks for directories that do
|
# This loops through all patches, and looks for directories that do
|
||||||
# not already have feature descriptions. If a directory doesn't have
|
# not already have feature descriptions. If a directory doesn't have
|
||||||
@@ -81,6 +92,16 @@ do_patch() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# look for any found scc files, and ensure they are added to the list
|
||||||
|
# of directories passsed to updateme
|
||||||
|
for s in ${sccs}; do
|
||||||
|
sdir=`dirname ${s}`
|
||||||
|
echo ${patch_dirs} | grep -q ${sdir}
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
patch_dirs="${patch_dirs} ${sdir}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# go through the patch directories and look for any scc feature files
|
# go through the patch directories and look for any scc feature files
|
||||||
# that were constructed above. If one is found, rename it to ".scc" so
|
# that were constructed above. If one is found, rename it to ".scc" so
|
||||||
# the kernel patching can see it.
|
# the kernel patching can see it.
|
||||||
|
|||||||
Reference in New Issue
Block a user