summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Stiffler <j-stiffler@ti.com>2015-11-06 19:25:55 +0000
committerDenys Dmytriyenko <denys@ti.com>2015-11-09 14:31:54 -0500
commitdac64c6888dbda98ca298c92d72b2f75255ac852 (patch)
tree819506f87cb05145e4310e13fcff5b37758357b4
parentd5e19628cf33afdba7f154f5b346933ccaa80b28 (diff)
downloadmeta-ti-dac64c6888dbda98ca298c92d72b2f75255ac852.tar.gz
pru-icss: install multiple example firmwares
* Create packages for the PRU_Halt and PRU_RPMsg_Echo_Interrupt example firmwares * Use update-alternatives to link these to the required firmware path Signed-off-by: Jacob Stiffler <j-stiffler@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rw-r--r--recipes-bsp/pru/pru-icss_git.bb97
1 files changed, 85 insertions, 12 deletions
diff --git a/recipes-bsp/pru/pru-icss_git.bb b/recipes-bsp/pru/pru-icss_git.bb
index b756713e..802521b4 100644
--- a/recipes-bsp/pru/pru-icss_git.bb
+++ b/recipes-bsp/pru/pru-icss_git.bb
@@ -4,18 +4,30 @@ LICENSE = "BSD-3-Clause & GPL-2.0 & PD"
4 4
5LIC_FILES_CHKSUM = "file://PRU-Package-v4.0-Manifest.html;md5=5ea937e4ff2c924a735d42e61ad8cbe3" 5LIC_FILES_CHKSUM = "file://PRU-Package-v4.0-Manifest.html;md5=5ea937e4ff2c924a735d42e61ad8cbe3"
6 6
7inherit update-alternatives
8
7BRANCH = "master" 9BRANCH = "master"
8SRC_URI = "git://git.ti.com/pru-software-support-package/pru-software-support-package.git;protocol=git;branch=${BRANCH}" 10SRC_URI = "git://git.ti.com/pru-software-support-package/pru-software-support-package.git;protocol=git;branch=${BRANCH}"
9SRCREV = "476289eb7c3a91977bae84aea55c56f3120b48ea" 11SRCREV = "476289eb7c3a91977bae84aea55c56f3120b48ea"
10 12
11PV = "4.0.0.0" 13PV = "4.0.0.0"
12PR = "r0" 14PR = "r1"
13 15
14require recipes-ti/includes/ti-paths.inc 16require recipes-ti/includes/ti-paths.inc
15 17
16COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15" 18COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15"
17PACKAGE_ARCH = "${MACHINE_ARCH}" 19PACKAGE_ARCH = "${MACHINE_ARCH}"
18 20
21PACKAGES_prepend = " \
22 ${PN}-halt \
23 ${PN}-rpmsg-echo \
24"
25
26RDEPENDS_${PN}_append = " \
27 ${PN}-halt \
28 ${PN}-rpmsg-echo \
29"
30
19DEPENDS = "ti-cgt-pru-native" 31DEPENDS = "ti-cgt-pru-native"
20 32
21S = "${WORKDIR}/git" 33S = "${WORKDIR}/git"
@@ -24,6 +36,10 @@ export PRU_CGT = "${TI_CGT_PRU_INSTALL_DIR}"
24 36
25SUBDIRS = "examples pru_cape/pru_fw lib/src labs" 37SUBDIRS = "examples pru_cape/pru_fw lib/src labs"
26 38
39PLATFORM_ti33x = "am335x"
40PLATFORM_ti43x = "am437x"
41PLATFORM_omap-a15 = "am572x"
42
27do_compile() { 43do_compile() {
28 for dir in ${SUBDIRS} 44 for dir in ${SUBDIRS}
29 do 45 do
@@ -31,36 +47,93 @@ do_compile() {
31 done 47 done
32} 48}
33 49
34do_install_ti33x() { 50do_install() {
35 install -d ${D}/lib/firmware 51 install -d ${D}/lib/firmware/pru
52 install -m 644 ${S}/examples/${PLATFORM}/PRU_Halt/gen/PRU_Halt.out \
53 ${D}/lib/firmware/pru
54}
55
56do_install_append_ti33x() {
36 for i in 0 1 57 for i in 0 1
37 do 58 do
38 install -m 0644 ${S}/examples/am335x/PRU_RPMsg_Echo_Interrupt${i}/gen/PRU_RPMsg_Echo_Interrupt${i}.out \ 59 install -m 0644 ${S}/examples/am335x/PRU_RPMsg_Echo_Interrupt${i}/gen/PRU_RPMsg_Echo_Interrupt${i}.out \
39 ${D}/lib/firmware/am335x-pru${i}-fw 60 ${D}/lib/firmware/pru
40 done 61 done
41} 62}
42 63
43do_install_ti43x() { 64do_install_append_ti43x() {
44 install -d ${D}/lib/firmware
45 for i in 0 1 65 for i in 0 1
46 do 66 do
47 install -m 0644 ${S}/examples/am437x/PRU_RPMsg_Echo_Interrupt${i}/gen/PRU_RPMsg_Echo_Interrupt${i}.out \ 67 install -m 0644 ${S}/examples/am437x/PRU_RPMsg_Echo_Interrupt${i}/gen/PRU_RPMsg_Echo_Interrupt${i}.out \
48 ${D}/lib/firmware/am437x-pru1_${i}-fw 68 ${D}/lib/firmware/pru
49 done 69 done
50} 70}
51 71
52do_install_omap-a15() { 72do_install_append_omap-a15() {
53 install -d ${D}/lib/firmware
54 for i in 1 2 73 for i in 1 2
55 do 74 do
56 for j in 0 1 75 for j in 0 1
57 do 76 do
58 install -m 0644 ${S}/examples/am572x/PRU_RPMsg_Echo_Interrupt${i}_${j}/gen/PRU_RPMsg_Echo_Interrupt${i}_${j}.out \ 77 install -m 0644 ${S}/examples/am572x/PRU_RPMsg_Echo_Interrupt${i}_${j}/gen/PRU_RPMsg_Echo_Interrupt${i}_${j}.out \
59 ${D}/lib/firmware/am57xx-pru${i}_${j}-fw 78 ${D}/lib/firmware/pru
60 done 79 done
61 done 80 done
62} 81}
63 82
64FILES_${PN} += "/lib/firmware" 83FILES_${PN}-halt = "/lib/firmware/pru/PRU_Halt.out"
84FILES_${PN}-rpmsg-echo = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt*"
85
86# Set up names for the firmwares
87PRU_ICSS_ALTERNATIVES_ti33x = "am335x-pru0-fw am335x-pru1-fw"
88PRU_ICSS_ALTERNATIVES_ti43x = "am437x-pru1_0-fw am437x-pru1_1-fw"
89PRU_ICSS_ALTERNATIVES_omap-a15 = "am57xx-pru1_0-fw am57xx-pru1_1-fw am57xx-pru2_0-fw am57xx-pru2_1-fw"
90
91# Set up link names for the firmwares
92ALTERNATIVE_LINK_NAME[am335x-pru0-fw] = "/lib/firmware/am335x-pru0-fw"
93ALTERNATIVE_LINK_NAME[am335x-pru1-fw] = "/lib/firmware/am335x-pru1-fw"
94
95ALTERNATIVE_LINK_NAME[am437x-pru1_0-fw] = "/lib/firmware/am437x-pru1_0-fw"
96ALTERNATIVE_LINK_NAME[am437x-pru1_1-fw] = "/lib/firmware/am437x-pru1_1-fw"
97
98ALTERNATIVE_LINK_NAME[am57xx-pru1_0-fw] = "/lib/firmware/am57xx-pru1_0-fw"
99ALTERNATIVE_LINK_NAME[am57xx-pru1_1-fw] = "/lib/firmware/am57xx-pru1_1-fw"
100ALTERNATIVE_LINK_NAME[am57xx-pru2_0-fw] = "/lib/firmware/am57xx-pru2_0-fw"
101ALTERNATIVE_LINK_NAME[am57xx-pru2_1-fw] = "/lib/firmware/am57xx-pru2_1-fw"
102
103# Create the pru-icss-halt firmware alternatives
104ALTERNATIVE_pru-icss-halt = "${PRU_ICSS_ALTERNATIVES}"
105
106ALTERNATIVE_TARGET_pru-icss-halt[am335x-pru0-fw] = "/lib/firmware/pru/PRU_Halt.out"
107ALTERNATIVE_TARGET_pru-icss-halt[am335x-pru1-fw] = "/lib/firmware/pru/PRU_Halt.out"
108
109ALTERNATIVE_TARGET_pru-icss-halt[am437x-pru1_0-fw] = "/lib/firmware/pru/PRU_Halt.out"
110ALTERNATIVE_TARGET_pru-icss-halt[am437x-pru1_1-fw] = "/lib/firmware/pru/PRU_Halt.out"
111
112ALTERNATIVE_TARGET_pru-icss-halt[am57xx-pru1_0-fw] = "/lib/firmware/pru/PRU_Halt.out"
113ALTERNATIVE_TARGET_pru-icss-halt[am57xx-pru1_1-fw] = "/lib/firmware/pru/PRU_Halt.out"
114ALTERNATIVE_TARGET_pru-icss-halt[am57xx-pru2_0-fw] = "/lib/firmware/pru/PRU_Halt.out"
115ALTERNATIVE_TARGET_pru-icss-halt[am57xx-pru2_1-fw] = "/lib/firmware/pru/PRU_Halt.out"
116
117ALTERNATIVE_PRIORITY_pru-icss-halt = "50"
118
119# Craete the pru-icss-rpmsg-echo firmware alternatives
120ALTERNATIVE_pru-icss-rpmsg-echo = "${PRU_ICSS_ALTERNATIVES}"
121
122ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am335x-pru0-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt0.out"
123ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am335x-pru1-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1.out"
124
125ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am437x-pru1_0-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt0.out"
126ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am437x-pru1_1-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1.out"
127
128ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am57xx-pru1_0-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_0.out"
129ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am57xx-pru1_1-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_1.out"
130ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am57xx-pru2_0-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_0.out"
131ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am57xx-pru2_1-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_1.out"
132
133ALTERNATIVE_PRIORITY_pru-icss-rpmsg-echo = "100"
134
135ALLOW_EMPTY_${PN} = "1"
65 136
66INSANE_SKIP_${PN} = "arch" 137# This installs PRU firmware, so skip "arch" QA check
138INSANE_SKIP_${PN}-halt = "arch"
139INSANE_SKIP_${PN}-rpmsg-echo = "arch"