summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-10-03 16:15:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-10-03 17:51:39 +0100
commitacb7ed711762bb16cda8726c2a419bbbc4ddd35d (patch)
treea99b218371b8b0b4136e73d636044c44543dcf64
parent6b01b0e301ced27a9afa255575ef7772002b04ec (diff)
downloadpoky-acb7ed711762bb16cda8726c2a419bbbc4ddd35d.tar.gz
oeqa/selftest/bblock/fitimage: Fix changing MACHINE during the test
With config fragments, changing MACHINE in the test like this no longer works. Use the forcevarable override to allow it to work. This also needs a tweak to bitbake to work correctly, sent seperately. Whilst ugly, this avoids the need to start changing config fragments. (From OE-Core rev: b717af0d92fae0545da458cbaccfa17f266c62f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/bblock.py4
-rw-r--r--meta/lib/oeqa/selftest/cases/fitimage.py26
2 files changed, 15 insertions, 15 deletions
diff --git a/meta/lib/oeqa/selftest/cases/bblock.py b/meta/lib/oeqa/selftest/cases/bblock.py
index 2b62d2a0aa..cb99d32bb5 100644
--- a/meta/lib/oeqa/selftest/cases/bblock.py
+++ b/meta/lib/oeqa/selftest/cases/bblock.py
@@ -122,11 +122,11 @@ class BBLock(OESelftestTestCase):
122 else: 122 else:
123 machine = "qemux86-64" 123 machine = "qemux86-64"
124 124
125 self.write_config('MACHINE = "%s"\n' % machine) 125 self.write_config('MACHINE:forcevariable = "%s"\n' % machine)
126 126
127 self.lock_recipes(recipes, tasks) 127 self.lock_recipes(recipes, tasks)
128 128
129 self.write_config('MACHINE = "%s"\n' % self.td["MACHINE"]) 129 self.write_config('MACHINE:forcevariable = "%s"\n' % self.td["MACHINE"])
130 # modify quilt's do_compile task 130 # modify quilt's do_compile task
131 self.modify_tasks(recipes, tasks) 131 self.modify_tasks(recipes, tasks)
132 132
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py
index 3c40857747..195b9ee8b5 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -787,7 +787,7 @@ FIT_CONF_PREFIX = "foo-"
787 787
788 config = """ 788 config = """
789DISTRO = "poky" 789DISTRO = "poky"
790MACHINE = "beaglebone-yocto" 790MACHINE:forcevariable = "beaglebone-yocto"
791""" 791"""
792 self.write_config(config) 792 self.write_config(config)
793 793
@@ -828,7 +828,7 @@ MACHINE = "beaglebone-yocto"
828 """ 828 """
829 config = """ 829 config = """
830# Enable creation of fitImage 830# Enable creation of fitImage
831MACHINE = "beaglebone-yocto" 831MACHINE:forcevariable = "beaglebone-yocto"
832# Add a devicetree overlay which does not need kernel sources 832# Add a devicetree overlay which does not need kernel sources
833PREFERRED_PROVIDER_virtual/dtb = "bbb-dtbs-as-ext" 833PREFERRED_PROVIDER_virtual/dtb = "bbb-dtbs-as-ext"
834""" 834"""
@@ -855,7 +855,7 @@ PREFERRED_PROVIDER_virtual/dtb = "bbb-dtbs-as-ext"
855 # Generate a configuration section which gets included into the local.conf file 855 # Generate a configuration section which gets included into the local.conf file
856 config = """ 856 config = """
857# Enable creation of fitImage 857# Enable creation of fitImage
858MACHINE = "beaglebone-yocto" 858MACHINE:forcevariable = "beaglebone-yocto"
859UBOOT_SIGN_ENABLE = "1" 859UBOOT_SIGN_ENABLE = "1"
860UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys" 860UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys"
861UBOOT_SIGN_KEYNAME = "dev" 861UBOOT_SIGN_KEYNAME = "dev"
@@ -903,7 +903,7 @@ FIT_CONF_DEFAULT_DTB = "am335x-bonegreen.dtb"
903 # Generate a configuration section which gets included into the local.conf file 903 # Generate a configuration section which gets included into the local.conf file
904 config = """ 904 config = """
905# Enable creation of fitImage 905# Enable creation of fitImage
906MACHINE = "beaglebone-yocto" 906MACHINE:forcevariable = "beaglebone-yocto"
907UBOOT_SIGN_ENABLE = "1" 907UBOOT_SIGN_ENABLE = "1"
908FIT_GENERATE_KEYS = "1" 908FIT_GENERATE_KEYS = "1"
909UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys" 909UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys"
@@ -939,7 +939,7 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'"
939 939
940 config = """ 940 config = """
941DISTRO = "poky" 941DISTRO = "poky"
942MACHINE = "beaglebone-yocto" 942MACHINE:forcevariable = "beaglebone-yocto"
943INITRAMFS_IMAGE = "core-image-minimal-initramfs" 943INITRAMFS_IMAGE = "core-image-minimal-initramfs"
944INITRAMFS_SCRIPTS = "" 944INITRAMFS_SCRIPTS = ""
945UBOOT_MACHINE = "am335x_evm_defconfig" 945UBOOT_MACHINE = "am335x_evm_defconfig"
@@ -993,7 +993,7 @@ FIT_HASH_ALG = "sha256"
993 993
994 config = """ 994 config = """
995DISTRO = "poky" 995DISTRO = "poky"
996MACHINE = "beaglebone-yocto" 996MACHINE:forcevariable = "beaglebone-yocto"
997INITRAMFS_IMAGE_BUNDLE = "1" 997INITRAMFS_IMAGE_BUNDLE = "1"
998INITRAMFS_IMAGE = "core-image-minimal-initramfs" 998INITRAMFS_IMAGE = "core-image-minimal-initramfs"
999INITRAMFS_SCRIPTS = "" 999INITRAMFS_SCRIPTS = ""
@@ -1412,7 +1412,7 @@ class UBootFitImageTests(FitImageTestCase):
1412 """ 1412 """
1413 config = """ 1413 config = """
1414# We need at least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set 1414# We need at least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set
1415MACHINE = "qemuarm" 1415MACHINE:forcevariable = "qemuarm"
1416UBOOT_MACHINE = "am57xx_evm_defconfig" 1416UBOOT_MACHINE = "am57xx_evm_defconfig"
1417SPL_BINARY = "MLO" 1417SPL_BINARY = "MLO"
1418 1418
@@ -1451,7 +1451,7 @@ UBOOT_FIT_DESC = "A model description"
1451 config = """ 1451 config = """
1452# There's no U-boot defconfig with CONFIG_FIT_SIGNATURE yet, so we need at 1452# There's no U-boot defconfig with CONFIG_FIT_SIGNATURE yet, so we need at
1453# least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set 1453# least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set
1454MACHINE = "qemuarm" 1454MACHINE:forcevariable = "qemuarm"
1455UBOOT_MACHINE = "am57xx_evm_defconfig" 1455UBOOT_MACHINE = "am57xx_evm_defconfig"
1456SPL_BINARY = "MLO" 1456SPL_BINARY = "MLO"
1457# Enable creation and signing of the U-Boot fitImage 1457# Enable creation and signing of the U-Boot fitImage
@@ -1498,7 +1498,7 @@ UBOOT_FIT_HASH_ALG = "sha256"
1498 config = """ 1498 config = """
1499# There's no U-boot deconfig with CONFIG_FIT_SIGNATURE yet, so we need at 1499# There's no U-boot deconfig with CONFIG_FIT_SIGNATURE yet, so we need at
1500# least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set 1500# least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set
1501MACHINE = "qemuarm" 1501MACHINE:forcevariable = "qemuarm"
1502UBOOT_MACHINE = "am57xx_evm_defconfig" 1502UBOOT_MACHINE = "am57xx_evm_defconfig"
1503SPL_BINARY = "MLO" 1503SPL_BINARY = "MLO"
1504# Enable creation and signing of the U-Boot fitImage 1504# Enable creation and signing of the U-Boot fitImage
@@ -1546,7 +1546,7 @@ UBOOT_SIGN_KEYNAME = "cfg-oe-selftest"
1546 """ 1546 """
1547 config = """ 1547 config = """
1548# We need at least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set 1548# We need at least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set
1549MACHINE = "qemuarm" 1549MACHINE:forcevariable = "qemuarm"
1550UBOOT_MACHINE = "am57xx_evm_defconfig" 1550UBOOT_MACHINE = "am57xx_evm_defconfig"
1551SPL_BINARY = "MLO" 1551SPL_BINARY = "MLO"
1552 1552
@@ -1612,7 +1612,7 @@ UBOOT_FIT_ARM_TRUSTED_FIRMWARE_ENTRYPOINT = "0x80280000"
1612 config = """ 1612 config = """
1613# There's no U-boot deconfig with CONFIG_FIT_SIGNATURE yet, so we need at 1613# There's no U-boot deconfig with CONFIG_FIT_SIGNATURE yet, so we need at
1614# least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set 1614# least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set
1615MACHINE = "qemuarm" 1615MACHINE:forcevariable = "qemuarm"
1616UBOOT_MACHINE = "am57xx_evm_defconfig" 1616UBOOT_MACHINE = "am57xx_evm_defconfig"
1617SPL_BINARY = "MLO" 1617SPL_BINARY = "MLO"
1618# Enable creation and signing of the U-Boot fitImage 1618# Enable creation and signing of the U-Boot fitImage
@@ -1676,7 +1676,7 @@ UBOOT_FIT_ARM_TRUSTED_FIRMWARE_ENTRYPOINT = "0x80280000"
1676 """ 1676 """
1677 config = """ 1677 config = """
1678# Enable creation of fitImage 1678# Enable creation of fitImage
1679MACHINE = "beaglebone-yocto" 1679MACHINE:forcevariable = "beaglebone-yocto"
1680UBOOT_SIGN_ENABLE = "1" 1680UBOOT_SIGN_ENABLE = "1"
1681UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys" 1681UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys"
1682UBOOT_SIGN_KEYNAME = "the-kernel-config-key" 1682UBOOT_SIGN_KEYNAME = "the-kernel-config-key"
@@ -1715,7 +1715,7 @@ FIT_SIGN_INDIVIDUAL = "1"
1715 config = """ 1715 config = """
1716# There's no U-boot defconfig with CONFIG_FIT_SIGNATURE yet, so we need at 1716# There's no U-boot defconfig with CONFIG_FIT_SIGNATURE yet, so we need at
1717# least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set 1717# least CONFIG_SPL_LOAD_FIT and CONFIG_SPL_OF_CONTROL set
1718MACHINE = "qemuarm" 1718MACHINE:forcevariable = "qemuarm"
1719UBOOT_MACHINE = "am57xx_evm_defconfig" 1719UBOOT_MACHINE = "am57xx_evm_defconfig"
1720# Enable creation and signing of the U-Boot fitImage (no SPL) 1720# Enable creation and signing of the U-Boot fitImage (no SPL)
1721UBOOT_FITIMAGE_ENABLE = "1" 1721UBOOT_FITIMAGE_ENABLE = "1"