diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-03 16:15:07 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-03 17:51:39 +0100 |
commit | acb7ed711762bb16cda8726c2a419bbbc4ddd35d (patch) | |
tree | a99b218371b8b0b4136e73d636044c44543dcf64 | |
parent | 6b01b0e301ced27a9afa255575ef7772002b04ec (diff) | |
download | poky-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.py | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/fitimage.py | 26 |
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 = """ |
789 | DISTRO = "poky" | 789 | DISTRO = "poky" |
790 | MACHINE = "beaglebone-yocto" | 790 | MACHINE: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 |
831 | MACHINE = "beaglebone-yocto" | 831 | MACHINE: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 |
833 | PREFERRED_PROVIDER_virtual/dtb = "bbb-dtbs-as-ext" | 833 | PREFERRED_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 |
858 | MACHINE = "beaglebone-yocto" | 858 | MACHINE:forcevariable = "beaglebone-yocto" |
859 | UBOOT_SIGN_ENABLE = "1" | 859 | UBOOT_SIGN_ENABLE = "1" |
860 | UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys" | 860 | UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys" |
861 | UBOOT_SIGN_KEYNAME = "dev" | 861 | UBOOT_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 |
906 | MACHINE = "beaglebone-yocto" | 906 | MACHINE:forcevariable = "beaglebone-yocto" |
907 | UBOOT_SIGN_ENABLE = "1" | 907 | UBOOT_SIGN_ENABLE = "1" |
908 | FIT_GENERATE_KEYS = "1" | 908 | FIT_GENERATE_KEYS = "1" |
909 | UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys" | 909 | UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys" |
@@ -939,7 +939,7 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'" | |||
939 | 939 | ||
940 | config = """ | 940 | config = """ |
941 | DISTRO = "poky" | 941 | DISTRO = "poky" |
942 | MACHINE = "beaglebone-yocto" | 942 | MACHINE:forcevariable = "beaglebone-yocto" |
943 | INITRAMFS_IMAGE = "core-image-minimal-initramfs" | 943 | INITRAMFS_IMAGE = "core-image-minimal-initramfs" |
944 | INITRAMFS_SCRIPTS = "" | 944 | INITRAMFS_SCRIPTS = "" |
945 | UBOOT_MACHINE = "am335x_evm_defconfig" | 945 | UBOOT_MACHINE = "am335x_evm_defconfig" |
@@ -993,7 +993,7 @@ FIT_HASH_ALG = "sha256" | |||
993 | 993 | ||
994 | config = """ | 994 | config = """ |
995 | DISTRO = "poky" | 995 | DISTRO = "poky" |
996 | MACHINE = "beaglebone-yocto" | 996 | MACHINE:forcevariable = "beaglebone-yocto" |
997 | INITRAMFS_IMAGE_BUNDLE = "1" | 997 | INITRAMFS_IMAGE_BUNDLE = "1" |
998 | INITRAMFS_IMAGE = "core-image-minimal-initramfs" | 998 | INITRAMFS_IMAGE = "core-image-minimal-initramfs" |
999 | INITRAMFS_SCRIPTS = "" | 999 | INITRAMFS_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 |
1415 | MACHINE = "qemuarm" | 1415 | MACHINE:forcevariable = "qemuarm" |
1416 | UBOOT_MACHINE = "am57xx_evm_defconfig" | 1416 | UBOOT_MACHINE = "am57xx_evm_defconfig" |
1417 | SPL_BINARY = "MLO" | 1417 | SPL_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 |
1454 | MACHINE = "qemuarm" | 1454 | MACHINE:forcevariable = "qemuarm" |
1455 | UBOOT_MACHINE = "am57xx_evm_defconfig" | 1455 | UBOOT_MACHINE = "am57xx_evm_defconfig" |
1456 | SPL_BINARY = "MLO" | 1456 | SPL_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 |
1501 | MACHINE = "qemuarm" | 1501 | MACHINE:forcevariable = "qemuarm" |
1502 | UBOOT_MACHINE = "am57xx_evm_defconfig" | 1502 | UBOOT_MACHINE = "am57xx_evm_defconfig" |
1503 | SPL_BINARY = "MLO" | 1503 | SPL_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 |
1549 | MACHINE = "qemuarm" | 1549 | MACHINE:forcevariable = "qemuarm" |
1550 | UBOOT_MACHINE = "am57xx_evm_defconfig" | 1550 | UBOOT_MACHINE = "am57xx_evm_defconfig" |
1551 | SPL_BINARY = "MLO" | 1551 | SPL_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 |
1615 | MACHINE = "qemuarm" | 1615 | MACHINE:forcevariable = "qemuarm" |
1616 | UBOOT_MACHINE = "am57xx_evm_defconfig" | 1616 | UBOOT_MACHINE = "am57xx_evm_defconfig" |
1617 | SPL_BINARY = "MLO" | 1617 | SPL_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 |
1679 | MACHINE = "beaglebone-yocto" | 1679 | MACHINE:forcevariable = "beaglebone-yocto" |
1680 | UBOOT_SIGN_ENABLE = "1" | 1680 | UBOOT_SIGN_ENABLE = "1" |
1681 | UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys" | 1681 | UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys" |
1682 | UBOOT_SIGN_KEYNAME = "the-kernel-config-key" | 1682 | UBOOT_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 |
1718 | MACHINE = "qemuarm" | 1718 | MACHINE:forcevariable = "qemuarm" |
1719 | UBOOT_MACHINE = "am57xx_evm_defconfig" | 1719 | UBOOT_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) |
1721 | UBOOT_FITIMAGE_ENABLE = "1" | 1721 | UBOOT_FITIMAGE_ENABLE = "1" |