Recently individual components and LLD sources have been combined into a single PDK repo. Use this class to specify the common source. Also use this class to keep the sources separate from each other when building. This keeps the build identical to previous recipes while keeping control on interdependencies.
Signed-off-by: Jacob Stiffler <j-stiff...@ti.com> --- classes/ti-pdk-fetch.bbclass | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 classes/ti-pdk-fetch.bbclass diff --git a/classes/ti-pdk-fetch.bbclass b/classes/ti-pdk-fetch.bbclass new file mode 100644 index 0000000..f5ab301 --- /dev/null +++ b/classes/ti-pdk-fetch.bbclass @@ -0,0 +1,30 @@ +TI_PDK_GIT_URI ?= "<TBD>" +TI_PDK_GIT_BRANCH ?= "master" +TI_PDK_GIT_PROTOCOL ?= "git" +TI_PDK_SRCREV ?= "<TBD>" + +TI_PDK_SRC = "_tmp_pdk" +SRC_URI = "${TI_PDK_GIT_URI};branch=${TI_PDK_GIT_BRANCH};protocol=${TI_PDK_GIT_PROTOCOL};destsuffix=${TI_PDK_SRC}" +SRCREV = "${TI_PDK_SRCREV}" + +TI_PDK_COMP ?= "" +TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}" + +S = "${WORKDIR}/git/${TI_PDK_COMP_PATH}" + +# Extract only required sources from PDK +# +# ... perhaps do something similiar to the kernel and STAGING_KERNEL_DIR... +# ... then symlink the individual component... +python do_unpack_append() { + if len(d.getVar('TI_PDK_COMP') or '') > 0: + import subprocess + + src = os.path.join(d.getVar('TI_PDK_SRC'),'packages',d.getVar('TI_PDK_COMP_PATH')) + + # Package up only the required sources + cmd = 'tar -cf - -C %s -p -S . | tar -xf - -C %s' % (src, d.getVar('S')) + subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) + + bb.utils.remove(d.getVar('TI_PDK_SRC'), recurse=True) +} -- 2.7.4 -- _______________________________________________ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti