* [Buildroot] [PATCH] package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
@ 2021-01-13 12:08 Fabio Estevam
2021-01-13 13:20 ` Romain Naour
0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2021-01-13 12:08 UTC (permalink / raw)
To: buildroot
The mainline kernel searches the coda VPU firmware inside the following
locations [1]:
/lib/firmware/
/lib/firmware/vpu/
Currently Buildroot installs the coda firmware into /lib/firmware/imx/vpu,
which is not a valid location.
Fix it to install the coda firmwares into /lib/firmware/vpu/ which
is a valid path for both mainline and NXP vendor kernels.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8af7779f3cbc1f6720d15f00abc797493710d1ab
Reported-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
package/freescale-imx/firmware-imx/firmware-imx.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk
index 7d1f42f1d87b..f65614c9a79c 100644
--- a/package/freescale-imx/firmware-imx/firmware-imx.mk
+++ b/package/freescale-imx/firmware-imx/firmware-imx.mk
@@ -116,9 +116,9 @@ endif
FIRMWARE_IMX_VPU_FW_NAME = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_IMX_VPU_FW_NAME))
ifneq ($(FIRMWARE_IMX_VPU_FW_NAME),)
define FIRMWARE_IMX_INSTALL_TARGET_VPU_FW
- mkdir -p $(TARGET_DIR)/lib/firmware/imx/vpu
+ mkdir -p $(TARGET_DIR)/lib/firmware/vpu
cp $(@D)/firmware/vpu/vpu_fw_$(FIRMWARE_IMX_VPU_FW_NAME)*.bin \
- $(TARGET_DIR)/lib/firmware/imx/vpu/
+ $(TARGET_DIR)/lib/firmware/vpu/
endef
endif
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
2021-01-13 12:08 [Buildroot] [PATCH] package/freescale-imx/firmware-imx: install the VPU firmware into a valid location Fabio Estevam
@ 2021-01-13 13:20 ` Romain Naour
2021-01-13 13:29 ` Fabio Estevam
0 siblings, 1 reply; 9+ messages in thread
From: Romain Naour @ 2021-01-13 13:20 UTC (permalink / raw)
To: buildroot
Hi Fabio,
Le 13/01/2021 ? 13:08, Fabio Estevam a ?crit?:
> The mainline kernel searches the coda VPU firmware inside the following
> locations [1]:
>
> /lib/firmware/
> /lib/firmware/vpu/
>
> Currently Buildroot installs the coda firmware into /lib/firmware/imx/vpu,
> which is not a valid location.
>
> Fix it to install the coda firmwares into /lib/firmware/vpu/ which
> is a valid path for both mainline and NXP vendor kernels.
Ok but it add a 60sec delay when we use the mainline kernel.
Best regards,
Romain
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8af7779f3cbc1f6720d15f00abc797493710d1ab
>
> Reported-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> package/freescale-imx/firmware-imx/firmware-imx.mk | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk
> index 7d1f42f1d87b..f65614c9a79c 100644
> --- a/package/freescale-imx/firmware-imx/firmware-imx.mk
> +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk
> @@ -116,9 +116,9 @@ endif
> FIRMWARE_IMX_VPU_FW_NAME = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_IMX_VPU_FW_NAME))
> ifneq ($(FIRMWARE_IMX_VPU_FW_NAME),)
> define FIRMWARE_IMX_INSTALL_TARGET_VPU_FW
> - mkdir -p $(TARGET_DIR)/lib/firmware/imx/vpu
> + mkdir -p $(TARGET_DIR)/lib/firmware/vpu
> cp $(@D)/firmware/vpu/vpu_fw_$(FIRMWARE_IMX_VPU_FW_NAME)*.bin \
> - $(TARGET_DIR)/lib/firmware/imx/vpu/
> + $(TARGET_DIR)/lib/firmware/vpu/
> endef
> endif
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
2021-01-13 13:20 ` Romain Naour
@ 2021-01-13 13:29 ` Fabio Estevam
2021-01-13 19:11 ` Romain Naour
2021-01-13 20:02 ` Romain Naour
0 siblings, 2 replies; 9+ messages in thread
From: Fabio Estevam @ 2021-01-13 13:29 UTC (permalink / raw)
To: buildroot
Hi Romain,
On Wed, Jan 13, 2021 at 10:20 AM Romain Naour <romain.naour@smile.fr> wrote:
> Ok but it add a 60sec delay when we use the mainline kernel.
Yes, not a pleasant experience.
What if we copy the VPU firmware to both locations?
/lib/firmware/
/lib/firmware/vpu/
This way mainline kernel will fetch the VPU firmware faster and NXP
vendor can also work.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
2021-01-13 13:29 ` Fabio Estevam
@ 2021-01-13 19:11 ` Romain Naour
2021-01-13 19:21 ` Fabio Estevam
2021-01-13 20:02 ` Romain Naour
1 sibling, 1 reply; 9+ messages in thread
From: Romain Naour @ 2021-01-13 19:11 UTC (permalink / raw)
To: buildroot
Hi Fabio,
Le 13/01/2021 ? 14:29, Fabio Estevam a ?crit?:
> Hi Romain,
>
> On Wed, Jan 13, 2021 at 10:20 AM Romain Naour <romain.naour@smile.fr> wrote:
>
>> Ok but it add a 60sec delay when we use the mainline kernel.
>
> Yes, not a pleasant experience.
>
> What if we copy the VPU firmware to both locations?
>
> /lib/firmware/
> /lib/firmware/vpu/
>
> This way mainline kernel will fetch the VPU firmware faster and NXP
> vendor can also work.
>
I don't see any difference between NXP vendor and mainline kernel.
See:
https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/media/platform/coda/coda-common.c?h=imx_5.4.70_2.3.0#n2889
Can you check if there is any local change applied to your kernel or a specific
configuration ?
Best regards,
Romain
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
2021-01-13 13:29 ` Fabio Estevam
2021-01-13 19:11 ` Romain Naour
@ 2021-01-13 20:02 ` Romain Naour
2021-01-13 20:16 ` Fabio Estevam
1 sibling, 1 reply; 9+ messages in thread
From: Romain Naour @ 2021-01-13 20:02 UTC (permalink / raw)
To: buildroot
Hi Fabio,
Le 13/01/2021 ? 14:29, Fabio Estevam a ?crit?:
> Hi Romain,
>
> On Wed, Jan 13, 2021 at 10:20 AM Romain Naour <romain.naour@smile.fr> wrote:
>
>> Ok but it add a 60sec delay when we use the mainline kernel.
>
> Yes, not a pleasant experience.
>
> What if we copy the VPU firmware to both locations?
>
> /lib/firmware/
> /lib/firmware/vpu/
>
> This way mainline kernel will fetch the VPU firmware faster and NXP
> vendor can also work.
>
What about a simlink ?
Best regards,
Romain
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
2021-01-13 20:02 ` Romain Naour
@ 2021-01-13 20:16 ` Fabio Estevam
2021-01-13 21:01 ` Romain Naour
0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2021-01-13 20:16 UTC (permalink / raw)
To: buildroot
On Wed, Jan 13, 2021 at 5:02 PM Romain Naour <romain.naour@gmail.com> wrote:
> What about a simlink ?
Yes, that would work.
Actually, I tried it here, but it ended up with a symlink to the host
PC Buildroot path.
If you could give me a suggestion on how to properly implement the
symlink in firmware-imx.mk, I would appreciate it.
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
2021-01-13 20:16 ` Fabio Estevam
@ 2021-01-13 21:01 ` Romain Naour
2021-01-13 22:28 ` Fabio Estevam
0 siblings, 1 reply; 9+ messages in thread
From: Romain Naour @ 2021-01-13 21:01 UTC (permalink / raw)
To: buildroot
Le 13/01/2021 ? 21:16, Fabio Estevam a ?crit?:
> On Wed, Jan 13, 2021 at 5:02 PM Romain Naour <romain.naour@gmail.com> wrote:
>
>> What about a simlink ?
>
> Yes, that would work.
>
> Actually, I tried it here, but it ended up with a symlink to the host
> PC Buildroot path.
>
> If you could give me a suggestion on how to properly implement the
> symlink in firmware-imx.mk, I would appreciate it.
Something like this ?
define FIRMWARE_IMX_INSTALL_TARGET_VPU_FW
mkdir -p $(TARGET_DIR)/lib/firmware/vpu
for i in $$(find $(@D)/firmware/vpu/vpu_fw_$(FIRMWARE_IMX_VPU_FW_NAME)*.bin); do \
cp $$i $(TARGET_DIR)/lib/firmware/vpu/ ; \
ln -sf vpu/$$(basename $$i) $(TARGET_DIR)/lib/firmware/$$(basename $$i) ; \
done
endef
Best regards,
Romain
>
> Thanks
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
2021-01-13 21:01 ` Romain Naour
@ 2021-01-13 22:28 ` Fabio Estevam
0 siblings, 0 replies; 9+ messages in thread
From: Fabio Estevam @ 2021-01-13 22:28 UTC (permalink / raw)
To: buildroot
On Wed, Jan 13, 2021 at 6:01 PM Romain Naour <romain.naour@gmail.com> wrote:
> Something like this ?
>
> define FIRMWARE_IMX_INSTALL_TARGET_VPU_FW
> mkdir -p $(TARGET_DIR)/lib/firmware/vpu
> for i in $$(find $(@D)/firmware/vpu/vpu_fw_$(FIRMWARE_IMX_VPU_FW_NAME)*.bin); do \
> cp $$i $(TARGET_DIR)/lib/firmware/vpu/ ; \
> ln -sf vpu/$$(basename $$i) $(TARGET_DIR)/lib/firmware/$$(basename $$i) ; \
> done
> endef
This works for me. I will send a v2 with your suggestion.
Thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-01-13 22:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13 12:08 [Buildroot] [PATCH] package/freescale-imx/firmware-imx: install the VPU firmware into a valid location Fabio Estevam
2021-01-13 13:20 ` Romain Naour
2021-01-13 13:29 ` Fabio Estevam
2021-01-13 19:11 ` Romain Naour
2021-01-13 19:21 ` Fabio Estevam
2021-01-13 20:02 ` Romain Naour
2021-01-13 20:16 ` Fabio Estevam
2021-01-13 21:01 ` Romain Naour
2021-01-13 22:28 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox