Date
1 - 1 of 1
[meta-zephyr][PATCH 2/2] zephyr-core/zephyr-kernel: Implement do_install
Peter Hoyes
From: Peter Hoyes <Peter.Hoyes@...>
Install the Zephyr binaries to ${D}/firmware prior to copying them to
${DEPLOYDIR}.
Implementing do_install has three advantages:
* In use-cases when the Zephyr application is not the final artifact
(e.g. when signing or using additional firmware), other recipes can
pick up the Zephyr binary from the sysroot instead of
DEPLOY_DIR_IMAGE.
* It may sometimes make sense to install the binaries in a Linux
filesystem (e.g. to be run by a hypervisor).
* OE-core's QA checks run on the packaged binaries.
There are currently two QA checks that fail, so add these to INSANE_SKIP
for now.
Signed-off-by: Peter Hoyes <Peter.Hoyes@...>
---
.../zephyr-kernel/zephyr-image.inc | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.i=
nc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc
index fc8c077..d6ee21f 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc
@@ -4,19 +4,26 @@ inherit deploy
=20
OECMAKE_SOURCEPATH =3D "${ZEPHYR_SRC_DIR}"
=20
-do_install[noexec] =3D "1"
+do_install() {
+ install -d ${D}/firmware
=20
-do_deploy() {
- install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${D}/firmware/${PN}.elf
=20
if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ]
then
- install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ${DEPLOYDIR}/${PN=
}.bin
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ${D}/firmware/${P=
N}.bin
fi
=20
if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ]
then
- install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ${DEPLOYDIR}/${PN=
}.efi
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ${D}/firmware/${P=
N}.efi
fi
}
-addtask deploy after do_compile
+FILES:${PN} =3D "/firmware"
+INSANE_SKIP +=3D "ldflags buildpaths"
+SYSROOT_DIRS +=3D "/firmware"
+
+do_deploy() {
+ cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/
+}
+addtask deploy after do_install
--=20
2.25.1
Install the Zephyr binaries to ${D}/firmware prior to copying them to
${DEPLOYDIR}.
Implementing do_install has three advantages:
* In use-cases when the Zephyr application is not the final artifact
(e.g. when signing or using additional firmware), other recipes can
pick up the Zephyr binary from the sysroot instead of
DEPLOY_DIR_IMAGE.
* It may sometimes make sense to install the binaries in a Linux
filesystem (e.g. to be run by a hypervisor).
* OE-core's QA checks run on the packaged binaries.
There are currently two QA checks that fail, so add these to INSANE_SKIP
for now.
Signed-off-by: Peter Hoyes <Peter.Hoyes@...>
---
.../zephyr-kernel/zephyr-image.inc | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.i=
nc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc
index fc8c077..d6ee21f 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc
@@ -4,19 +4,26 @@ inherit deploy
=20
OECMAKE_SOURCEPATH =3D "${ZEPHYR_SRC_DIR}"
=20
-do_install[noexec] =3D "1"
+do_install() {
+ install -d ${D}/firmware
=20
-do_deploy() {
- install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${PN}.elf
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${D}/firmware/${PN}.elf
=20
if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ]
then
- install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ${DEPLOYDIR}/${PN=
}.bin
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ${D}/firmware/${P=
N}.bin
fi
=20
if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ]
then
- install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ${DEPLOYDIR}/${PN=
}.efi
+ install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ${D}/firmware/${P=
N}.efi
fi
}
-addtask deploy after do_compile
+FILES:${PN} =3D "/firmware"
+INSANE_SKIP +=3D "ldflags buildpaths"
+SYSROOT_DIRS +=3D "/firmware"
+
+do_deploy() {
+ cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/
+}
+addtask deploy after do_install
--=20
2.25.1