[meta-arm,1/9] arm/scp-firmware: merge bb/inc

Submitted by Ross Burton on July 29, 2020, 10:11 a.m. | Patch ID: 174871

Details

Message ID 20200729101145.1794231-1-ross@burtonini.com
State New
Headers show

Commit Message

Ross Burton July 29, 2020, 10:11 a.m.
From: Ross Burton <ross.burton@arm.com>

There's no other recipe that uses scp-firmware.inc, so merge it into the
recipe for clarity.

Change-Id: Ife1874b54c8b2be2704e1d0f5a7013ff89b8ca6e
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../recipes-bsp/scp-firmware/scp-firmware.inc | 73 -------------------
 .../scp-firmware/scp-firmware_git.bb          | 73 ++++++++++++++++++-
 2 files changed, 72 insertions(+), 74 deletions(-)
 delete mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc

Patch hide | download patch | download mbox

diff --git a/meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc b/meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc
deleted file mode 100644
index 2db59d3..0000000
--- a/meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc
+++ /dev/null
@@ -1,73 +0,0 @@ 
-SUMMARY = "SCP and MCP Firmware"
-
-PROVIDES += "virtual/control-processor-firmware"
-
-SCP_BUILD_RELEASE   ?= "1"
-SCP_COMPILE_VERBOSE ?= "0"
-SCP_PLATFORM        ?= "invalid"
-SCP_COMPILER        ?= "arm-none-eabi"
-SCP_LOG_LEVEL       ?= "WARN"
-
-DEPENDS += "virtual/arm-none-eabi-gcc-native"
-
-SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1', 'release', 'debug', d)}"
-SCP_COMP_STR  = "${@bb.utils.contains('SCP_COMPILE_VERBOSE', '0', '', 'V=1', d)}"
-
-inherit python3native
-inherit deploy
-
-B = "${WORKDIR}/build"
-S = "${WORKDIR}/src"
-
-# Allow platform specific copying of only scp or both scp & mcp, default to both
-FW_TARGETS ?= "scp mcp"
-
-COMPATIBLE_MACHINE ?= "invalid"
-
-LDFLAGS[unexport] = "1"
-
-# The gcc-arm-none-eabi version does not support -fmacro-prefix-max
-DEBUG_PREFIX_MAP_pn-scp = "\
-    -fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
-    -fdebug-prefix-map=${STAGING_DIR_HOST}= \
-    -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
-"
-
-# No configure
-do_configure[noexec] = "1"
-
-EXTRA_OEMAKE = "${SCP_COMP_STR} \
-                BUILD_PATH='${B}' \
-                PRODUCT='${SCP_PLATFORM}' \
-                MODE='${SCP_BUILD_STR}' \
-                LOG_LEVEL='${SCP_LOG_LEVEL}' \
-                CC='${SCP_COMPILER}-gcc' \
-                AR='${SCP_COMPILER}-ar' \
-                SIZE='${SCP_COMPILER}-size' \
-                OBJCOPY='${SCP_COMPILER}-objcopy' \
-                "
-
-do_compile() {
-    oe_runmake -C "${S}" ${EXTRA_OEMAKE}
-}
-do_compile[cleandirs] += "${B}"
-
-do_install() {
-     install -d ${D}/firmware
-     for FW in ${FW_TARGETS}; do
-        for TYPE in ramfw romfw; do
-           install -D "${B}/product/${SCP_PLATFORM}/${FW}_${TYPE}/release/bin/${FW}_${TYPE}.bin" "${D}/firmware/"
-        done
-     done
-}
-
-FILES_${PN} = "/firmware"
-SYSROOT_DIRS += "/firmware"
-# Skip QA check for relocations in .text of elf binaries
-INSANE_SKIP_${PN} = "textrel"
-
-do_deploy() {
-    # Copy the images to deploy directory
-    cp -rf ${D}/firmware/* ${DEPLOYDIR}/
-}
-addtask deploy after do_install
diff --git a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb
index 9cb8b64..e9d8057 100644
--- a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb
+++ b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb
@@ -1,3 +1,4 @@ 
+SUMMARY = "SCP and MCP Firmware"
 DESCRIPTION = "Firmware for SCP and MCP software reference implementation"
 HOMEPAGE = "https://github.com/ARM-software/SCP-firmware"
 
@@ -17,4 +18,74 @@  SRCREV_scp    = "fd7c83561a7d76c7681d5d017fb23aa3664c028c"
 SRCREV_cmsis  = "refs/tags/5.2.0"
 SRCREV_FORMAT = "scp_cmsis"
 
-require scp-firmware.inc
+PROVIDES += "virtual/control-processor-firmware"
+
+SCP_BUILD_RELEASE   ?= "1"
+SCP_COMPILE_VERBOSE ?= "0"
+SCP_PLATFORM        ?= "invalid"
+SCP_COMPILER        ?= "arm-none-eabi"
+SCP_LOG_LEVEL       ?= "WARN"
+
+DEPENDS += "virtual/arm-none-eabi-gcc-native"
+
+SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1', 'release', 'debug', d)}"
+SCP_COMP_STR  = "${@bb.utils.contains('SCP_COMPILE_VERBOSE', '0', '', 'V=1', d)}"
+
+inherit python3native
+inherit deploy
+
+B = "${WORKDIR}/build"
+S = "${WORKDIR}/src"
+
+# Allow platform specific copying of only scp or both scp & mcp, default to both
+FW_TARGETS ?= "scp mcp"
+
+COMPATIBLE_MACHINE ?= "invalid"
+
+LDFLAGS[unexport] = "1"
+
+# The gcc-arm-none-eabi version does not support -fmacro-prefix-max
+DEBUG_PREFIX_MAP_pn-scp = "\
+    -fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+    -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+    -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+"
+
+# No configure
+do_configure[noexec] = "1"
+
+EXTRA_OEMAKE = "${SCP_COMP_STR} \
+                BUILD_PATH='${B}' \
+                PRODUCT='${SCP_PLATFORM}' \
+                MODE='${SCP_BUILD_STR}' \
+                LOG_LEVEL='${SCP_LOG_LEVEL}' \
+                CC='${SCP_COMPILER}-gcc' \
+                AR='${SCP_COMPILER}-ar' \
+                SIZE='${SCP_COMPILER}-size' \
+                OBJCOPY='${SCP_COMPILER}-objcopy' \
+                "
+
+do_compile() {
+    oe_runmake -C "${S}" ${EXTRA_OEMAKE}
+}
+do_compile[cleandirs] += "${B}"
+
+do_install() {
+     install -d ${D}/firmware
+     for FW in ${FW_TARGETS}; do
+        for TYPE in ramfw romfw; do
+           install -D "${B}/product/${SCP_PLATFORM}/${FW}_${TYPE}/release/bin/${FW}_${TYPE}.bin" "${D}/firmware/"
+        done
+     done
+}
+
+FILES_${PN} = "/firmware"
+SYSROOT_DIRS += "/firmware"
+# Skip QA check for relocations in .text of elf binaries
+INSANE_SKIP_${PN} = "textrel"
+
+do_deploy() {
+    # Copy the images to deploy directory
+    cp -rf ${D}/firmware/* ${DEPLOYDIR}/
+}
+addtask deploy after do_install

Comments

Jon Mason July 30, 2020, 7:55 p.m.
On Wed, Jul 29, 2020 at 11:11:37AM +0100, Ross Burton wrote:
> From: Ross Burton <ross.burton@arm.com>
> 
> There's no other recipe that uses scp-firmware.inc, so merge it into the
> recipe for clarity.
> 
> Change-Id: Ife1874b54c8b2be2704e1d0f5a7013ff89b8ca6e
> Signed-off-by: Ross Burton <ross.burton@arm.com>

Series added to master.

Thanks,
Jon

> ---
>  .../recipes-bsp/scp-firmware/scp-firmware.inc | 73 -------------------
>  .../scp-firmware/scp-firmware_git.bb          | 73 ++++++++++++++++++-
>  2 files changed, 72 insertions(+), 74 deletions(-)
>  delete mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc
> 
> diff --git a/meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc b/meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc
> deleted file mode 100644
> index 2db59d3..0000000
> --- a/meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc
> +++ /dev/null
> @@ -1,73 +0,0 @@
> -SUMMARY = "SCP and MCP Firmware"
> -
> -PROVIDES += "virtual/control-processor-firmware"
> -
> -SCP_BUILD_RELEASE   ?= "1"
> -SCP_COMPILE_VERBOSE ?= "0"
> -SCP_PLATFORM        ?= "invalid"
> -SCP_COMPILER        ?= "arm-none-eabi"
> -SCP_LOG_LEVEL       ?= "WARN"
> -
> -DEPENDS += "virtual/arm-none-eabi-gcc-native"
> -
> -SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1', 'release', 'debug', d)}"
> -SCP_COMP_STR  = "${@bb.utils.contains('SCP_COMPILE_VERBOSE', '0', '', 'V=1', d)}"
> -
> -inherit python3native
> -inherit deploy
> -
> -B = "${WORKDIR}/build"
> -S = "${WORKDIR}/src"
> -
> -# Allow platform specific copying of only scp or both scp & mcp, default to both
> -FW_TARGETS ?= "scp mcp"
> -
> -COMPATIBLE_MACHINE ?= "invalid"
> -
> -LDFLAGS[unexport] = "1"
> -
> -# The gcc-arm-none-eabi version does not support -fmacro-prefix-max
> -DEBUG_PREFIX_MAP_pn-scp = "\
> -    -fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
> -    -fdebug-prefix-map=${STAGING_DIR_HOST}= \
> -    -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
> -"
> -
> -# No configure
> -do_configure[noexec] = "1"
> -
> -EXTRA_OEMAKE = "${SCP_COMP_STR} \
> -                BUILD_PATH='${B}' \
> -                PRODUCT='${SCP_PLATFORM}' \
> -                MODE='${SCP_BUILD_STR}' \
> -                LOG_LEVEL='${SCP_LOG_LEVEL}' \
> -                CC='${SCP_COMPILER}-gcc' \
> -                AR='${SCP_COMPILER}-ar' \
> -                SIZE='${SCP_COMPILER}-size' \
> -                OBJCOPY='${SCP_COMPILER}-objcopy' \
> -                "
> -
> -do_compile() {
> -    oe_runmake -C "${S}" ${EXTRA_OEMAKE}
> -}
> -do_compile[cleandirs] += "${B}"
> -
> -do_install() {
> -     install -d ${D}/firmware
> -     for FW in ${FW_TARGETS}; do
> -        for TYPE in ramfw romfw; do
> -           install -D "${B}/product/${SCP_PLATFORM}/${FW}_${TYPE}/release/bin/${FW}_${TYPE}.bin" "${D}/firmware/"
> -        done
> -     done
> -}
> -
> -FILES_${PN} = "/firmware"
> -SYSROOT_DIRS += "/firmware"
> -# Skip QA check for relocations in .text of elf binaries
> -INSANE_SKIP_${PN} = "textrel"
> -
> -do_deploy() {
> -    # Copy the images to deploy directory
> -    cp -rf ${D}/firmware/* ${DEPLOYDIR}/
> -}
> -addtask deploy after do_install
> diff --git a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb
> index 9cb8b64..e9d8057 100644
> --- a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb
> +++ b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb
> @@ -1,3 +1,4 @@
> +SUMMARY = "SCP and MCP Firmware"
>  DESCRIPTION = "Firmware for SCP and MCP software reference implementation"
>  HOMEPAGE = "https://github.com/ARM-software/SCP-firmware"
>  
> @@ -17,4 +18,74 @@ SRCREV_scp    = "fd7c83561a7d76c7681d5d017fb23aa3664c028c"
>  SRCREV_cmsis  = "refs/tags/5.2.0"
>  SRCREV_FORMAT = "scp_cmsis"
>  
> -require scp-firmware.inc
> +PROVIDES += "virtual/control-processor-firmware"
> +
> +SCP_BUILD_RELEASE   ?= "1"
> +SCP_COMPILE_VERBOSE ?= "0"
> +SCP_PLATFORM        ?= "invalid"
> +SCP_COMPILER        ?= "arm-none-eabi"
> +SCP_LOG_LEVEL       ?= "WARN"
> +
> +DEPENDS += "virtual/arm-none-eabi-gcc-native"
> +
> +SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1', 'release', 'debug', d)}"
> +SCP_COMP_STR  = "${@bb.utils.contains('SCP_COMPILE_VERBOSE', '0', '', 'V=1', d)}"
> +
> +inherit python3native
> +inherit deploy
> +
> +B = "${WORKDIR}/build"
> +S = "${WORKDIR}/src"
> +
> +# Allow platform specific copying of only scp or both scp & mcp, default to both
> +FW_TARGETS ?= "scp mcp"
> +
> +COMPATIBLE_MACHINE ?= "invalid"
> +
> +LDFLAGS[unexport] = "1"
> +
> +# The gcc-arm-none-eabi version does not support -fmacro-prefix-max
> +DEBUG_PREFIX_MAP_pn-scp = "\
> +    -fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
> +    -fdebug-prefix-map=${STAGING_DIR_HOST}= \
> +    -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
> +"
> +
> +# No configure
> +do_configure[noexec] = "1"
> +
> +EXTRA_OEMAKE = "${SCP_COMP_STR} \
> +                BUILD_PATH='${B}' \
> +                PRODUCT='${SCP_PLATFORM}' \
> +                MODE='${SCP_BUILD_STR}' \
> +                LOG_LEVEL='${SCP_LOG_LEVEL}' \
> +                CC='${SCP_COMPILER}-gcc' \
> +                AR='${SCP_COMPILER}-ar' \
> +                SIZE='${SCP_COMPILER}-size' \
> +                OBJCOPY='${SCP_COMPILER}-objcopy' \
> +                "
> +
> +do_compile() {
> +    oe_runmake -C "${S}" ${EXTRA_OEMAKE}
> +}
> +do_compile[cleandirs] += "${B}"
> +
> +do_install() {
> +     install -d ${D}/firmware
> +     for FW in ${FW_TARGETS}; do
> +        for TYPE in ramfw romfw; do
> +           install -D "${B}/product/${SCP_PLATFORM}/${FW}_${TYPE}/release/bin/${FW}_${TYPE}.bin" "${D}/firmware/"
> +        done
> +     done
> +}
> +
> +FILES_${PN} = "/firmware"
> +SYSROOT_DIRS += "/firmware"
> +# Skip QA check for relocations in .text of elf binaries
> +INSANE_SKIP_${PN} = "textrel"
> +
> +do_deploy() {
> +    # Copy the images to deploy directory
> +    cp -rf ${D}/firmware/* ${DEPLOYDIR}/
> +}
> +addtask deploy after do_install
> -- 
> 2.26.2
> 

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

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