summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChase Maupin <Chase.Maupin@ti.com>2013-04-18 13:10:00 -0500
committerDenys Dmytriyenko <denys@ti.com>2013-04-18 15:43:25 -0400
commit2ad1fd65b8cfc8b183bcaa4d28f2064aa4fa2229 (patch)
treec4932c5ff39400937b5a8a9f1055f9ae54888b6a
parent7dc90eb9e275f5f7231706a367401a694c00c035 (diff)
downloadmeta-ti-2ad1fd65b8cfc8b183bcaa4d28f2064aa4fa2229.tar.gz
am33x-cm3: use init script to load firmware
* The PM firmware is now loaded using an init script so make the init script installation part of the firmware package. * Fix up the SRC_URI to the proper format. Signed-off-by: Chase Maupin <Chase.Maupin@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rw-r--r--recipes-bsp/ti/am33x-cm3/init-am33x-cm36
-rw-r--r--recipes-bsp/ti/am33x-cm3_git.bb17
2 files changed, 21 insertions, 2 deletions
diff --git a/recipes-bsp/ti/am33x-cm3/init-am33x-cm3 b/recipes-bsp/ti/am33x-cm3/init-am33x-cm3
new file mode 100644
index 00000000..56c17b33
--- /dev/null
+++ b/recipes-bsp/ti/am33x-cm3/init-am33x-cm3
@@ -0,0 +1,6 @@
1#!/bin/sh
2
3# Load the PM CM3 firmware
4echo 1 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading
5cat /lib/firmware/am335x-pm-firmware.bin > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/data
6echo 0 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading
diff --git a/recipes-bsp/ti/am33x-cm3_git.bb b/recipes-bsp/ti/am33x-cm3_git.bb
index 247ba4d8..169789e5 100644
--- a/recipes-bsp/ti/am33x-cm3_git.bb
+++ b/recipes-bsp/ti/am33x-cm3_git.bb
@@ -4,9 +4,18 @@ LICENSE = "TI-BSD"
4LIC_FILES_CHKSUM = "file://License.txt;md5=858099c817e47ea63559fc6b67ae8d91" 4LIC_FILES_CHKSUM = "file://License.txt;md5=858099c817e47ea63559fc6b67ae8d91"
5 5
6PV = "04.06.00.07" 6PV = "04.06.00.07"
7PR = "r1"
7SRCREV = "cf07b841d6e8c5e026eecb259d143f3dff412c8e" 8SRCREV = "cf07b841d6e8c5e026eecb259d143f3dff412c8e"
9BRANCH ?= "master"
8 10
9SRC_URI = "git://arago-project.org/git/projects/am33x-cm3.git" 11INITSCRIPT_NAME = "am335x-pm-firmware-load"
12INITSCRIPT_PARAMS = "defaults 96"
13
14inherit update-rc.d
15
16SRC_URI = "git://arago-project.org/git/projects/am33x-cm3.git;protocol=git;branch=${BRANCH} \
17 file://init-am33x-cm3 \
18 "
10 19
11S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
12 21
@@ -17,7 +26,11 @@ do_compile() {
17do_install() { 26do_install() {
18 install -d ${D}${base_libdir}/firmware 27 install -d ${D}${base_libdir}/firmware
19 install -m 0644 bin/am335x-pm-firmware.bin ${D}${base_libdir}/firmware/ 28 install -m 0644 bin/am335x-pm-firmware.bin ${D}${base_libdir}/firmware/
29
30 # Install the init script to load the PM firmware at boot
31 install -d ${D}${sysconfdir}/init.d
32 install -m 0755 ${WORKDIR}/init-am33x-cm3 ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
20} 33}
21 34
22FILES_${PN} = "${base_libdir}/firmware" 35FILES_${PN} += "${base_libdir}/firmware"
23 36