am33x-cm3: use init script to load firmware
PATCH 1/2 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 <[email protected]>
--- recipes-bsp/ti/am33x-cm3/init-am33x-cm3 | 6 ++++++ recipes-bsp/ti/am33x-cm3_git.bb | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 recipes-bsp/ti/am33x-cm3/init-am33x-cm3
recipes-bsp/ti/am33x-cm3/init-am33x-cm3 new file +6 -0
@@ -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
recipes-bsp/ti/am33x-cm3_git.bb +15 -2
@@ -4,9 +4,18 @@ LICENSE = "TI-BSD" LIC_FILES_CHKSUM = "file://License.txt;md5=858099c817e47ea63559fc6b67ae8d91" PV = "04.06.00.07" +PR = "r1" 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"
@@ -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/ + + # 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"
Signature · 1 line
1.7.0.4
PATCH 2/2 linux-ti-staging: make cm3 firmware a run-time dependency
* Make the am33x-cm3 firmware a run-time dependency instead of build time since it is no longer required at build time.
Signed-off-by Chase Maupin <[email protected]>
--- recipes-kernel/linux/linux-ti-staging_3.8.bb | 16 ++++------------ 1 files changed, 4 insertions(+), 12 deletions(-)
recipes-kernel/linux/linux-ti-staging_3.8.bb +4 -12
@@ -24,9 +24,9 @@ do_deploy_append() { require recipes-kernel/linux/linux-dtb.inc require recipes-kernel/linux/setup-defconfig.inc -# Stage the power management firmware before building the kernel -# for ti33x SOC_FAMILY devices -DEPENDS_ti33x += "am33x-cm3" +# Add a run-time dependency for the PM firmware to be installed +# on the target file system. +RDEPENDS_ti33x += "am33x-cm3" # Default is to package all dts files for ti33x devices unless building # for the specific beaglebone machine.
@@ -44,16 +44,8 @@ SRCREV = "881dfafeae47da3a8f5ff8c791753e4b4df8065b" PV = "3.8.5" # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild -MACHINE_KERNEL_PR_append = "d+gitr${SRCPV}" +MACHINE_KERNEL_PR_append = "e+gitr${SRCPV}" SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git;protocol=git;branch=${BRANCH} \ file://defconfig \ " - -# Copy the am33x-cm3 firmware if it is available for ti33x SOC_FAMILY devices -do_compile_prepend_ti33x() { - if [ -e "${STAGING_DIR_HOST}/${base_libdir}/firmware/am335x-pm-firmware.bin" ] - then - cp "${STAGING_DIR_HOST}/${base_libdir}/firmware/am335x-pm-firmware.bin" "${S}/firmware" - fi -}
Signature · 1 line
1.7.0.4
Quoted 48 lines · Chase Maupin
* The PM firmware is now loaded using an init script so make the init script installation part of the firmware package.
* Fix up theSRC_URIto the proper format.Signed-off-by Chase Maupin <[email protected]>--- recipes-bsp/ti/am33x-cm3/init-am33x-cm3 | 6 ++++++ recipes-bsp/ti/am33x-cm3_git.bb | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 recipes-bsp/ti/am33x-cm3/init-am33x-cm3recipes-bsp/ti/am33x-cm3/init-am33x-cm3 new file +6
-0@@ -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/loadingrecipes-bsp/ti/am33x-cm3_git.bb +10
-1@@ -4,9 +4,18 @@ LICENSE = "TI-BSD" LIC_FILES_CHKSUM = "file://License.txt;md5=858099c817e47ea63559fc6b67ae8d91" PV = "04.06.00.07" +PR = "r1" 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"
recipes-bsp/ti/am33x-cm3_git.bb do_compile() { · line 32
Quoted 7 lines
recipes-bsp/ti/am33x-cm3_git.bb +4
-0@@ -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/ + + # 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}
Please match the whitespaces - the above code uses tabs.
Quoted 13 lines
recipes-bsp/ti/am33x-cm3_git.bb +1
-1} -FILES_${PN} = "${base_libdir}/firmware" +FILES_${PN} += "${base_libdir}/firmware"Signature · 6 lines
1.7.0.4 _______________________________________________ meta-ti mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-ti