All of lore.kernel.org
 help / color / mirror / Atom feed
* [dunfell/master PATCH 3/3] AM64x Unification: Update ti-sci-fw recipe
@ 2021-04-08  7:16 Sinthu Raja M
  2021-04-08 13:44 ` [meta-ti] " Nishanth Menon
  0 siblings, 1 reply; 5+ messages in thread
From: Sinthu Raja M @ 2021-04-08  7:16 UTC (permalink / raw)
  To: meta-ti; +Cc: Praneeth Bajjuri, Sinthu Raja

From: Sinthu Raja <x0257345@ti.com>

     Updtae ti-sci-fw recipe to build for both SK and EVM compilation and
     installation through one machine name

Signed-off-by: Sinthu Raja <x0257345@ti.com>
---
 recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 81 +++++++++++++++++++++++---
 1 file changed, 72 insertions(+), 9 deletions(-)

diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
index d1d10a608..616160bd9 100644
--- a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
+++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
@@ -11,6 +11,8 @@ PR = "r1"
 COMPATIBLE_MACHINE = "k3r5"
 COMPATIBLE_MACHINE_aarch64 = "null"
 
+inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native
+
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 TI_SECURE_DEV_PKG ?= ""
@@ -85,6 +87,27 @@ do_deploy () {
 	install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
 }
 
+do_compile_am64xx-evm-k3r5 () {
+	cd ${WORKDIR}/imggen/
+	if [ -n "${UBOOT_CONFIG}" ]
+	then
+		for config in ${UBOOT_MACHINE}; do
+			i=$(expr $i + 1);
+			for type in ${UBOOT_CONFIG}; do
+				j=$(expr $j + 1);
+				if [ $j -eq $i ]
+				then
+					oe_runmake
+				fi
+			done
+			unset j
+		done
+		unset i
+	else
+		oe_runmake
+	fi
+}
+
 do_install_j7200-evm-k3r5() {
 	install -d ${D}/boot
 	install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
@@ -99,18 +122,58 @@ do_deploy_j7200-evm-k3r5() {
 	ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
 }
 
-do_install_am64xx-evm-k3r5() {
-	install -d ${D}/boot
-	install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
-	ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
-	ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+do_install_am64xx-evm-k3r5 () {
+	if [ -n "${UBOOT_CONFIG}" ]
+	then
+		for config in ${UBOOT_MACHINE}; do
+			i=$(expr $i + 1);
+			for type in ${UBOOT_CONFIG}; do
+				j=$(expr $j + 1);
+				if [ $j -eq $i ]
+				then
+					install -d ${D}/boot/${type}
+					install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${type}/${UBOOT_IMAGE}-${type}
+					cd ${D}/boot/${type}
+					ln -sf ${UBOOT_IMAGE}-${type} ${UBOOT_SYMLINK}-${type}
+					ln -sf ${UBOOT_IMAGE}-${type} ${UBOOT_BINARY}
+				fi
+			done
+			unset j
+		done
+		unset i
+	else
+		install -d ${D}/boot
+		install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
+	        ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
+		ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+	fi
 }
 
 do_deploy_am64xx-evm-k3r5() {
-	install -d ${DEPLOYDIR}
-	install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
-	ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
-	ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
+	if [ -n "${UBOOT_CONFIG}" ]
+	then
+		for config in ${UBOOT_MACHINE}; do
+			i=$(expr $i + 1);
+			for type in ${UBOOT_CONFIG}; do
+				j=$(expr $j + 1);
+				if [ $j -eq $i ]
+				then
+					install -d ${DEPLOYDIR}/${type}
+					install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${type}/${UBOOT_IMAGE}-${type}
+					cd ${DEPLOYDIR}/${type}
+					ln -sf ${UBOOT_IMAGE}-${type} ${UBOOT_SYMLINK}-${type}
+					ln -sf ${UBOOT_IMAGE}-${type} ${UBOOT_BINARY}
+				fi
+			done
+			unset j
+		done
+		unset i
+	else
+		install -d ${DEPLOYDIR}
+		install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+		ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
+		ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
+	fi
 }
 
 addtask deploy before do_build after do_compile
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [meta-ti] [dunfell/master PATCH 3/3] AM64x Unification: Update ti-sci-fw recipe
  2021-04-08  7:16 [dunfell/master PATCH 3/3] AM64x Unification: Update ti-sci-fw recipe Sinthu Raja M
@ 2021-04-08 13:44 ` Nishanth Menon
  2021-04-15 17:16   ` Sinthu Raja M
  0 siblings, 1 reply; 5+ messages in thread
From: Nishanth Menon @ 2021-04-08 13:44 UTC (permalink / raw)
  To: sinthu.raja; +Cc: meta-ti, Praneeth Bajjuri

On 12:46-20210408, Sinthu Raja M via lists.yoctoproject.org wrote:
> From: Sinthu Raja <x0257345@ti.com>
> 
> Updtae ti-sci-fw recipe to build for both SK and EVM compilation and
s/Updtae/Update/

> installation through one machine name


Why are we doing this? What happens to the wic file image? What is the
out of box experience for someone creating an SD image -> flash the
image then modify the sd card? how would that help?


if we are going to make things minimal, then we might just have a
headless_k3 and gui_k3 or something similar


Further, when people have their own boards, how are they supposed to add
support for their platforms?



-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-ti] [dunfell/master PATCH 3/3] AM64x Unification: Update ti-sci-fw recipe
  2021-04-08 13:44 ` [meta-ti] " Nishanth Menon
