[meta-arm,2/2] arm-bsp/scp-firmware: Build SCP MCP firmware for N1SDP

Submitted by Khasim Mohammed on June 22, 2020, 2:17 p.m. | Patch ID: 173779

Details

Message ID 20200622141735.4951-2-khasim.mohammed@arm.com
State New
Headers show

Commit Message

Khasim Mohammed June 22, 2020, 2:17 p.m.
- Add bbappend recipe to build SCP and MCP firmware
  for N1SDP.
- Use fiptool to package the binary images
- Update machine conf to add image dependency
  for SCP-firmware components

Issue-Id: PLATFORMS-3134

Change-Id: I24bb427179f2fdee0a8351257c9088d8024ca6b8
Signed-off-by: Patrik Berglund <patrik.berglund@arm.com>
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
---
 meta-arm-bsp/conf/machine/n1sdp.conf          |  1 +
 .../scp-firmware/scp-firmware-n1sdp.inc       | 32 +++++++++++++++++++
 .../scp-firmware/scp-firmware_git.bbappend    |  7 ++++
 3 files changed, 40 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
 create mode 100644 meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend

Patch hide | download patch | download mbox

diff --git a/meta-arm-bsp/conf/machine/n1sdp.conf b/meta-arm-bsp/conf/machine/n1sdp.conf
index 20eaf27..755bb09 100644
--- a/meta-arm-bsp/conf/machine/n1sdp.conf
+++ b/meta-arm-bsp/conf/machine/n1sdp.conf
@@ -27,6 +27,7 @@  PREFERRED_PROVIDER_virtual/trusted-firmware-a ?= "trusted-firmware-a"
 PREFERRED_VERSION_trusted-firmware-a ?= "2.2%"
 
 EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a"
+EXTRA_IMAGEDEPENDS += "virtual/control-processor-firmware"
 
 #UEFI EDK2 firmware
 EXTRA_IMAGEDEPENDS += "virtual/uefi-firmware"
diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
new file mode 100644
index 0000000..ddbaac4
--- /dev/null
+++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
@@ -0,0 +1,32 @@ 
+# N1SDP specific SCP configurations and build instructions
+
+SRCREV_scp    = "fd7c83561a7d76c7681d5d017fb23aa3664c028c"
+SRCREV_cmsis  = "refs/tags/5.2.0"
+SCP_PLATFORM  = "n1sdp"
+SCP_LOG_LEVEL = "INFO"
+
+COMPATIBLE_MACHINE_n1sdp = "n1sdp"
+
+PV = "2.6+git${SRCPV}"
+
+DEPENDS += "fiptool-native"
+DEPENDS += "virtual/trusted-firmware-a"
+
+do_install_append() {
+   fiptool \
+       create \
+       --scp-fw "${D}/firmware/scp_ramfw.bin" \
+       --soc-fw "${RECIPE_SYSROOT}/firmware/bl31.bin" \
+       "scp_fw.bin"
+
+   fiptool \
+       create \
+       --blob uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file="${D}/firmware/mcp_ramfw.bin" \
+       "mcp_fw.bin"
+
+   install "scp_fw.bin" "${D}/firmware/scp_fw.bin"
+   install "mcp_fw.bin" "${D}/firmware/mcp_fw.bin"
+
+   ln -sf "scp_romfw.bin" "${D}/firmware/scp_rom.bin"
+   ln -sf "mcp_romfw.bin" "${D}/firmware/mcp_rom.bin"
+}
diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend
new file mode 100644
index 0000000..53bd022
--- /dev/null
+++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend
@@ -0,0 +1,7 @@ 
+# Include machine specific SCP configurations
+
+MACHINE_SCP_REQUIRE ?= ""
+
+MACHINE_SCP_REQUIRE_n1sdp = "scp-firmware-n1sdp.inc"
+
+require ${MACHINE_SCP_REQUIRE}

Comments

Diego Sueiro June 23, 2020, 7:05 a.m.
On Mon, Jun 22, 2020 at 03:18 PM, Khasim Mohammed wrote:

