Message ID | 20240902064733.651635-2-jamin_lin@aspeedtech.com |
---|---|
State | New |
Headers | show |
Series | [meta-zephyr,v2,1/2] zephyr-kernel: Add source version to support v3.7.0 | expand |
This patch is merged. But It does not allow to run runqemu. I have sent a patch to fix it. https://lists.yoctoproject.org/g/yocto-patches/message/646 Regards, Naveen > -----Original Message----- > From: yocto-patches@lists.yoctoproject.org <yocto- > patches@lists.yoctoproject.org> On Behalf Of Jamin Lin via > lists.yoctoproject.org > Sent: Monday, September 2, 2024 2:48 PM > To: yocto-patches@lists.yoctoproject.org > Cc: troy_lee@aspeedtech.com; jamin_lin@aspeedtech.com; > jaminlin1207@gmail.com; vince_chang@aspeedtech.com > Subject: [yocto-patches] [meta-zephyr][PATCH v2 2/2] zephyr-kernel: > support to deploy users customize image > > In the previous design, it only deployed zephyr.elf, zephyr.bin and > zephyr.efi. > If users want to deploy their customize images, they should update > do_install task. > Add to check "ZEPHYR_MAKE_OUTPUT" to deploy users customize images > and zephyr images. > > Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> > --- > .../zephyr-kernel/zephyr-image.inc | 21 +++++++------------ > .../zephyr-kernel/zephyr-kernel-common.inc | 8 ++++--- > .../zephyr-kernel/zephyr-openamp-rsc-table.bb | 8 ++++--- > 3 files changed, 18 insertions(+), 19 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..c747095 100644 > --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > @@ -6,24 +6,19 @@ OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" > > do_install() { > install -d ${D}/firmware > - > - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} > ${D}/firmware/${PN}.elf > - > - if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] > - then > - install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > ${D}/firmware/${PN}.bin > - fi > - > - if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] > - then > - install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > ${D}/firmware/${PN}.efi > - fi > + > + for output in ${ZEPHYR_MAKE_OUTPUT}; do > + if [ -f ${B}/zephyr/${output} ]; > + then > + install -D ${B}/zephyr/${output} ${D}/firmware/ > + fi > + done > } > FILES:${PN} = "/firmware" > INSANE_SKIP += "ldflags buildpaths" > SYSROOT_DIRS += "/firmware" > > do_deploy() { > - cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/ > + cp ${D}/firmware/* ${DEPLOYDIR}/ > } > addtask deploy after do_install > diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel- > common.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr- > kernel-common.inc > index ba70a29..8a1638d 100644 > --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel- > common.inc > +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel- > common > +++ .inc > @@ -10,9 +10,11 @@ IMAGE_NO_MANIFEST = "1" > ZEPHYR_TOOLCHAIN_VARIANT ?= "cross-compile" > require zephyr-toolchain-${ZEPHYR_TOOLCHAIN_VARIANT}.inc > > -ZEPHYR_MAKE_OUTPUT = "zephyr.elf" > -ZEPHYR_MAKE_BIN_OUTPUT = "zephyr.bin" > -ZEPHYR_MAKE_EFI_OUTPUT = "zephyr.efi" > +ZEPHYR_MAKE_OUTPUT ?= "\ > + zephyr.elf \ > + zephyr.bin \ > + zephyr.efi \ > + " > > EXTRA_OECMAKE = "\ > -DZEPHYR_BASE=${ZEPHYR_BASE} \ > diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr- > openamp-rsc-table.bb b/meta-zephyr-core/recipes-kernel/zephyr- > kernel/zephyr-openamp-rsc-table.bb > index 5e51c23..8a95b14 100644 > --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc- > table.bb > +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp- > rsc-t > +++ able.bb > @@ -1,9 +1,11 @@ > include zephyr-sample.inc > > > -ZEPHYR_MAKE_OUTPUT = "zephyr_openamp_rsc_table.elf" > -ZEPHYR_MAKE_BIN_OUTPUT = "zephyr_openamp_rsc_table.bin" > -ZEPHYR_MAKE_EFI_OUTPUT = "zephyr_openamp_rsc_table.efi" > +ZEPHYR_MAKE_OUTPUT ?= " \ > + zephyr_openamp_rsc_table.elf \ > + zephyr_openamp_rsc_table.bin \ > + zephyr_openamp_rsc_table.efi \ > + " > > ZEPHYR_SRC_DIR = > "${ZEPHYR_BASE}/samples/subsys/ipc/openamp_rsc_table" > > -- > 2.25.1 > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#606): https://lists.yoctoproject.org/g/yocto- > patches/message/606 > Mute This Topic: https://lists.yoctoproject.org/mt/108223015/2015869 > Group Owner: yocto-patches+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/yocto- > patches/leave/13182003/2015869/177849857/xyzzy > [naveen.kumar.saini@intel.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Hi Naveen, > -----Original Message----- > From: yocto-patches@lists.yoctoproject.org > <yocto-patches@lists.yoctoproject.org> On Behalf Of Naveen Saini via > lists.yoctoproject.org > Sent: Thursday, September 12, 2024 11:00 PM > To: yocto-patches@lists.yoctoproject.org > Cc: Troy Lee <troy_lee@aspeedtech.com>; Jamin Lin > <jamin_lin@aspeedtech.com>; jaminlin1207@gmail.com; Vince Chang > <vince_chang@aspeedtech.com> > Subject: Re: [yocto-patches] [meta-zephyr][PATCH v2 2/2] zephyr-kernel: > support to deploy users customize image > > This patch is merged. But It does not allow to run runqemu. I have sent a patch > to fix it. > https://lists.yoctoproject.org/g/yocto-patches/message/646 > Thanks for your kindly support. Jamin > Regards, > Naveen > > > -----Original Message----- > > From: yocto-patches@lists.yoctoproject.org <yocto- > > patches@lists.yoctoproject.org> On Behalf Of Jamin Lin via > > lists.yoctoproject.org > > Sent: Monday, September 2, 2024 2:48 PM > > To: yocto-patches@lists.yoctoproject.org > > Cc: troy_lee@aspeedtech.com; jamin_lin@aspeedtech.com; > > jaminlin1207@gmail.com; vince_chang@aspeedtech.com > > Subject: [yocto-patches] [meta-zephyr][PATCH v2 2/2] zephyr-kernel: > > support to deploy users customize image > > > > In the previous design, it only deployed zephyr.elf, zephyr.bin and > > zephyr.efi. > > If users want to deploy their customize images, they should update > > do_install task. > > Add to check "ZEPHYR_MAKE_OUTPUT" to deploy users customize images > and > > zephyr images. > > > > Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> > > --- > > .../zephyr-kernel/zephyr-image.inc | 21 +++++++------------ > > .../zephyr-kernel/zephyr-kernel-common.inc | 8 ++++--- > > .../zephyr-kernel/zephyr-openamp-rsc-table.bb | 8 ++++--- > > 3 files changed, 18 insertions(+), 19 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..c747095 100644 > > --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > > +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc > > @@ -6,24 +6,19 @@ OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" > > > > do_install() { > > install -d ${D}/firmware > > - > > - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} > > ${D}/firmware/${PN}.elf > > - > > - if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] > > - then > > - install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} > > ${D}/firmware/${PN}.bin > > - fi > > - > > - if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] > > - then > > - install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} > > ${D}/firmware/${PN}.efi > > - fi > > + > > + for output in ${ZEPHYR_MAKE_OUTPUT}; do > > + if [ -f ${B}/zephyr/${output} ]; > > + then > > + install -D ${B}/zephyr/${output} ${D}/firmware/ > > + fi > > + done > > } > > FILES:${PN} = "/firmware" > > INSANE_SKIP += "ldflags buildpaths" > > SYSROOT_DIRS += "/firmware" > > > > do_deploy() { > > - cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/ > > + cp ${D}/firmware/* ${DEPLOYDIR}/ > > } > > addtask deploy after do_install > > diff --git > > a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel- > > common.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr- > > kernel-common.inc > > index ba70a29..8a1638d 100644 > > --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel- > > common.inc > > +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel- > > common > > +++ .inc > > @@ -10,9 +10,11 @@ IMAGE_NO_MANIFEST = "1" > > ZEPHYR_TOOLCHAIN_VARIANT ?= "cross-compile" > > require zephyr-toolchain-${ZEPHYR_TOOLCHAIN_VARIANT}.inc > > > > -ZEPHYR_MAKE_OUTPUT = "zephyr.elf" > > -ZEPHYR_MAKE_BIN_OUTPUT = "zephyr.bin" > > -ZEPHYR_MAKE_EFI_OUTPUT = "zephyr.efi" > > +ZEPHYR_MAKE_OUTPUT ?= "\ > > + zephyr.elf \ > > + zephyr.bin \ > > + zephyr.efi \ > > + " > > > > EXTRA_OECMAKE = "\ > > -DZEPHYR_BASE=${ZEPHYR_BASE} \ > > diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr- > > openamp-rsc-table.bb b/meta-zephyr-core/recipes-kernel/zephyr- > > kernel/zephyr-openamp-rsc-table.bb > > index 5e51c23..8a95b14 100644 > > --- > > a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc- > > table.bb > > +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp- > > rsc-t > > +++ able.bb > > @@ -1,9 +1,11 @@ > > include zephyr-sample.inc > > > > > > -ZEPHYR_MAKE_OUTPUT = "zephyr_openamp_rsc_table.elf" > > -ZEPHYR_MAKE_BIN_OUTPUT = "zephyr_openamp_rsc_table.bin" > > -ZEPHYR_MAKE_EFI_OUTPUT = "zephyr_openamp_rsc_table.efi" > > +ZEPHYR_MAKE_OUTPUT ?= " \ > > + zephyr_openamp_rsc_table.elf \ > > + zephyr_openamp_rsc_table.bin \ > > + zephyr_openamp_rsc_table.efi \ > > + " > > > > ZEPHYR_SRC_DIR = > > "${ZEPHYR_BASE}/samples/subsys/ipc/openamp_rsc_table" > > > > -- > > 2.25.1 > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#649): > https://lists.yoctoproject.org/g/yocto-patches/message/649 > Mute This Topic: https://lists.yoctoproject.org/mt/108223015/7579112 > Group Owner: yocto-patches+owner@lists.yoctoproject.org > Unsubscribe: > https://lists.yoctoproject.org/g/yocto-patches/leave/13568748/7579112/81016 > 6759/xyzzy [jamin_lin@aspeedtech.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..c747095 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc @@ -6,24 +6,19 @@ OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" do_install() { install -d ${D}/firmware - - install -D ${B}/zephyr/${ZEPHYR_MAKE_OUTPUT} ${D}/firmware/${PN}.elf - - if [ -f ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ] - then - install -D ${B}/zephyr/${ZEPHYR_MAKE_BIN_OUTPUT} ${D}/firmware/${PN}.bin - fi - - if [ -f ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ] - then - install -D ${B}/zephyr/${ZEPHYR_MAKE_EFI_OUTPUT} ${D}/firmware/${PN}.efi - fi + + for output in ${ZEPHYR_MAKE_OUTPUT}; do + if [ -f ${B}/zephyr/${output} ]; + then + install -D ${B}/zephyr/${output} ${D}/firmware/ + fi + done } FILES:${PN} = "/firmware" INSANE_SKIP += "ldflags buildpaths" SYSROOT_DIRS += "/firmware" do_deploy() { - cp ${D}/firmware/${PN}.* ${DEPLOYDIR}/ + cp ${D}/firmware/* ${DEPLOYDIR}/ } addtask deploy after do_install diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc index ba70a29..8a1638d 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc @@ -10,9 +10,11 @@ IMAGE_NO_MANIFEST = "1" ZEPHYR_TOOLCHAIN_VARIANT ?= "cross-compile" require zephyr-toolchain-${ZEPHYR_TOOLCHAIN_VARIANT}.inc -ZEPHYR_MAKE_OUTPUT = "zephyr.elf" -ZEPHYR_MAKE_BIN_OUTPUT = "zephyr.bin" -ZEPHYR_MAKE_EFI_OUTPUT = "zephyr.efi" +ZEPHYR_MAKE_OUTPUT ?= "\ + zephyr.elf \ + zephyr.bin \ + zephyr.efi \ + " EXTRA_OECMAKE = "\ -DZEPHYR_BASE=${ZEPHYR_BASE} \ diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb index 5e51c23..8a95b14 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb @@ -1,9 +1,11 @@ include zephyr-sample.inc -ZEPHYR_MAKE_OUTPUT = "zephyr_openamp_rsc_table.elf" -ZEPHYR_MAKE_BIN_OUTPUT = "zephyr_openamp_rsc_table.bin" -ZEPHYR_MAKE_EFI_OUTPUT = "zephyr_openamp_rsc_table.efi" +ZEPHYR_MAKE_OUTPUT ?= " \ + zephyr_openamp_rsc_table.elf \ + zephyr_openamp_rsc_table.bin \ + zephyr_openamp_rsc_table.efi \ + " ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/subsys/ipc/openamp_rsc_table"
In the previous design, it only deployed zephyr.elf, zephyr.bin and zephyr.efi. If users want to deploy their customize images, they should update do_install task. Add to check "ZEPHYR_MAKE_OUTPUT" to deploy users customize images and zephyr images. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> --- .../zephyr-kernel/zephyr-image.inc | 21 +++++++------------ .../zephyr-kernel/zephyr-kernel-common.inc | 8 ++++--- .../zephyr-kernel/zephyr-openamp-rsc-table.bb | 8 ++++--- 3 files changed, 18 insertions(+), 19 deletions(-)