All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] am33x-cm3: add firmware for am33x suspend/resume
@ 2012-04-10 13:09 Koen Kooi
  2012-04-12 20:09 ` Denys Dmytriyenko
  0 siblings, 1 reply; 5+ messages in thread
From: Koen Kooi @ 2012-04-10 13:09 UTC (permalink / raw)
  To: meta-ti; +Cc: denys

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 recipes-bsp/ti/am33x-cm3_git.bb |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 recipes-bsp/ti/am33x-cm3_git.bb

diff --git a/recipes-bsp/ti/am33x-cm3_git.bb b/recipes-bsp/ti/am33x-cm3_git.bb
new file mode 100644
index 0000000..247ba4d
--- /dev/null
+++ b/recipes-bsp/ti/am33x-cm3_git.bb
@@ -0,0 +1,23 @@
+DESCRIPTION = "Cortex-M3 binary blob for suspend-resume"
+
+LICENSE = "TI-BSD"
+LIC_FILES_CHKSUM = "file://License.txt;md5=858099c817e47ea63559fc6b67ae8d91"
+
+PV = "04.06.00.07"
+SRCREV = "cf07b841d6e8c5e026eecb259d143f3dff412c8e"
+
+SRC_URI = "git://arago-project.org/git/projects/am33x-cm3.git"
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+	make CC="${TARGET_CC}" CROSS_COMPILE="${TARGET_PREFIX}"
+}
+
+do_install() {
+	install -d ${D}${base_libdir}/firmware
+	install -m 0644 bin/am335x-pm-firmware.bin ${D}${base_libdir}/firmware/
+}
+
+FILES_${PN} = "${base_libdir}/firmware"
+
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] am33x-cm3: add firmware for am33x suspend/resume
  2012-04-10 13:09 [PATCH] am33x-cm3: add firmware for am33x suspend/resume Koen Kooi
@ 2012-04-12 20:09 ` Denys Dmytriyenko
  2012-04-12 20:21   ` Koen Kooi
  0 siblings, 1 reply; 5+ messages in thread
From: Denys Dmytriyenko @ 2012-04-12 20:09 UTC (permalink / raw)
  To: Koen Kooi; +Cc: meta-ti

Koen,

I'm commenting on both of your patches together...

am33x-cm3:
> +++ b/recipes-bsp/ti/am33x-cm3_git.bb
> 
> +do_install() {
> +	install -d ${D}${base_libdir}/firmware
> +	install -m 0644 bin/am335x-pm-firmware.bin ${D}${base_libdir}/firmware/
> +}


linux-ti33x-psp:
> This fixes most PM operations: cpufreq, cpuidle and suspend. Resume does not 
> work on beaglebone, but 3 out of 4 ain't bad :)
> 
> The M3 firmware needed for suspend/resume is used as a binary, building it 
> from source and including it from sysroots is planned for future commits.
> 
> +++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
> 
> +do_compile_prepend() {
> +       cp ${WORKDIR}/am335x-pm-firmware.bin ${S}/firmware/
> +}


Have you looked at how it's done in Arago/AM-SDK? The firmware is staged in 
the sysroots and gets picked up by the kernel:

do_install() {
    install -d ${STAGING_FIRMWARE_DIR}/am33x-cm3
    install ${S}/bin/am335x-pm-firmware.bin {STAGING_FIRMWARE_DIR}/am33x-cm3/
}

Where the kernel then copies it to ${S}/firmware:

# Copy the am33x-cm3 firmware if it is available
do_compile_prepend() {
    if [ -e "${STAGING_FIRMWARE_DIR}/am33x-cm3/am335x-pm-firmware.bin" ]
    then
        cp "${STAGING_FIRMWARE_DIR}/am33x-cm3/am335x-pm-firmware.bin" ${S}/firmware"
    fi
}

It's not the most elegant solution either, but at least it gets around the 
need to keep the binary version of the firmware in the repository with the 
kernel recipe...

Do you want me to make similar changes to your patches? Or do you have any 
arguments against this approach?

-- 
Denys


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] am33x-cm3: add firmware for am33x suspend/resume
  2012-04-12 20:09 ` Denys Dmytriyenko