>
> - Add bbappend recipe to build SCP and MCP firmware
>   for N1SDP.
> - Use fiptool to package the binary images
> - Update machine conf to add image dependency
>   for SCP-firmware components
> 
> Issue-Id: PLATFORMS-3134
> 
> Change-Id: I24bb427179f2fdee0a8351257c9088d8024ca6b8
> Signed-off-by: Patrik Berglund <patrik.berglund@arm.com>
> Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>

Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>

> ---
>  meta-arm-bsp/conf/machine/n1sdp.conf          |  1 +
>  .../scp-firmware/scp-firmware-n1sdp.inc       | 32 +++++++++++++++++++
>  .../scp-firmware/scp-firmware_git.bbappend    |  7 ++++
>  3 files changed, 40 insertions(+)
>  create mode 100644
> meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
>  create mode 100644
> meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend
> 
> diff --git a/meta-arm-bsp/conf/machine/n1sdp.conf
> b/meta-arm-bsp/conf/machine/n1sdp.conf
> index 20eaf27..755bb09 100644
> --- a/meta-arm-bsp/conf/machine/n1sdp.conf
> +++ b/meta-arm-bsp/conf/machine/n1sdp.conf
> @@ -27,6 +27,7 @@ PREFERRED_PROVIDER_virtual/trusted-firmware-a ?=
> "trusted-firmware-a"
>  PREFERRED_VERSION_trusted-firmware-a ?= "2.2%"
>  
>  EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a"
> +EXTRA_IMAGEDEPENDS += "virtual/control-processor-firmware"
>  
>  #UEFI EDK2 firmware
>  EXTRA_IMAGEDEPENDS += "virtual/uefi-firmware"
> diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
> b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
> new file mode 100644
> index 0000000..ddbaac4
> --- /dev/null
> +++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
> @@ -0,0 +1,32 @@
> +# N1SDP specific SCP configurations and build instructions
> +
> +SRCREV_scp    = "fd7c83561a7d76c7681d5d017fb23aa3664c028c"
> +SRCREV_cmsis  = "refs/tags/5.2.0"
> +SCP_PLATFORM  = "n1sdp"
> +SCP_LOG_LEVEL = "INFO"
> +
> +COMPATIBLE_MACHINE_n1sdp = "n1sdp"
> +
> +PV = "2.6+git${SRCPV}"
> +
> +DEPENDS += "fiptool-native"
> +DEPENDS += "virtual/trusted-firmware-a"
> +
> +do_install_append() {
> +   fiptool \
> +       create \
> +       --scp-fw "${D}/firmware/scp_ramfw.bin" \
> +       --soc-fw "${RECIPE_SYSROOT}/firmware/bl31.bin" \
> +       "scp_fw.bin"
> +
> +   fiptool \
> +       create \
> +       --blob
> uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file="${D}/firmware/mcp_ramfw.bin" \
> +       "mcp_fw.bin"
> +
> +   install "scp_fw.bin" "${D}/firmware/scp_fw.bin"
> +   install "mcp_fw.bin" "${D}/firmware/mcp_fw.bin"
> +
> +   ln -sf "scp_romfw.bin" "${D}/firmware/scp_rom.bin"
> +   ln -sf "mcp_romfw.bin" "${D}/firmware/mcp_rom.bin"
> +}
> diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend
> b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend
> new file mode 100644
> index 0000000..53bd022
> --- /dev/null
> +++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend
> @@ -0,0 +1,7 @@
> +# Include machine specific SCP configurations
> +
> +MACHINE_SCP_REQUIRE ?= ""
> +
> +MACHINE_SCP_REQUIRE_n1sdp = "scp-firmware-n1sdp.inc"
> +
> +require ${MACHINE_SCP_REQUIRE}
> -- 
> 2.17.1
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#745): https://lists.yoctoproject.org/g/meta-arm/message/745
Mute This Topic: https://lists.yoctoproject.org/mt/75039153/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Jon Mason June 24, 2020, 6:40 p.m.
On Tue, Jun 23, 2020 at 12:05:47AM -0700, Diego Sueiro wrote:
> On Mon, Jun 22, 2020 at 03:18 PM, Khasim Mohammed wrote:
> 
> >
> > - Add bbappend recipe to build SCP and MCP firmware
> >   for N1SDP.
> > - Use fiptool to package the binary images
> > - Update machine conf to add image dependency
> >   for SCP-firmware components
> > 
> > Issue-Id: PLATFORMS-3134
> > 
> > Change-Id: I24bb427179f2fdee0a8351257c9088d8024ca6b8
> > Signed-off-by: Patrik Berglund <patrik.berglund@arm.com>
> > Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
> 
> Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>

