[3/4] gem5/linux-yocto: use wildcards in the bbappend

Message ID 20220211114527.4157075-3-ross.burton@arm.com
State New
Headers show
Series [1/4] CI: add meta-gem5 to the pending upgrades report | expand

Commit Message

Ross Burton Feb. 11, 2022, 11:45 a.m. UTC
Don't hard-code 5.4, use wildcards instead.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../recipes-kernel/linux/linux-yocto_%.bbappend      | 11 +++++++++++
 .../recipes-kernel/linux/linux-yocto_5.4.bbappend    | 12 ------------
 2 files changed, 11 insertions(+), 12 deletions(-)
 create mode 100644 meta-gem5/recipes-kernel/linux/linux-yocto_%.bbappend

Comments

Denys Dmytriyenko Feb. 11, 2022, 6:57 p.m. UTC | #1
Why not use --find-renames so the patch like this is more readable and 
reviewable?


On Fri, Feb 11, 2022 at 11:45:26AM +0000, Ross Burton wrote:
> Don't hard-code 5.4, use wildcards instead.
> 
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  .../recipes-kernel/linux/linux-yocto_%.bbappend      | 11 +++++++++++
>  .../recipes-kernel/linux/linux-yocto_5.4.bbappend    | 12 ------------
>  2 files changed, 11 insertions(+), 12 deletions(-)
>  create mode 100644 meta-gem5/recipes-kernel/linux/linux-yocto_%.bbappend
> 
> diff --git a/meta-gem5/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-gem5/recipes-kernel/linux/linux-yocto_%.bbappend
> new file mode 100644
> index 00000000..b36ea064
> --- /dev/null
> +++ b/meta-gem5/recipes-kernel/linux/linux-yocto_%.bbappend
> @@ -0,0 +1,11 @@
> +FILESEXTRAPATHS:prepend:gem5-arm64 := "${THISDIR}:${THISDIR}/files:"
> +
> +COMPATIBLE_MACHINE:gem5-arm64 = "gem5-arm64"
> +KMACHINE:gem5-arm64 = "gem5-arm64"
> +SRC_URI:append:gem5-arm64 = " file://gem5-kmeta;type=kmeta;name=gem5-kmeta;destsuffix=gem5-kmeta \
> +                              file://dts/gem5-arm64;subdir=add-files"
> +
> +do_patch:append:gem5-arm64() {
> +    tar -C ${WORKDIR}/add-files/dts -cf - gem5-arm64 | \
> +        tar -C arch/arm64/boot/dts -xf -
> +}
> diff --git a/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bbappend b/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bbappend
> index 480c5e23..078b684f 100644
> --- a/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bbappend
> +++ b/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bbappend
> @@ -1,13 +1 @@
> -FILESEXTRAPATHS:prepend := "${THISDIR}:${THISDIR}/files:"
> -
>  require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'recipes-kernel/linux/linux-yocto_virtualization.inc', '', d)}
> -
> -COMPATIBLE_MACHINE:gem5-arm64 = "gem5-arm64"
> -KMACHINE:gem5-arm64 = "gem5-arm64"
> -SRC_URI:append:gem5-arm64 = " file://gem5-kmeta;type=kmeta;name=gem5-kmeta;destsuffix=gem5-kmeta \
> -                              file://dts/gem5-arm64;subdir=add-files"
> -
> -do_patch:append:gem5-arm64() {
> -    tar -C ${WORKDIR}/add-files/dts -cf - gem5-arm64 | \
> -        tar -C arch/arm64/boot/dts -xf -
> -}
> -- 
> 2.25.1
>

Patch

diff --git a/meta-gem5/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-gem5/recipes-kernel/linux/linux-yocto_%.bbappend
new file mode 100644
index 00000000..b36ea064
--- /dev/null
+++ b/meta-gem5/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -0,0 +1,11 @@ 
+FILESEXTRAPATHS:prepend:gem5-arm64 := "${THISDIR}:${THISDIR}/files:"
+
+COMPATIBLE_MACHINE:gem5-arm64 = "gem5-arm64"
+KMACHINE:gem5-arm64 = "gem5-arm64"
+SRC_URI:append:gem5-arm64 = " file://gem5-kmeta;type=kmeta;name=gem5-kmeta;destsuffix=gem5-kmeta \
+                              file://dts/gem5-arm64;subdir=add-files"
+
+do_patch:append:gem5-arm64() {
+    tar -C ${WORKDIR}/add-files/dts -cf - gem5-arm64 | \
+        tar -C arch/arm64/boot/dts -xf -
+}
diff --git a/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bbappend b/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bbappend
index 480c5e23..078b684f 100644
--- a/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bbappend
+++ b/meta-gem5/recipes-kernel/linux/linux-yocto_5.4.bbappend
@@ -1,13 +1 @@ 
-FILESEXTRAPATHS:prepend := "${THISDIR}:${THISDIR}/files:"
-
 require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'recipes-kernel/linux/linux-yocto_virtualization.inc', '', d)}
-
-COMPATIBLE_MACHINE:gem5-arm64 = "gem5-arm64"
-KMACHINE:gem5-arm64 = "gem5-arm64"
-SRC_URI:append:gem5-arm64 = " file://gem5-kmeta;type=kmeta;name=gem5-kmeta;destsuffix=gem5-kmeta \
-                              file://dts/gem5-arm64;subdir=add-files"
-
-do_patch:append:gem5-arm64() {
-    tar -C ${WORKDIR}/add-files/dts -cf - gem5-arm64 | \
-        tar -C arch/arm64/boot/dts -xf -
-}