diff options
author | Jacob Stiffler <j-stiffler@ti.com> | 2015-11-06 19:25:55 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2015-11-09 14:31:54 -0500 |
commit | dac64c6888dbda98ca298c92d72b2f75255ac852 (patch) | |
tree | 819506f87cb05145e4310e13fcff5b37758357b4 | |
parent | d5e19628cf33afdba7f154f5b346933ccaa80b28 (diff) | |
download | meta-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.bb | 97 |
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 | ||
5 | LIC_FILES_CHKSUM = "file://PRU-Package-v4.0-Manifest.html;md5=5ea937e4ff2c924a735d42e61ad8cbe3" | 5 | LIC_FILES_CHKSUM = "file://PRU-Package-v4.0-Manifest.html;md5=5ea937e4ff2c924a735d42e61ad8cbe3" |
6 | 6 | ||
7 | inherit update-alternatives | ||
8 | |||
7 | BRANCH = "master" | 9 | BRANCH = "master" |
8 | SRC_URI = "git://git.ti.com/pru-software-support-package/pru-software-support-package.git;protocol=git;branch=${BRANCH}" | 10 | SRC_URI = "git://git.ti.com/pru-software-support-package/pru-software-support-package.git;protocol=git;branch=${BRANCH}" |
9 | SRCREV = "476289eb7c3a91977bae84aea55c56f3120b48ea" | 11 | SRCREV = "476289eb7c3a91977bae84aea55c56f3120b48ea" |
10 | 12 | ||
11 | PV = "4.0.0.0" | 13 | PV = "4.0.0.0" |
12 | PR = "r0" | 14 | PR = "r1" |
13 | 15 | ||
14 | require recipes-ti/includes/ti-paths.inc | 16 | require recipes-ti/includes/ti-paths.inc |
15 | 17 | ||
16 | COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15" | 18 | COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15" |
17 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 19 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
18 | 20 | ||
21 | PACKAGES_prepend = " \ | ||
22 | ${PN}-halt \ | ||
23 | ${PN}-rpmsg-echo \ | ||
24 | " | ||
25 | |||
26 | RDEPENDS_${PN}_append = " \ | ||
27 | ${PN}-halt \ | ||
28 | ${PN}-rpmsg-echo \ | ||
29 | " | ||
30 | |||
19 | DEPENDS = "ti-cgt-pru-native" | 31 | DEPENDS = "ti-cgt-pru-native" |
20 | 32 | ||
21 | S = "${WORKDIR}/git" | 33 | S = "${WORKDIR}/git" |
@@ -24,6 +36,10 @@ export PRU_CGT = "${TI_CGT_PRU_INSTALL_DIR}" | |||
24 | 36 | ||
25 | SUBDIRS = "examples pru_cape/pru_fw lib/src labs" | 37 | SUBDIRS = "examples pru_cape/pru_fw lib/src labs" |
26 | 38 | ||
39 | PLATFORM_ti33x = "am335x" | ||
40 | PLATFORM_ti43x = "am437x" | ||
41 | PLATFORM_omap-a15 = "am572x" | ||
42 | |||
27 | do_compile() { | 43 | do_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 | ||
34 | do_install_ti33x() { | 50 | do_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 | |||
56 | do_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 | ||
43 | do_install_ti43x() { | 64 | do_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 | ||
52 | do_install_omap-a15() { | 72 | do_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 | ||
64 | FILES_${PN} += "/lib/firmware" | 83 | FILES_${PN}-halt = "/lib/firmware/pru/PRU_Halt.out" |
84 | FILES_${PN}-rpmsg-echo = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt*" | ||
85 | |||
86 | # Set up names for the firmwares | ||
87 | PRU_ICSS_ALTERNATIVES_ti33x = "am335x-pru0-fw am335x-pru1-fw" | ||
88 | PRU_ICSS_ALTERNATIVES_ti43x = "am437x-pru1_0-fw am437x-pru1_1-fw" | ||
89 | PRU_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 | ||
92 | ALTERNATIVE_LINK_NAME[am335x-pru0-fw] = "/lib/firmware/am335x-pru0-fw" | ||
93 | ALTERNATIVE_LINK_NAME[am335x-pru1-fw] = "/lib/firmware/am335x-pru1-fw" | ||
94 | |||
95 | ALTERNATIVE_LINK_NAME[am437x-pru1_0-fw] = "/lib/firmware/am437x-pru1_0-fw" | ||
96 | ALTERNATIVE_LINK_NAME[am437x-pru1_1-fw] = "/lib/firmware/am437x-pru1_1-fw" | ||
97 | |||
98 | ALTERNATIVE_LINK_NAME[am57xx-pru1_0-fw] = "/lib/firmware/am57xx-pru1_0-fw" | ||
99 | ALTERNATIVE_LINK_NAME[am57xx-pru1_1-fw] = "/lib/firmware/am57xx-pru1_1-fw" | ||
100 | ALTERNATIVE_LINK_NAME[am57xx-pru2_0-fw] = "/lib/firmware/am57xx-pru2_0-fw" | ||
101 | ALTERNATIVE_LINK_NAME[am57xx-pru2_1-fw] = "/lib/firmware/am57xx-pru2_1-fw" | ||
102 | |||
103 | # Create the pru-icss-halt firmware alternatives | ||
104 | ALTERNATIVE_pru-icss-halt = "${PRU_ICSS_ALTERNATIVES}" | ||
105 | |||
106 | ALTERNATIVE_TARGET_pru-icss-halt[am335x-pru0-fw] = "/lib/firmware/pru/PRU_Halt.out" | ||
107 | ALTERNATIVE_TARGET_pru-icss-halt[am335x-pru1-fw] = "/lib/firmware/pru/PRU_Halt.out" | ||
108 | |||
109 | ALTERNATIVE_TARGET_pru-icss-halt[am437x-pru1_0-fw] = "/lib/firmware/pru/PRU_Halt.out" | ||
110 | ALTERNATIVE_TARGET_pru-icss-halt[am437x-pru1_1-fw] = "/lib/firmware/pru/PRU_Halt.out" | ||
111 | |||
112 | ALTERNATIVE_TARGET_pru-icss-halt[am57xx-pru1_0-fw] = "/lib/firmware/pru/PRU_Halt.out" | ||
113 | ALTERNATIVE_TARGET_pru-icss-halt[am57xx-pru1_1-fw] = "/lib/firmware/pru/PRU_Halt.out" | ||
114 | ALTERNATIVE_TARGET_pru-icss-halt[am57xx-pru2_0-fw] = "/lib/firmware/pru/PRU_Halt.out" | ||
115 | ALTERNATIVE_TARGET_pru-icss-halt[am57xx-pru2_1-fw] = "/lib/firmware/pru/PRU_Halt.out" | ||
116 | |||
117 | ALTERNATIVE_PRIORITY_pru-icss-halt = "50" | ||
118 | |||
119 | # Craete the pru-icss-rpmsg-echo firmware alternatives | ||
120 | ALTERNATIVE_pru-icss-rpmsg-echo = "${PRU_ICSS_ALTERNATIVES}" | ||
121 | |||
122 | ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am335x-pru0-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt0.out" | ||
123 | ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am335x-pru1-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1.out" | ||
124 | |||
125 | ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am437x-pru1_0-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt0.out" | ||
126 | ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am437x-pru1_1-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1.out" | ||
127 | |||
128 | ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am57xx-pru1_0-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_0.out" | ||
129 | ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am57xx-pru1_1-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_1.out" | ||
130 | ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am57xx-pru2_0-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_0.out" | ||
131 | ALTERNATIVE_TARGET_pru-icss-rpmsg-echo[am57xx-pru2_1-fw] = "/lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_1.out" | ||
132 | |||
133 | ALTERNATIVE_PRIORITY_pru-icss-rpmsg-echo = "100" | ||
134 | |||
135 | ALLOW_EMPTY_${PN} = "1" | ||
65 | 136 | ||
66 | INSANE_SKIP_${PN} = "arch" | 137 | # This installs PRU firmware, so skip "arch" QA check |
138 | INSANE_SKIP_${PN}-halt = "arch" | ||
139 | INSANE_SKIP_${PN}-rpmsg-echo = "arch" | ||