@ 2021-04-15 17:16   ` Sinthu Raja M
  2021-04-15 17:29     ` Nishanth Menon
  0 siblings, 1 reply; 5+ messages in thread
From: Sinthu Raja M @ 2021-04-15 17:16 UTC (permalink / raw)
  To: Nishanth Menon; +Cc: meta-ti, Praneeth Bajjuri

On Thu, Apr 8, 2021 at 7:14 PM Nishanth Menon <nm@ti.com> wrote:
>
> On 12:46-20210408, Sinthu Raja M via lists.yoctoproject.org wrote:
> > From: Sinthu Raja <x0257345@ti.com>
> >
> > Updtae ti-sci-fw recipe to build for both SK and EVM compilation and
> s/Updtae/Update/
>
> > installation through one machine name
>
>
> Why are we doing this? What happens to the wic file image? What is the
> out of box experience for someone creating an SD image -> flash the
> image then modify the sd card? how would that help?
>
The AM64x EVM and SK have similar rootfs, kernel and u-boot source
except for R5 SPL where EVM and SK have two different DDR
configurations.
Two different processor SDK for EVM and SK creates overhead for
customers just for the change in tiboot3.bin. Two avoid the overhead,
we are creating two
different images for EVM and SK under one MACHINE_NAME (which is am64xx-evm)

Two WIC files will be available separately for EVM and SK in the
processor SDK installer. Users can use respective WIC files for
flashing on to the respective boards.

>
> if we are going to make things minimal, then we might just have a
> headless_k3 and gui_k3 or something similar
>
>
> Further, when people have their own boards, how are they supposed to add
> support for their platforms?
>
For adding support for new platforms, it will be the same as adding
any other new platforms, these changes will not affect the default way
of adding the new board.

>
>
> --
> Regards,
> Nishanth Menon
> Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-ti] [dunfell/master PATCH 3/3] AM64x Unification: Update ti-sci-fw recipe
  2021-04-15 17:16   ` Sinthu Raja M
@ 2021-04-15 17:29     ` Nishanth Menon
  2021-04-16  8:05       ` Sinthu Raja M
  0 siblings, 1 reply; 5+ messages in thread
From: Nishanth Menon @ 2021-04-15 17:29 UTC (permalink / raw)
  To: Sinthu Raja M; +Cc: meta-ti, Praneeth Bajjuri

On 22:46-20210415, Sinthu Raja M wrote:
> On Thu, Apr 8, 2021 at 7:14 PM Nishanth Menon <nm@ti.com> wrote:
> >
> > On 12:46-20210408, Sinthu Raja M via lists.yoctoproject.org wrote:
> > > From: Sinthu Raja <x0257345@ti.com>
> > >
> > > Updtae ti-sci-fw recipe to build for both SK and EVM compilation and
> > s/Updtae/Update/
> >
> > > installation through one machine name
> >
> >
> > Why are we doing this? What happens to the wic file image? What is the
> > out of box experience for someone creating an SD image -> flash the
> > image then modify the sd card? how would that help?
> >
> The AM64x EVM and SK have similar rootfs, kernel and u-boot source
> except for R5 SPL where EVM and SK have two different DDR
> configurations.
> Two different processor SDK for EVM and SK creates overhead for
> customers just for the change in tiboot3.bin. Two avoid the overhead,
> we are creating two
> different images for EVM and SK under one MACHINE_NAME (which is am64xx-evm)
> 
> Two WIC files will be available separately for EVM and SK in the
> processor SDK installer. Users can use respective WIC files for
> flashing on to the respective boards.

since meta-yocto, meta-arago etc use the same meta-ti layer,

Could you explain how, in meta-arago/meta-ti am I generating two different wic
files with the current patch series? I am probably missing some nuance
in your patches..

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-ti] [dunfell/master PATCH 3/3] AM64x Unification: Update ti-sci-fw recipe
  2021-04-15 17:29     ` Nishanth Menon