@ 2012-04-12 20:21   ` Koen Kooi
  2012-04-17  7:49     ` Koen Kooi
  2012-04-18 17:23     ` Denys Dmytriyenko
  0 siblings, 2 replies; 5+ messages in thread
From: Koen Kooi @ 2012-04-12 20:21 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-ti


Op 12 apr. 2012, om 22:09 heeft Denys Dmytriyenko het volgende geschreven:

> Koen,
> 
> I'm commenting on both of your patches together...
> 
> am33x-cm3:
>> +++ b/recipes-bsp/ti/am33x-cm3_git.bb
>> 
>> +do_install() {
>> +	install -d ${D}${base_libdir}/firmware
>> +	install -m 0644 bin/am335x-pm-firmware.bin ${D}${base_libdir}/firmware/
>> +}
> 
> 
> linux-ti33x-psp:
>> This fixes most PM operations: cpufreq, cpuidle and suspend. Resume does not 
>> work on beaglebone, but 3 out of 4 ain't bad :)
>> 
>> The M3 firmware needed for suspend/resume is used as a binary, building it 
>> from source and including it from sysroots is planned for future commits.
>> 
>> +++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
>> 
>> +do_compile_prepend() {
>> +       cp ${WORKDIR}/am335x-pm-firmware.bin ${S}/firmware/
>> +}
> 
> 
> Have you looked at how it's done in Arago/AM-SDK?

No, I only looked at meta-ti :)

> The firmware is staged in 
> the sysroots and gets picked up by the kernel:
> 
> do_install() {
>    install -d ${STAGING_FIRMWARE_DIR}/am33x-cm3
>    install ${S}/bin/am335x-pm-firmware.bin {STAGING_FIRMWARE_DIR}/am33x-cm3/
> }
> 
> Where the kernel then copies it to ${S}/firmware:
> 
> # Copy the am33x-cm3 firmware if it is available
> do_compile_prepend() {
>    if [ -e "${STAGING_FIRMWARE_DIR}/am33x-cm3/am335x-pm-firmware.bin" ]
>    then
>        cp "${STAGING_FIRMWARE_DIR}/am33x-cm3/am335x-pm-firmware.bin" ${S}/firmware"
>    fi
> }
> 
> It's not the most elegant solution either, but at least it gets around the 
> need to keep the binary version of the firmware in the repository with the 
> kernel recipe...
> 
> Do you want me to make similar changes to your patches? Or do you have any 
> arguments against this approach?

Yes, you're not allowed to touch sysroots from inside do_install since that will break sstate, which is why I added regular recipes first to get it working and fix it properly later.

It's a bit academic at this point, since you need to get lucky in the silicon bingo to have suspend/resume working on am335x anyway. I can disable CONFIG_SUSPEND and remove the copying bits if you want.

regards,

Koen

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] am33x-cm3: add firmware for am33x suspend/resume
  2012-04-12 20:21   ` Koen Kooi
@ 2012-04-17  7:49     ` Koen Kooi
  2012-04-18 17:23     ` Denys Dmytriyenko
  1 sibling, 0 replies; 5+ messages in thread
From: Koen Kooi @ 2012-04-17  7:49 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-ti


Op 12 apr. 2012, om 22:21 heeft Koen Kooi het volgende geschreven:

