diff options
author | Mark Hatle <mark.hatle@amd.com> | 2022-11-21 13:17:33 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2022-11-24 07:00:36 -0800 |
commit | cda5a4c1f2c56c237ec7b099ae7fbe6162a1abd3 (patch) | |
tree | 06bbc716668716681523bfce508da691e49d5c26 /meta-xilinx-core/recipes-devtools | |
parent | 87054357b1c6a8c2adbbf01fb037c5e90beb98df (diff) | |
download | meta-xilinx-cda5a4c1f2c56c237ec7b099ae7fbe6162a1abd3.tar.gz |
qemu/qemu-native/qemu-system-native: Allow preferred provider to select Xilinx
Implement Xilinux versions to work with the PREFERRED_PROVIDER syntax. This
will prevent the non-preferred version of being used with the anonymous
python in the 'alt.inc' files.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core/recipes-devtools')
14 files changed, 58 insertions, 5 deletions
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc new file mode 100644 index 00000000..5064dc76 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc | |||
@@ -0,0 +1,19 @@ | |||
1 | PROVIDES += "qemu" | ||
2 | |||
3 | # Skip processing of this recipe if it is not explicitly specified as the | ||
4 | # PREFERRED_PROVIDER for qemu-syste-native. This avoids network access required by | ||
5 | # the use of AUTOREV SRCREVs, which may be the default for some recipes. | ||
6 | python () { | ||
7 | if bb.data.inherits_class('nativesdk', d): | ||
8 | if (not d.getVar("PREFERRED_PROVIDER_nativesdk-qemu") and "qemu" != d.getVar("PN")) or \ | ||
9 | (d.getVar("PREFERRED_PROVIDER_nativesdk-qemu") and d.getVar("PREFERRED_PROVIDER_nativesdk-qemu") != d.getVar("PN")): | ||
10 | d.delVar("BB_DONT_CACHE") | ||
11 | raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_nativesdk-qemu to %s to enable it" % (d.getVar("PN"))) | ||
12 | elif (not d.getVar("PREFERRED_PROVIDER_qemu") and "qemu" != d.getVar("PN")) or \ | ||
13 | (d.getVar("PREFERRED_PROVIDER_qemu") and d.getVar("PREFERRED_PROVIDER_qemu") != d.getVar("PN")): | ||
14 | d.delVar("BB_DONT_CACHE") | ||
15 | raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_qemu to %s to enable it" % (d.getVar("PN"))) | ||
16 | } | ||
17 | |||
18 | RPROVIDES:${PN} += "qemu" | ||
19 | RPROVIDES:${PN}-ptest += "qemu-ptest" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-native-alt.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-alt.inc new file mode 100644 index 00000000..60c79542 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-alt.inc | |||
@@ -0,0 +1,12 @@ | |||
1 | PROVIDES += "qemu-native" | ||
2 | |||
3 | # Skip processing of this recipe if it is not explicitly specified as the | ||
4 | # PREFERRED_PROVIDER for qemu-syste-native. This avoids network access required by | ||
5 | # the use of AUTOREV SRCREVs, which may be the default for some recipes. | ||
6 | python () { | ||
7 | if (not d.getVar("PREFERRED_PROVIDER_qemu-native") and "qemu-native" != d.getVar("PN")) or \ | ||
8 | (d.getVar("PREFERRED_PROVIDER_qemu-native") and d.getVar("PREFERRED_PROVIDER_qemu-native") != d.getVar("PN")): | ||
9 | d.delVar("BB_DONT_CACHE") | ||
10 | raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_qemu-native to %s to enable it" % (d.getVar("PN"))) | ||
11 | } | ||
12 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-native_%.bbappend b/meta-xilinx-core/recipes-devtools/qemu/qemu-native_%.bbappend new file mode 100644 index 00000000..d34c04ee --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-native_%.bbappend | |||
@@ -0,0 +1 @@ | |||
require qemu-native-alt.inc | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-system-native-alt.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-system-native-alt.inc new file mode 100644 index 00000000..42592c58 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-system-native-alt.inc | |||
@@ -0,0 +1,13 @@ | |||
1 | PROVIDES += "qemu-system-native" | ||
2 | |||
3 | # Skip processing of this recipe if it is not explicitly specified as the | ||
4 | # PREFERRED_PROVIDER for qemu-syste-native. This avoids network access required by | ||
5 | # the use of AUTOREV SRCREVs, which may be the default for some recipes. | ||
6 | python () { | ||
7 | if (not d.getVar("PREFERRED_PROVIDER_qemu-system-native") and "qemu-system-native" != d.getVar("PN")) or \ | ||
8 | (d.getVar("PREFERRED_PROVIDER_qemu-system-native") and d.getVar("PREFERRED_PROVIDER_qemu-system-native") != d.getVar("PN")): | ||
9 | d.delVar("BB_DONT_CACHE") | ||
10 | raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_qemu-system-native to %s to enable it" % (d.getVar("PN"))) | ||
11 | } | ||
12 | |||
13 | RPROVIDES:${PN} += "qemu-system-native" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-system-native_%.bbappend b/meta-xilinx-core/recipes-devtools/qemu/qemu-system-native_%.bbappend new file mode 100644 index 00000000..4a7810bd --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-system-native_%.bbappend | |||
@@ -0,0 +1 @@ | |||
require qemu-system-native-alt.inc | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb index a6fd9268..e0edd965 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb | |||
@@ -1,8 +1,9 @@ | |||
1 | require qemu-xilinx-2022.1.inc | 1 | require qemu-xilinx-2022.1.inc |
2 | require qemu-xilinx-native.inc | 2 | require qemu-xilinx-native.inc |
3 | require qemu-native-alt.inc | ||
4 | |||
3 | BPN = "qemu-xilinx" | 5 | BPN = "qemu-xilinx" |
4 | 6 | ||
5 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | 7 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" |
6 | 8 | ||
7 | PROVIDES = "qemu-native" | ||
8 | PACKAGECONFIG ??= "pie" | 9 | PACKAGECONFIG ??= "pie" |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb index e4f6732c..21b9e9bf 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb | |||
@@ -1,8 +1,9 @@ | |||
1 | require qemu-xilinx-2022.2.inc | 1 | require qemu-xilinx-2022.2.inc |
2 | require qemu-xilinx-native.inc | 2 | require qemu-xilinx-native.inc |
3 | require qemu-native-alt.inc | ||
4 | |||
3 | BPN = "qemu-xilinx" | 5 | BPN = "qemu-xilinx" |
4 | 6 | ||
5 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | 7 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" |
6 | 8 | ||
7 | PROVIDES = "qemu-native" | ||
8 | PACKAGECONFIG ??= "pie" | 9 | PACKAGECONFIG ??= "pie" |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb index b1cb015b..04d91948 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb | |||
@@ -1,8 +1,9 @@ | |||
1 | require qemu-xilinx-2023.1.inc | 1 | require qemu-xilinx-2023.1.inc |
2 | require qemu-xilinx-native.inc | 2 | require qemu-xilinx-native.inc |
3 | require qemu-native-alt.inc | ||
4 | |||
3 | BPN = "qemu-xilinx" | 5 | BPN = "qemu-xilinx" |
4 | 6 | ||
5 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | 7 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" |
6 | 8 | ||
7 | PROVIDES = "qemu-native" | ||
8 | PACKAGECONFIG ??= "pie" | 9 | PACKAGECONFIG ??= "pie" |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb index d67b401d..ea7d6830 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb | |||
@@ -1,3 +1,4 @@ | |||
1 | require qemu-system-native-alt.inc | ||
1 | require qemu-xilinx-2022.1.inc | 2 | require qemu-xilinx-2022.1.inc |
2 | require qemu-xilinx-native.inc | 3 | require qemu-xilinx-native.inc |
3 | 4 | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb index 8cef3db2..540ec51a 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb | |||
@@ -1,3 +1,4 @@ | |||
1 | require qemu-system-native-alt.inc | ||
1 | require qemu-xilinx-2022.2.inc | 2 | require qemu-xilinx-2022.2.inc |
2 | require qemu-xilinx-native.inc | 3 | require qemu-xilinx-native.inc |
3 | 4 | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb index 9e9d05f6..3503e2f4 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb | |||
@@ -1,6 +1,7 @@ | |||
1 | require qemu-xilinx-2022.1.inc | 1 | require qemu-xilinx-2022.1.inc |
2 | require recipes-devtools/qemu/qemu.inc | 2 | require recipes-devtools/qemu/qemu.inc |
3 | require qemu-xilinx.inc | 3 | require qemu-xilinx.inc |
4 | require qemu-alt.inc | ||
4 | 5 | ||
5 | BBCLASSEXTEND = "nativesdk" | 6 | BBCLASSEXTEND = "nativesdk" |
6 | 7 | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb index 6aac2ad6..31b9c41d 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb | |||
@@ -1,6 +1,7 @@ | |||
1 | require qemu-xilinx-2022.2.inc | 1 | require qemu-xilinx-2022.2.inc |
2 | require recipes-devtools/qemu/qemu.inc | 2 | require recipes-devtools/qemu/qemu.inc |
3 | require qemu-xilinx.inc | 3 | require qemu-xilinx.inc |
4 | require qemu-alt.inc | ||
4 | 5 | ||
5 | BBCLASSEXTEND = "nativesdk" | 6 | BBCLASSEXTEND = "nativesdk" |
6 | 7 | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb index 3d1335d4..8bca9fdc 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb | |||
@@ -1,6 +1,7 @@ | |||
1 | require qemu-xilinx-2023.1.inc | 1 | require qemu-xilinx-2023.1.inc |
2 | require recipes-devtools/qemu/qemu.inc | 2 | require recipes-devtools/qemu/qemu.inc |
3 | require qemu-xilinx.inc | 3 | require qemu-xilinx.inc |
4 | require qemu-alt.inc | ||
4 | 5 | ||
5 | BBCLASSEXTEND = "nativesdk" | 6 | BBCLASSEXTEND = "nativesdk" |
6 | 7 | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend b/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend index 53475f64..9140060e 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend | |||
@@ -1,2 +1 @@ | |||
1 | # Has a dependency on libmali | require qemu-alt.inc | |
2 | PACKAGE_ARCH:mali400 = "${MACHINE_ARCH}" | ||