@ 2021-04-16  8:05       ` Sinthu Raja M
  0 siblings, 0 replies; 5+ messages in thread
From: Sinthu Raja M @ 2021-04-16  8:05 UTC (permalink / raw)
  To: Nishanth Menon, denys; +Cc: meta-ti, Praneeth Bajjuri

On Thu, Apr 15, 2021 at 10:59 PM Nishanth Menon <nm@ti.com> wrote:
>
> On 22:46-20210415, Sinthu Raja M wrote:
> > On Thu, Apr 8, 2021 at 7:14 PM Nishanth Menon <nm@ti.com> wrote:
> > >
> > > On 12:46-20210408, Sinthu Raja M via lists.yoctoproject.org wrote:
> > > > From: Sinthu Raja <x0257345@ti.com>
> > > >
> > > > Updtae ti-sci-fw recipe to build for both SK and EVM compilation and
> > > s/Updtae/Update/
> > >
> > > > installation through one machine name
> > >
> > >
> > > Why are we doing this? What happens to the wic file image? What is the
> > > out of box experience for someone creating an SD image -> flash the
> > > image then modify the sd card? how would that help?
> > >
> > The AM64x EVM and SK have similar rootfs, kernel and u-boot source
> > except for R5 SPL where EVM and SK have two different DDR
> > configurations.
> > Two different processor SDK for EVM and SK creates overhead for
> > customers just for the change in tiboot3.bin. Two avoid the overhead,
> > we are creating two
> > different images for EVM and SK under one MACHINE_NAME (which is am64xx-evm)
> >
> > Two WIC files will be available separately for EVM and SK in the
> > processor SDK installer. Users can use respective WIC files for
> > flashing on to the respective boards.
>
> since meta-yocto, meta-arago etc use the same meta-ti layer,
>
> Could you explain how, in meta-arago/meta-ti am I generating two different wic
> files with the current patch series? I am probably missing some nuance
> in your patches..
>
The patch for generating two WIC files is not added in the current
patch series. I am working on an approach to generate those two WIC
files.
Below is the approach with which I have a working prototype.
1. The meta-arago layer will have two new recipes called
tisdk-base-image-evm.bb and tisdk-base-image-sk.bb for EVM and SK
respectively.
2. These two new recipes will have information on where the boot
images are available which are required for the respective WIC images,
such as IMAGE_BASENAME IMAGE_LINK_NAME IMGDEPLOYDIR  DEPLOY_DIR_IMAGE
3. The two new recipes will be given as the target images for any
bundle creation.

There is another approach which is about bringing in multiple build
machine configurations under a single machine name.
 1. Currently two build configuration such as am64xx-evm and
am64xx-evm-k3r5 are invoked for am64xx-evm
 2. Two more build configurations such as am64xx-sk and am64xx-sk-k3r5
 will be added.
 3. The u-boot and ti-sci-fw recipes will be invoked for am64xx-sk and
am64xx-sk-k3r5
 4. For WIC file generation, inside the sdk bundle recipes, the
IMAGE_BASENAME, IMAGE_LINK_NAME, IMGDEPLOYDIR and  DEPLOY_DIR_IMAGE
variable will be prefixed with am64xx-sk and respective name and path
will be updated/added. This will generate two WIC files for EVM and
SK.
 Note: This approach I don't have prototyped yet. Need your insight in
this approach on the feasibility of adding multiple build
configuration

Denys,
Could you please provide comments on the feasibility on the above approaches.

Thanks & Regards
Sinthu Raja

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-16  8:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  7:16 [dunfell/master PATCH 3/3] AM64x Unification: Update ti-sci-fw recipe Sinthu Raja M
2021-04-08 13:44 ` [meta-ti] " Nishanth Menon
2021-04-15 17:16   ` Sinthu Raja M
2021-04-15 17:29     ` Nishanth Menon
2021-04-16  8:05       ` Sinthu Raja M

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.