summaryrefslogtreecommitdiffstats
path: root/bsp/meta-ti/classes
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 14:58:56 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 14:58:56 +0900
commit4204309872da5cb401cbb2729d9e2d4869a87f42 (patch)
treec7415e8600205e40ff7e91e8e5f4c411f30329f2 /bsp/meta-ti/classes
parent5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (diff)
Diffstat (limited to 'bsp/meta-ti/classes')
-rw-r--r--bsp/meta-ti/classes/ti-pdk-fetch.bbclass46
-rw-r--r--bsp/meta-ti/classes/ti-pdk.bbclass11
2 files changed, 53 insertions, 4 deletions
diff --git a/bsp/meta-ti/classes/ti-pdk-fetch.bbclass b/bsp/meta-ti/classes/ti-pdk-fetch.bbclass
new file mode 100644
index 00000000..7108d001
--- /dev/null
+++ b/bsp/meta-ti/classes/ti-pdk-fetch.bbclass
@@ -0,0 +1,46 @@
+TI_PDK_GIT_URI ?= "git://git.ti.com/processor-sdk/pdk.git"
+TI_PDK_GIT_BRANCH ?= "master"
+TI_PDK_GIT_PROTOCOL ?= "git"
+TI_PDK_SRCREV ?= "5ddf121a09af4ac58a18103848d4ab8e741e23d6"
+
+TI_PDK_VERSION ?= "2020.1.22"
+
+PV = "${TI_PDK_VERSION}"
+
+TI_PDK_COMP ?= ""
+TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}"
+
+TI_PDK_SOURCE_PN = "ti-pdk-source"
+TI_PDK_SOURCE_WORKDIR = "${TMPDIR}/work-shared/ti-pdk-${PV}"
+TI_PDK_SOURCE = "${TI_PDK_SOURCE_WORKDIR}/git"
+
+S = "${WORKDIR}/git/${TI_PDK_COMP_PATH}"
+
+# Hard-link only required sources from PDK
+python do_unpack_append() {
+ if len(d.getVar('TI_PDK_COMP') or '') > 0:
+ import shutil
+
+ # Get src/dst paths
+ src = os.path.join(d.getVar('TI_PDK_SOURCE'),'packages',d.getVar('TI_PDK_COMP_PATH'))
+ s = d.getVar('S')
+
+ # Set up the directory structure, except for the root of the sources
+ # hard-linked.
+ bb.utils.mkdirhier(s)
+ os.rmdir(s)
+
+ # Recursively hard-link the sources
+ shutil.copytree(src, s, copy_function=os.link)
+
+ # Recursively hard-link the git directory
+ shutil.copytree(os.path.join(d.getVar('TI_PDK_SOURCE'),'.git'), os.path.join(s,'.git'), copy_function=os.link)
+}
+
+# Make sure that ti-pdk-source is unpacked before we set up the hardlinks.
+python __anonymous () {
+ pn = d.getVar('PN')
+ pdk_src_pn = d.getVar('TI_PDK_SOURCE_PN')
+ if pn != pdk_src_pn:
+ d.appendVarFlag('do_unpack', 'depends', ' ${TI_PDK_SOURCE_PN}:do_unpack')
+}
diff --git a/bsp/meta-ti/classes/ti-pdk.bbclass b/bsp/meta-ti/classes/ti-pdk.bbclass
index f0e6f2d2..a07fdbb3 100644
--- a/bsp/meta-ti/classes/ti-pdk.bbclass
+++ b/bsp/meta-ti/classes/ti-pdk.bbclass
@@ -9,8 +9,10 @@ DEPENDS_append_omap-a15 = " ti-cgt-arm-native"
DEPENDS_remove_ti33x = "ti-cgt6x-native"
DEPENDS_remove_ti43x = "ti-cgt6x-native"
DEPENDS_append_omapl1 = " ti-cgt-arm-native"
-DEPENDS_remove_k3 = "gcc-arm-none-eabi-native ti-cgt6x-native"
-DEPENDS_append_k3 = " ti-cgt-arm-native gcc-linaro-baremetal-aarch64-native"
+DEPENDS_remove_am65xx = "gcc-arm-none-eabi-native ti-cgt6x-native"
+DEPENDS_append_am65xx = " ti-cgt-arm-native gcc-linaro-baremetal-aarch64-native"
+DEPENDS_remove_j7-evm = "gcc-arm-none-eabi-native"
+DEPENDS_append_j7-evm = " ti-cgt-arm-native gcc-linaro-baremetal-aarch64-native ti-cgt7x-native"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
@@ -43,6 +45,7 @@ export TOOLCHAIN_PATH_A15 = "${GCC_ARM_NONE_TOOLCHAIN}"
export TOOLCHAIN_PATH_M4 = "${M4_TOOLCHAIN_INSTALL_DIR}"
export TOOLCHAIN_PATH_Arm9 = "${M4_TOOLCHAIN_INSTALL_DIR}"
export C6X_GEN_INSTALL_PATH = "${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x"
+export C7X_GEN_INSTALL_PATH = "${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c7x"
export TOOLCHAIN_PATH_EVE = "${STAGING_DIR_NATIVE}/usr/share/ti/cgt-arp32"
export CL_PRU_INSTALL_PATH = "${TI_CGT_PRU_INSTALL_DIR}"
export TOOLCHAIN_PATH_GCC_ARCH64 = "${GCC_LINARO_BAREMETAL_AARCH64_TOOLCHAIN}"
@@ -59,7 +62,7 @@ export SECTTI="perl ${CG_XML_INSTALL_DIR}/ofd/sectti.pl"
TI_PDK_XDCMAKE ?= "1"
# By default, only build the cores with available toolchains
-TI_PDK_LIMIT_CORES ?= "a15_0 ipu1_0 ipu1_1 ipu2_0 ipu2_1 c66x c66xdsp_1 c66xdsp_2 arm9_0 c674x a9host a8host pru_0 pru_1"
+TI_PDK_LIMIT_CORES ?= "a15_0 ipu1_0 ipu1_1 ipu2_0 ipu2_1 mpu1_0 mcu1_0 mcu1_1 mcu2_0 mcu2_1 mcu3_0 mcu3_1 c66x c66xdsp_1 c66xdsp_2 c7x_1 arm9_0 c674x a9host a8host pru_0 pru_1"
TI_PDK_LIMIT_SOCS ?= ""
TI_PDK_LIMIT_BOARDS ?= ""
TI_PDK_MAKE_TARGET ?= "release"
@@ -68,7 +71,7 @@ TI_PDK_DOXYGEN_SUPPORT ?= "1"
TI_PDK_XDC_ARGS ?= "${TI_PDK_LIMIT_SOCS}"
-PARALLEL_XDC = "--jobs=${BB_NUMBER_THREADS}"
+PARALLEL_XDC = "${@oe.utils.parallel_make_argument(d, '--jobs=%d')}"
PARALLEL_MAKE = ""
def get_doxygen_support(d):