diff mbox series

[1/3] arm-bsp/external-system: costone1000: install the firmware in the filesystem

Message ID 20240426152014.356666-2-abdellatif.elkhlifi@arm.com
State New
Headers show
Series arm-bsp/corstone1000: add external system control support | expand

Commit Message

Abdellatif El Khlifi April 26, 2024, 3:20 p.m. UTC
From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>

install the external system binaries under /lib/firmware

The kernel's remoteproc subsystem expects the firmware file to be under /lib/firmware

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
---
 kas/corstone1000-image-configuration.yml            |  3 +++
 .../external-system/external-system_0.1.0.bb        | 13 +++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/kas/corstone1000-image-configuration.yml b/kas/corstone1000-image-configuration.yml
index 2b285223..7912a2b4 100644
--- a/kas/corstone1000-image-configuration.yml
+++ b/kas/corstone1000-image-configuration.yml
@@ -38,3 +38,6 @@  local_conf_header:
 
     # TS PSA API tests commands for crypto, its, ps and iat
     CORE_IMAGE_EXTRA_INSTALL += "packagegroup-ts-tests-psa"
+
+    # external system firmware
+    CORE_IMAGE_EXTRA_INSTALL:firmware += "external-system-elf"
diff --git a/meta-arm-bsp/recipes-bsp/external-system/external-system_0.1.0.bb b/meta-arm-bsp/recipes-bsp/external-system/external-system_0.1.0.bb
index 18649cee..8bd11616 100644
--- a/meta-arm-bsp/recipes-bsp/external-system/external-system_0.1.0.bb
+++ b/meta-arm-bsp/recipes-bsp/external-system/external-system_0.1.0.bb
@@ -38,15 +38,20 @@  do_compile() {
 do_compile[cleandirs] = "${B}"
 
 do_install() {
-    install -D -p -m 0644 ${B}/product/${PRODUCT}/firmware/release/bin/firmware.bin ${D}/firmware/es_flashfw.bin
+    install -D -p -m 0644 ${B}/product/${PRODUCT}/firmware/release/bin/firmware.bin ${D}${nonarch_base_libdir}/firmware/es_flashfw.bin
+    install -D -p -m 0644 ${B}/product/${PRODUCT}/firmware/release/bin/firmware.elf ${D}${nonarch_base_libdir}/firmware/es_flashfw.elf
 }
 
-FILES:${PN} = "/firmware"
-SYSROOT_DIRS += "/firmware"
+FILES:${PN} = "${nonarch_base_libdir}/firmware/es_flashfw.bin"
+FILES:${PN}-elf = "${nonarch_base_libdir}/firmware/es_flashfw.elf"
+PACKAGES += "${PN}-elf"
+INSANE_SKIP:${PN}-elf += "arch"
+
+SYSROOT_DIRS += "${nonarch_base_libdir}/firmware"
 
 inherit deploy
 
 do_deploy() {
-    cp -rf ${D}/firmware/* ${DEPLOYDIR}/
+    cp -rf ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/
 }
 addtask deploy after do_install