]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/commitdiff
am33x-cm3: use init script to load firmware
authorChase Maupin <Chase.Maupin@ti.com>
Thu, 18 Apr 2013 18:10:00 +0000 (13:10 -0500)
committerDenys Dmytriyenko <denys@ti.com>
Thu, 18 Apr 2013 19:44:04 +0000 (15:44 -0400)
* 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>
recipes-bsp/ti/am33x-cm3/init-am33x-cm3 [new file with mode: 0644]
recipes-bsp/ti/am33x-cm3_git.bb

diff --git a/recipes-bsp/ti/am33x-cm3/init-am33x-cm3 b/recipes-bsp/ti/am33x-cm3/init-am33x-cm3
new file mode 100644 (file)
index 0000000..56c17b3
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Load the PM CM3 firmware
+echo 1 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading
+cat /lib/firmware/am335x-pm-firmware.bin > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/data
+echo 0 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading
index 247ba4d8d91f2af0669f724a27e7f7f8aaf174e5..169789e5a428e5c5217dc16b946e4a6c69e8f7a3 100644 (file)
@@ -4,9 +4,18 @@ LICENSE = "TI-BSD"
 LIC_FILES_CHKSUM = "file://License.txt;md5=858099c817e47ea63559fc6b67ae8d91"
 
 PV = "04.06.00.07"
 LIC_FILES_CHKSUM = "file://License.txt;md5=858099c817e47ea63559fc6b67ae8d91"
 
 PV = "04.06.00.07"
+PR = "r1"
 SRCREV = "cf07b841d6e8c5e026eecb259d143f3dff412c8e"
 SRCREV = "cf07b841d6e8c5e026eecb259d143f3dff412c8e"
+BRANCH ?= "master"
 
 
-SRC_URI = "git://arago-project.org/git/projects/am33x-cm3.git"
+INITSCRIPT_NAME = "am335x-pm-firmware-load"
+INITSCRIPT_PARAMS = "defaults 96"
+
+inherit update-rc.d
+
+SRC_URI = "git://arago-project.org/git/projects/am33x-cm3.git;protocol=git;branch=${BRANCH} \
+           file://init-am33x-cm3 \
+          "
 
 S = "${WORKDIR}/git"
 
 
 S = "${WORKDIR}/git"
 
@@ -17,7 +26,11 @@ do_compile() {
 do_install() {
        install -d ${D}${base_libdir}/firmware
        install -m 0644 bin/am335x-pm-firmware.bin ${D}${base_libdir}/firmware/
 do_install() {
        install -d ${D}${base_libdir}/firmware
        install -m 0644 bin/am335x-pm-firmware.bin ${D}${base_libdir}/firmware/
+
+       # Install the init script to load the PM firmware at boot
+       install -d ${D}${sysconfdir}/init.d
+       install -m 0755 ${WORKDIR}/init-am33x-cm3 ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
 }
 
 }
 
-FILES_${PN} = "${base_libdir}/firmware"
+FILES_${PN} += "${base_libdir}/firmware"