> 
> Op 12 apr. 2012, om 22:09 heeft Denys Dmytriyenko het volgende geschreven:
> 
>> Koen,
>> 
>> I'm commenting on both of your patches together...
>> 
>> am33x-cm3:
>>> +++ b/recipes-bsp/ti/am33x-cm3_git.bb
>>> 
>>> +do_install() {
>>> +	install -d ${D}${base_libdir}/firmware
>>> +	install -m 0644 bin/am335x-pm-firmware.bin ${D}${base_libdir}/firmware/
>>> +}
>> 
>> 
>> linux-ti33x-psp:
>>> This fixes most PM operations: cpufreq, cpuidle and suspend. Resume does not 
>>> work on beaglebone, but 3 out of 4 ain't bad :)
>>> 
>>> The M3 firmware needed for suspend/resume is used as a binary, building it 
>>> from source and including it from sysroots is planned for future commits.
>>> 
>>> +++ b/recipes-kernel/linux/linux-ti33x-psp_3.2.bb
>>> 
>>> +do_compile_prepend() {
>>> +       cp ${WORKDIR}/am335x-pm-firmware.bin ${S}/firmware/
>>> +}
>> 
>> 
>> Have you looked at how it's done in Arago/AM-SDK?
> 
> No, I only looked at meta-ti :)
> 
>> The firmware is staged in 
>> the sysroots and gets picked up by the kernel:
>> 
>> do_install() {
>>   install -d ${STAGING_FIRMWARE_DIR}/am33x-cm3
>>   install ${S}/bin/am335x-pm-firmware.bin {STAGING_FIRMWARE_DIR}/am33x-cm3/
>> }
>> 
>> Where the kernel then copies it to ${S}/firmware:
>> 
>> # Copy the am33x-cm3 firmware if it is available
>> do_compile_prepend() {
>>   if [ -e "${STAGING_FIRMWARE_DIR}/am33x-cm3/am335x-pm-firmware.bin" ]
>>   then
>>       cp "${STAGING_FIRMWARE_DIR}/am33x-cm3/am335x-pm-firmware.bin" ${S}/firmware"
>>   fi
>> }
>> 
>> It's not the most elegant solution either, but at least it gets around the 
>> need to keep the binary version of the firmware in the repository with the 
>> kernel recipe...
>> 
>> Do you want me to make similar changes to your patches? Or do you have any 
>> arguments against this approach?
> 
> Yes, you're not allowed to touch sysroots from inside do_install since that will break sstate, which is why I added regular recipes first to get it working and fix it properly later.
> 
> It's a bit academic at this point, since you need to get lucky in the silicon bingo to have suspend/resume working on am335x anyway. I can disable CONFIG_SUSPEND and remove the copying bits if you want.

ping

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] am33x-cm3: add firmware for am33x suspend/resume
  2012-04-12 20:21   ` Koen Kooi
  2012-04-17  7:49     ` Koen Kooi
@ 2012-04-18 17:23     ` Denys Dmytriyenko
  1 sibling, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2012-04-18 17:23 UTC (permalink / raw)
  To: Koen Kooi; +Cc: meta-ti

On Thu, Apr 12, 2012 at 10:21:14PM +0200, Koen Kooi wrote:
> 
> Op 12 apr. 2012, om 22:09 heeft Denys Dmytriyenko het volgende geschreven:
> 
> > It's not the most elegant solution either, but at least it gets around the 
> > need to keep the binary version of the firmware in the repository with the 
> > kernel recipe...
> > 
> > Do you want me to make similar changes to your patches? Or do you have any 
> > arguments against this approach?
> 
> Yes, you're not allowed to touch sysroots from inside do_install since that 
> will break sstate, which is why I added regular recipes first to get it 
> working and fix it properly later.
> 
> It's a bit academic at this point, since you need to get lucky in the 
> silicon bingo to have suspend/resume working on am335x anyway. I can disable 
> CONFIG_SUSPEND and remove the copying bits if you want.

Ok, I pushed it as is and will look into the staging issue...

-- 
Denys


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-18 17:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 13:09 [PATCH] am33x-cm3: add firmware for am33x suspend/resume Koen Kooi
2012-04-12 20:09 ` Denys Dmytriyenko
2012-04-12 20:21   ` Koen Kooi
2012-04-17  7:49     ` Koen Kooi
2012-04-18 17:23     ` Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.