| Message ID | 20250812174147.130972-5-sandeep.gundlupet-raju@amd.com |
|---|---|
| State | New |
| Headers | show |
| Series | | expand |
> -----Original Message----- > From: yocto-patches@lists.yoctoproject.org <yocto- > patches@lists.yoctoproject.org> On Behalf Of Sandeep Gundlupet Raju via > lists.yoctoproject.org > Sent: Wednesday, 13 August, 2025 1:42 AM > To: yocto-patches@lists.yoctoproject.org; Lee, Chee Yang > <chee.yang.lee@intel.com> > Subject: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] zephyr- > image: Add image artifacts to output files > > Inherit image-artifact-names bbclass in zephyr-image.inc and add image artifacts > to output generated files. > > Before: > zephyr-helloworld.elf > > After: > zephyr-helloworld-{MACHINE}-{DATETIME}.elf > > Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> > --- > .../zephyr-kernel/zephyr-image.inc | 28 +++++++++++++++---- > 1 file changed, 23 insertions(+), 5 deletions(-) > > diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > index d6ee21f..93d36b1 100644 > --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > @@ -1,29 +1,47 @@ > require zephyr-kernel-src.inc > require zephyr-kernel-common.inc > -inherit deploy > +inherit deploy image-artifact-names > > OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" > > +ZEPHYR_IMAGE_LINK_NAME ?= "${PN}-${MACHINE}" > +ZEPHYR_IMAGE_BASE_NAME ?= "${PN}- > ${MACHINE}${IMAGE_VERSION_SUFFIX}" > + > do_install() { > install -d ${D}/firmware > > - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${D}/firmware/${PN}.elf Since this is for stable branch, I think we should keep the elf/bin/efi file with old naming. We can deploy both ${PN}.elf and ${ZEPHYR_IMAGE_BASE_NAME}.elf, ${PN}.elf can be copy of/soft link to latest ${ZEPHYR_IMAGE_BASE_NAME}.elf, same for .bin and .efi. > + install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} > + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.elf > > if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] > then > - install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > ${D}/firmware/${PN}.bin > + install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.bin > fi > > if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] > then > - install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > ${D}/firmware/${PN}.efi > + install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.efi > fi > } > + > FILES:${PN} = "/firmware" > INSANE_SKIP += "ldflags buildpaths" > SYSROOT_DIRS += "/firmware" > > do_deploy() { > - cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/ > + cp ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} > ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.elf > + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.elf > + ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.elf > + > + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] > + then > + cp ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.bin > + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.bin > ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.bin > + fi > + > + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] > + then > + cp ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.efi > + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.efi > ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.efi > + fi > + > } > addtask deploy after do_install > -- > 2.34.1 > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#1966): https://lists.yoctoproject.org/g/yocto- > patches/message/1966 > Mute This Topic: https://lists.yoctoproject.org/mt/114670142/1648606 > Group Owner: yocto-patches+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/yocto- > patches/leave/13233161/1648606/629479993/xyzzy [chee.yang.lee@intel.com] > -=-=-=-=-=-=-=-=-=-=-=- >
[AMD Official Use Only - AMD Internal Distribution Only] Thanks, Sandeep > -----Original Message----- > From: yocto-patches@lists.yoctoproject.org <yocto- > patches@lists.yoctoproject.org> On Behalf Of Lee Chee Yang via > lists.yoctoproject.org > Sent: Tuesday, August 12, 2025 9:13 PM > To: yocto-patches@lists.yoctoproject.org > Subject: Re: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] zephyr- > image: Add image artifacts to output files > > > > > -----Original Message----- > > From: yocto-patches@lists.yoctoproject.org <yocto- > > patches@lists.yoctoproject.org> On Behalf Of Sandeep Gundlupet Raju > > via lists.yoctoproject.org > > Sent: Wednesday, 13 August, 2025 1:42 AM > > To: yocto-patches@lists.yoctoproject.org; Lee, Chee Yang > > <chee.yang.lee@intel.com> > > Subject: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] > > zephyr- > > image: Add image artifacts to output files > > > > Inherit image-artifact-names bbclass in zephyr-image.inc and add image > > artifacts to output generated files. > > > > Before: > > zephyr-helloworld.elf > > > > After: > > zephyr-helloworld-{MACHINE}-{DATETIME}.elf > > > > Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet- > raju@amd.com> > > --- > > .../zephyr-kernel/zephyr-image.inc | 28 +++++++++++++++---- > > 1 file changed, 23 insertions(+), 5 deletions(-) > > > > diff --git > > a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > > b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > > index d6ee21f..93d36b1 100644 > > --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > > +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > > @@ -1,29 +1,47 @@ > > require zephyr-kernel-src.inc > > require zephyr-kernel-common.inc > > -inherit deploy > > +inherit deploy image-artifact-names > > > > OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" > > > > +ZEPHYR_IMAGE_LINK_NAME ?= "${PN}-${MACHINE}" > > +ZEPHYR_IMAGE_BASE_NAME ?= "${PN}- > > ${MACHINE}${IMAGE_VERSION_SUFFIX}" > > + > > do_install() { > > install -d ${D}/firmware > > > > - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} > ${D}/firmware/${PN}.elf > > Since this is for stable branch, I think we should keep the elf/bin/efi file with > old naming. We can deploy both ${PN}.elf and > ${ZEPHYR_IMAGE_BASE_NAME}.elf, ${PN}.elf can be copy of/soft link to > latest ${ZEPHYR_IMAGE_BASE_NAME}.elf, same for .bin and .efi. > [Sandeep] : Agreed this is for stable branch but to me this seems to be a bug. Deploying ${PN}.elf is not a YP best practice. What do you think? > > > > > > + install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} > > + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.elf > > > > if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] > > then > > - install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > > ${D}/firmware/${PN}.bin > > + install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > > + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.bin > > fi > > > > if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] > > then > > - install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > > ${D}/firmware/${PN}.efi > > + install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > > + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.efi > > fi > > } > > + > > FILES:${PN} = "/firmware" > > INSANE_SKIP += "ldflags buildpaths" > > SYSROOT_DIRS += "/firmware" > > > > do_deploy() { > > - cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/ > > + cp ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} > > ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.elf > > + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.elf > > + ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.elf > > + > > + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] > > + then > > + cp ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > > ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.bin > > + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.bin > > ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.bin > > + fi > > + > > + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] > > + then > > + cp ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > > ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.efi > > + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.efi > > ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.efi > > + fi > > + > > } > > addtask deploy after do_install > > -- > > 2.34.1 > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#1975): https://lists.yoctoproject.org/g/yocto- > patches/message/1975 > Mute This Topic: https://lists.yoctoproject.org/mt/114670142/3619217 > Group Owner: yocto-patches+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/yocto- > patches/leave/14411013/3619217/657730681/xyzzy [sandeep.gundlupet- > raju@amd.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On 8/13/2025 7:02 PM, Sandeep Gundlupet Raju via lists.yoctoproject.org wrote: > [AMD Official Use Only - AMD Internal Distribution Only] > > Thanks, > Sandeep >> -----Original Message----- >> From: yocto-patches@lists.yoctoproject.org <yocto- >> patches@lists.yoctoproject.org> On Behalf Of Lee Chee Yang via >> lists.yoctoproject.org >> Sent: Tuesday, August 12, 2025 9:13 PM >> To: yocto-patches@lists.yoctoproject.org >> Subject: Re: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] zephyr- >> image: Add image artifacts to output files >> >> >> >>> -----Original Message----- >>> From: yocto-patches@lists.yoctoproject.org <yocto- >>> patches@lists.yoctoproject.org> On Behalf Of Sandeep Gundlupet Raju >>> via lists.yoctoproject.org >>> Sent: Wednesday, 13 August, 2025 1:42 AM >>> To: yocto-patches@lists.yoctoproject.org; Lee, Chee Yang >>> <chee.yang.lee@intel.com> >>> Subject: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] >>> zephyr- >>> image: Add image artifacts to output files >>> >>> Inherit image-artifact-names bbclass in zephyr-image.inc and add image >>> artifacts to output generated files. >>> >>> Before: >>> zephyr-helloworld.elf >>> >>> After: >>> zephyr-helloworld-{MACHINE}-{DATETIME}.elf >>> >>> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet- >> raju@amd.com> >>> --- >>> .../zephyr-kernel/zephyr-image.inc | 28 +++++++++++++++---- >>> 1 file changed, 23 insertions(+), 5 deletions(-) >>> >>> diff --git >>> a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc >>> b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc >>> index d6ee21f..93d36b1 100644 >>> --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc >>> +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc >>> @@ -1,29 +1,47 @@ >>> require zephyr-kernel-src.inc >>> require zephyr-kernel-common.inc >>> -inherit deploy >>> +inherit deploy image-artifact-names >>> >>> OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" >>> >>> +ZEPHYR_IMAGE_LINK_NAME ?= "${PN}-${MACHINE}" >>> +ZEPHYR_IMAGE_BASE_NAME ?= "${PN}- >>> ${MACHINE}${IMAGE_VERSION_SUFFIX}" >>> + >>> do_install() { >>> install -d ${D}/firmware >>> >>> - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} >> ${D}/firmware/${PN}.elf >> >> Since this is for stable branch, I think we should keep the elf/bin/efi file with >> old naming. We can deploy both ${PN}.elf and >> ${ZEPHYR_IMAGE_BASE_NAME}.elf, ${PN}.elf can be copy of/soft link to >> latest ${ZEPHYR_IMAGE_BASE_NAME}.elf, same for .bin and .efi. >> > [Sandeep] : Agreed this is for stable branch but to me this seems to be a bug. Deploying ${PN}.elf is not a YP best practice. What do you think? [Sandeep]: Chee Yang, ping on above question. >> >> >> >>> + install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} >>> + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.elf >>> >>> if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] >>> then >>> - install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} >>> ${D}/firmware/${PN}.bin >>> + install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} >>> + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.bin >>> fi >>> >>> if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] >>> then >>> - install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} >>> ${D}/firmware/${PN}.efi >>> + install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} >>> + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.efi >>> fi >>> } >>> + >>> FILES:${PN} = "/firmware" >>> INSANE_SKIP += "ldflags buildpaths" >>> SYSROOT_DIRS += "/firmware" >>> >>> do_deploy() { >>> - cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/ >>> + cp ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} >>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.elf >>> + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.elf >>> + ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.elf >>> + >>> + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] >>> + then >>> + cp ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} >>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.bin >>> + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.bin >>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.bin >>> + fi >>> + >>> + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] >>> + then >>> + cp ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} >>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.efi >>> + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.efi >>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.efi >>> + fi >>> + >>> } >>> addtask deploy after do_install >>> -- >>> 2.34.1 >>> >>> >>> >>> >>> >> >> >> >> > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#1986): https://lists.yoctoproject.org/g/yocto-patches/message/1986 > Mute This Topic: https://lists.yoctoproject.org/mt/114670142/8188369 > Group Owner: yocto-patches+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/14211927/8188369/518048116/xyzzy [santraju@amd.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
> -----Original Message----- > From: Gundlupet Raju, Sandeep <sandeep.gundlupet-raju@amd.com> > Sent: Saturday, 16 August, 2025 10:32 AM > To: yocto-patches@lists.yoctoproject.org; Lee, Chee Yang > <chee.yang.lee@intel.com> > Subject: Re: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] zephyr- > image: Add image artifacts to output files > > > On 8/13/2025 7:02 PM, Sandeep Gundlupet Raju via lists.yoctoproject.org > wrote: > > [AMD Official Use Only - AMD Internal Distribution Only] > > > > Thanks, > > Sandeep > >> -----Original Message----- > >> From: yocto-patches@lists.yoctoproject.org <yocto- > >> patches@lists.yoctoproject.org> On Behalf Of Lee Chee Yang via > >> lists.yoctoproject.org > >> Sent: Tuesday, August 12, 2025 9:13 PM > >> To: yocto-patches@lists.yoctoproject.org > >> Subject: Re: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] > >> zephyr- > >> image: Add image artifacts to output files > >> > >> > >> > >>> -----Original Message----- > >>> From: yocto-patches@lists.yoctoproject.org <yocto- > >>> patches@lists.yoctoproject.org> On Behalf Of Sandeep Gundlupet Raju > >>> via lists.yoctoproject.org > >>> Sent: Wednesday, 13 August, 2025 1:42 AM > >>> To: yocto-patches@lists.yoctoproject.org; Lee, Chee Yang > >>> <chee.yang.lee@intel.com> > >>> Subject: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] > >>> zephyr- > >>> image: Add image artifacts to output files > >>> > >>> Inherit image-artifact-names bbclass in zephyr-image.inc and add > >>> image artifacts to output generated files. > >>> > >>> Before: > >>> zephyr-helloworld.elf > >>> > >>> After: > >>> zephyr-helloworld-{MACHINE}-{DATETIME}.elf > >>> > >>> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet- > >> raju@amd.com> > >>> --- > >>> .../zephyr-kernel/zephyr-image.inc | 28 +++++++++++++++---- > >>> 1 file changed, 23 insertions(+), 5 deletions(-) > >>> > >>> diff --git > >>> a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > >>> b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > >>> index d6ee21f..93d36b1 100644 > >>> --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > >>> +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > >>> @@ -1,29 +1,47 @@ > >>> require zephyr-kernel-src.inc > >>> require zephyr-kernel-common.inc > >>> -inherit deploy > >>> +inherit deploy image-artifact-names > >>> > >>> OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" > >>> > >>> +ZEPHYR_IMAGE_LINK_NAME ?= "${PN}-${MACHINE}" > >>> +ZEPHYR_IMAGE_BASE_NAME ?= "${PN}- > >>> ${MACHINE}${IMAGE_VERSION_SUFFIX}" > >>> + > >>> do_install() { > >>> install -d ${D}/firmware > >>> > >>> - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} > >> ${D}/firmware/${PN}.elf > >> > >> Since this is for stable branch, I think we should keep the > >> elf/bin/efi file with old naming. We can deploy both ${PN}.elf and > >> ${ZEPHYR_IMAGE_BASE_NAME}.elf, ${PN}.elf can be copy of/soft link to > >> latest ${ZEPHYR_IMAGE_BASE_NAME}.elf, same for .bin and .efi. > >> > > [Sandeep] : Agreed this is for stable branch but to me this seems to be a bug. > Deploying ${PN}.elf is not a YP best practice. What do you think? > [Sandeep]: Chee Yang, ping on above question.[] This has been default behaviour for long time, I think some existing build might have expected latest build deploy with ${PN}.elf. Agree that we can drop ${PN}.elf for master. > >> > >> > >> > >>> + install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} > >>> + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.elf > >>> > >>> if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] > >>> then > >>> - install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > >>> ${D}/firmware/${PN}.bin > >>> + install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > >>> + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.bin > >>> fi > >>> > >>> if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] > >>> then > >>> - install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > >>> ${D}/firmware/${PN}.efi > >>> + install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > >>> + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.efi > >>> fi > >>> } > >>> + > >>> FILES:${PN} = "/firmware" > >>> INSANE_SKIP += "ldflags buildpaths" > >>> SYSROOT_DIRS += "/firmware" > >>> > >>> do_deploy() { > >>> - cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/ > >>> + cp ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} > >>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.elf > >>> + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.elf > >>> + ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.elf > >>> + > >>> + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] > >>> + then > >>> + cp ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > >>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.bin > >>> + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.bin > >>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.bin > >>> + fi > >>> + > >>> + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] > >>> + then > >>> + cp ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > >>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.efi > >>> + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.efi > >>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.efi > >>> + fi > >>> + > >>> } > >>> addtask deploy after do_install > >>> -- > >>> 2.34.1 > >>> > >>> > >>> > >>> > >>> > >> > >> > >> > >> > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#1986): > > https://lists.yoctoproject.org/g/yocto-patches/message/1986 > > Mute This Topic: https://lists.yoctoproject.org/mt/114670142/8188369 > > Group Owner: yocto-patches+owner@lists.yoctoproject.org > > Unsubscribe: > > https://lists.yoctoproject.org/g/yocto-patches/leave/14211927/8188369/ > > 518048116/xyzzy [santraju@amd.com] > > -=-=-=-=-=-=-=-=-=-=-=- > > > >
On 8/17/2025 9:51 PM, Lee Chee Yang via lists.yoctoproject.org wrote: > >> -----Original Message----- >> From: Gundlupet Raju, Sandeep <sandeep.gundlupet-raju@amd.com> >> Sent: Saturday, 16 August, 2025 10:32 AM >> To: yocto-patches@lists.yoctoproject.org; Lee, Chee Yang >> <chee.yang.lee@intel.com> >> Subject: Re: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] zephyr- >> image: Add image artifacts to output files >> >> >> On 8/13/2025 7:02 PM, Sandeep Gundlupet Raju via lists.yoctoproject.org >> wrote: >>> [AMD Official Use Only - AMD Internal Distribution Only] >>> >>> Thanks, >>> Sandeep >>>> -----Original Message----- >>>> From: yocto-patches@lists.yoctoproject.org <yocto- >>>> patches@lists.yoctoproject.org> On Behalf Of Lee Chee Yang via >>>> lists.yoctoproject.org >>>> Sent: Tuesday, August 12, 2025 9:13 PM >>>> To: yocto-patches@lists.yoctoproject.org >>>> Subject: Re: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] >>>> zephyr- >>>> image: Add image artifacts to output files >>>> >>>> >>>> >>>>> -----Original Message----- >>>>> From: yocto-patches@lists.yoctoproject.org <yocto- >>>>> patches@lists.yoctoproject.org> On Behalf Of Sandeep Gundlupet Raju >>>>> via lists.yoctoproject.org >>>>> Sent: Wednesday, 13 August, 2025 1:42 AM >>>>> To: yocto-patches@lists.yoctoproject.org; Lee, Chee Yang >>>>> <chee.yang.lee@intel.com> >>>>> Subject: [yocto-patches] [meta-zephyr][scarthgap][PATCH v5 4/12] >>>>> zephyr- >>>>> image: Add image artifacts to output files >>>>> >>>>> Inherit image-artifact-names bbclass in zephyr-image.inc and add >>>>> image artifacts to output generated files. >>>>> >>>>> Before: >>>>> zephyr-helloworld.elf >>>>> >>>>> After: >>>>> zephyr-helloworld-{MACHINE}-{DATETIME}.elf >>>>> >>>>> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet- >>>> raju@amd.com> >>>>> --- >>>>> .../zephyr-kernel/zephyr-image.inc | 28 +++++++++++++++---- >>>>> 1 file changed, 23 insertions(+), 5 deletions(-) >>>>> >>>>> diff --git >>>>> a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc >>>>> b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc >>>>> index d6ee21f..93d36b1 100644 >>>>> --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc >>>>> +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc >>>>> @@ -1,29 +1,47 @@ >>>>> require zephyr-kernel-src.inc >>>>> require zephyr-kernel-common.inc >>>>> -inherit deploy >>>>> +inherit deploy image-artifact-names >>>>> >>>>> OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" >>>>> >>>>> +ZEPHYR_IMAGE_LINK_NAME ?= "${PN}-${MACHINE}" >>>>> +ZEPHYR_IMAGE_BASE_NAME ?= "${PN}- >>>>> ${MACHINE}${IMAGE_VERSION_SUFFIX}" >>>>> + >>>>> do_install() { >>>>> install -d ${D}/firmware >>>>> >>>>> - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} >>>> ${D}/firmware/${PN}.elf >>>> >>>> Since this is for stable branch, I think we should keep the >>>> elf/bin/efi file with old naming. We can deploy both ${PN}.elf and >>>> ${ZEPHYR_IMAGE_BASE_NAME}.elf, ${PN}.elf can be copy of/soft link to >>>> latest ${ZEPHYR_IMAGE_BASE_NAME}.elf, same for .bin and .efi. >>>> >>> [Sandeep] : Agreed this is for stable branch but to me this seems to be a bug. >> Deploying ${PN}.elf is not a YP best practice. What do you think? >> [Sandeep]: Chee Yang, ping on above question.[] > This has been default behaviour for long time, I think some existing build might have expected latest build deploy with ${PN}.elf. Agree that we can drop ${PN}.elf for master. [Sandeep]: Ok sounds good I will put it back. > > >>>> >>>> >>>>> + install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} >>>>> + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.elf >>>>> >>>>> if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] >>>>> then >>>>> - install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} >>>>> ${D}/firmware/${PN}.bin >>>>> + install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} >>>>> + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.bin >>>>> fi >>>>> >>>>> if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] >>>>> then >>>>> - install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} >>>>> ${D}/firmware/${PN}.efi >>>>> + install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} >>>>> + ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.efi >>>>> fi >>>>> } >>>>> + >>>>> FILES:${PN} = "/firmware" >>>>> INSANE_SKIP += "ldflags buildpaths" >>>>> SYSROOT_DIRS += "/firmware" >>>>> >>>>> do_deploy() { >>>>> - cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/ >>>>> + cp ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} >>>>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.elf >>>>> + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.elf >>>>> + ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.elf >>>>> + >>>>> + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] >>>>> + then >>>>> + cp ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} >>>>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.bin >>>>> + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.bin >>>>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.bin >>>>> + fi >>>>> + >>>>> + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] >>>>> + then >>>>> + cp ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} >>>>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.efi >>>>> + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.efi >>>>> ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.efi >>>>> + fi >>>>> + >>>>> } >>>>> addtask deploy after do_install >>>>> -- >>>>> 2.34.1 >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> >>> > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#2032): https://lists.yoctoproject.org/g/yocto-patches/message/2032 > Mute This Topic: https://lists.yoctoproject.org/mt/114670142/3619217 > Group Owner: yocto-patches+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/14411013/3619217/657730681/xyzzy [sandeep.gundlupet-raju@amd.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc index d6ee21f..93d36b1 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc @@ -1,29 +1,47 @@ require zephyr-kernel-src.inc require zephyr-kernel-common.inc -inherit deploy +inherit deploy image-artifact-names OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" +ZEPHYR_IMAGE_LINK_NAME ?= "${PN}-${MACHINE}" +ZEPHYR_IMAGE_BASE_NAME ?= "${PN}-${MACHINE}${IMAGE_VERSION_SUFFIX}" + do_install() { install -d ${D}/firmware - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${D}/firmware/${PN}.elf + install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.elf if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] then - install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ${D}/firmware/${PN}.bin + install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.bin fi if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] then - install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ${D}/firmware/${PN}.efi + install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ${D}/firmware/${ZEPHYR_IMAGE_BASE_NAME}.efi fi } + FILES:${PN} = "/firmware" INSANE_SKIP += "ldflags buildpaths" SYSROOT_DIRS += "/firmware" do_deploy() { - cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/ + cp ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.elf + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.elf ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.elf + + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] + then + cp ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.bin + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.bin + fi + + if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] + then + cp ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ${DEPLOYDIR}/${ZEPHYR_IMAGE_BASE_NAME}.efi + ln -sf ${ZEPHYR_IMAGE_BASE_NAME}.efi ${DEPLOYDIR}/${ZEPHYR_IMAGE_LINK_NAME}.efi + fi + } addtask deploy after do_install
Inherit image-artifact-names bbclass in zephyr-image.inc and add image artifacts to output generated files. Before: zephyr-helloworld.elf After: zephyr-helloworld-{MACHINE}-{DATETIME}.elf Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> --- .../zephyr-kernel/zephyr-image.inc | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-)