package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
Fabio Estevam
reviewerPATCH 1/1 package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
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.
--- package/freescale-imx/firmware-imx/firmware-imx.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/freescale-imx/firmware-imx/firmware-imx.mk +2 -2
@@ -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
Signature · 1 line
2.17.1
PATCH 1/1 package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
Hi Fabio,
Le 13/01/2021 ? 13:08, Fabio Estevam a ?crit?:
Quoted 11 lines
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
Quoted 26 lines
Reported-by Romain Naour <[email protected]>Signed-off-by Fabio Estevam <[email protected]>--- package/freescale-imx/firmware-imx/firmware-imx.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/freescale-imx/firmware-imx/firmware-imx.mk +2
-2@@ -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
Fabio Estevam
reviewerPATCH 1/1 package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
Hi Romain,
Quoted 1 line · Romain Naour
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.
PATCH 1/1 package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
Hi Fabio,
Le 13/01/2021 ? 14:29, Fabio Estevam a ?crit?:
Quoted 8 lines
Hi Romain,
Quoted 1 line · Romain Naour
Ok but it add a 60sec delay when we use the mainline kernel.
Yes, not a pleasant experience.
Quoted 8 lines
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.
Can you check if there is any local change applied to your kernel or a specific configuration ?
Best regards,
Romain
Fabio Estevam
reviewerPATCH 1/1 package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
Hi Romain,
Quoted 7 lines · Romain Naour
I don't see any difference between NXP vendor and mainline kernel.
Can you check if there is any local change applied to your kernel or a specific configuration ?
The NXP kernel does not use the coda driver. It uses drivers/mxc/vpu/mxc_vpu.c instead.
Regards,
Fabio Estevam
PATCH 1/1 package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
In reply to Fabio EstevamHi Fabio,
Le 13/01/2021 ? 14:29, Fabio Estevam a ?crit?:
Quoted 8 lines
Hi Romain,
Quoted 1 line · Romain Naour
Ok but it add a 60sec delay when we use the mainline kernel.
Yes, not a pleasant experience.
Quoted 8 lines
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
Fabio Estevam
reviewerPATCH 1/1 package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
Quoted 1 line · Romain Naour
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
PATCH 1/1 package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
Le 13/01/2021 ? 21:16, Fabio Estevam a ?crit?:
Quoted 11 lines · Romain Naour
Quoted 2 lines
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
Quoted 3 lines
Thanks
Fabio Estevam
reviewerPATCH 1/1 package/freescale-imx/firmware-imx: install the VPU firmware into a valid location
Quoted 9 lines · Romain Naour
Something like this ?
define
FIRMWARE_IMX_INSTALL_TARGET_VPU_FWmkdir -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) ; \ doneendef
This works for me. I will send a v2 with your suggestion.
Thanks!