Pulled into master.

Thanks,
Jon

> 
> > ---
> >  meta-arm-bsp/conf/machine/n1sdp.conf          |  1 +
> >  .../scp-firmware/scp-firmware-n1sdp.inc       | 32 +++++++++++++++++++
> >  .../scp-firmware/scp-firmware_git.bbappend    |  7 ++++
> >  3 files changed, 40 insertions(+)
> >  create mode 100644
> > meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
> >  create mode 100644
> > meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend
> > 
> > diff --git a/meta-arm-bsp/conf/machine/n1sdp.conf
> > b/meta-arm-bsp/conf/machine/n1sdp.conf
> > index 20eaf27..755bb09 100644
> > --- a/meta-arm-bsp/conf/machine/n1sdp.conf
> > +++ b/meta-arm-bsp/conf/machine/n1sdp.conf
> > @@ -27,6 +27,7 @@ PREFERRED_PROVIDER_virtual/trusted-firmware-a ?=
> > "trusted-firmware-a"
> >  PREFERRED_VERSION_trusted-firmware-a ?= "2.2%"
> >
> >  EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a"
> > +EXTRA_IMAGEDEPENDS += "virtual/control-processor-firmware"
> >
> >  #UEFI EDK2 firmware
> >  EXTRA_IMAGEDEPENDS += "virtual/uefi-firmware"
> > diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
> > b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
> > new file mode 100644
> > index 0000000..ddbaac4
> > --- /dev/null
> > +++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-n1sdp.inc
> > @@ -0,0 +1,32 @@
> > +# N1SDP specific SCP configurations and build instructions
> > +
> > +SRCREV_scp    = "fd7c83561a7d76c7681d5d017fb23aa3664c028c"
> > +SRCREV_cmsis  = "refs/tags/5.2.0"
> > +SCP_PLATFORM  = "n1sdp"
> > +SCP_LOG_LEVEL = "INFO"
> > +
> > +COMPATIBLE_MACHINE_n1sdp = "n1sdp"
> > +
> > +PV = "2.6+git${SRCPV}"
> > +
> > +DEPENDS += "fiptool-native"
> > +DEPENDS += "virtual/trusted-firmware-a"
> > +
> > +do_install_append() {
> > +   fiptool \
> > +       create \
> > +       --scp-fw "${D}/firmware/scp_ramfw.bin" \
> > +       --soc-fw "${RECIPE_SYSROOT}/firmware/bl31.bin" \
> > +       "scp_fw.bin"
> > +
> > +   fiptool \
> > +       create \
> > +       --blob
> > uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file="${D}/firmware/mcp_ramfw.bin" \
> > +       "mcp_fw.bin"
> > +
> > +   install "scp_fw.bin" "${D}/firmware/scp_fw.bin"
> > +   install "mcp_fw.bin" "${D}/firmware/mcp_fw.bin"
> > +
> > +   ln -sf "scp_romfw.bin" "${D}/firmware/scp_rom.bin"
> > +   ln -sf "mcp_romfw.bin" "${D}/firmware/mcp_rom.bin"
> > +}
> > diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend
> > b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend
> > new file mode 100644
> > index 0000000..53bd022
> > --- /dev/null
> > +++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_git.bbappend
> > @@ -0,0 +1,7 @@
> > +# Include machine specific SCP configurations
> > +
> > +MACHINE_SCP_REQUIRE ?= ""
> > +
> > +MACHINE_SCP_REQUIRE_n1sdp = "scp-firmware-n1sdp.inc"
> > +
> > +require ${MACHINE_SCP_REQUIRE}
> > -- 
> > 2.17.1
> > 
> >

>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#756): https://lists.yoctoproject.org/g/meta-arm/message/756
Mute This Topic: https://lists.yoctoproject.org/mt/75039153/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-