diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/fitimage.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/fitimage.py | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py index be291e4b0f..3c40857747 100644 --- a/meta/lib/oeqa/selftest/cases/fitimage.py +++ b/meta/lib/oeqa/selftest/cases/fitimage.py | |||
@@ -786,7 +786,7 @@ FIT_CONF_PREFIX = "foo-" | |||
786 | EXPECTED_COMP = ["ti,am335x-bone-green", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"] | 786 | EXPECTED_COMP = ["ti,am335x-bone-green", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"] |
787 | 787 | ||
788 | config = """ | 788 | config = """ |
789 | DISTRO="poky" | 789 | DISTRO = "poky" |
790 | MACHINE = "beaglebone-yocto" | 790 | MACHINE = "beaglebone-yocto" |
791 | """ | 791 | """ |
792 | self.write_config(config) | 792 | self.write_config(config) |
@@ -918,7 +918,7 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'" | |||
918 | bb_vars = self._fit_get_bb_vars() | 918 | bb_vars = self._fit_get_bb_vars() |
919 | 919 | ||
920 | # Ensure new keys are generated and FIT_GENERATE_KEYS = "1" is tested | 920 | # Ensure new keys are generated and FIT_GENERATE_KEYS = "1" is tested |
921 | bitbake("kernel-signing-keys-native -c cleansstate") | 921 | bitbake("kernel-signing-keys-native -c compile -f") |
922 | 922 | ||
923 | self._test_fitimage(bb_vars) | 923 | self._test_fitimage(bb_vars) |
924 | 924 | ||
@@ -938,7 +938,7 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'" | |||
938 | """ | 938 | """ |
939 | 939 | ||
940 | config = """ | 940 | config = """ |
941 | DISTRO="poky" | 941 | DISTRO = "poky" |
942 | MACHINE = "beaglebone-yocto" | 942 | MACHINE = "beaglebone-yocto" |
943 | INITRAMFS_IMAGE = "core-image-minimal-initramfs" | 943 | INITRAMFS_IMAGE = "core-image-minimal-initramfs" |
944 | INITRAMFS_SCRIPTS = "" | 944 | INITRAMFS_SCRIPTS = "" |
@@ -992,7 +992,7 @@ FIT_HASH_ALG = "sha256" | |||
992 | """ | 992 | """ |
993 | 993 | ||
994 | config = """ | 994 | config = """ |
995 | DISTRO="poky" | 995 | DISTRO = "poky" |
996 | MACHINE = "beaglebone-yocto" | 996 | MACHINE = "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" |
@@ -1692,3 +1692,40 @@ FIT_SIGN_INDIVIDUAL = "1" | |||
1692 | 1692 | ||
1693 | # Just check the DTB of u-boot since there is no u-boot FIT image | 1693 | # Just check the DTB of u-boot since there is no u-boot FIT image |
1694 | self._check_kernel_dtb(bb_vars) | 1694 | self._check_kernel_dtb(bb_vars) |
1695 | |||
1696 | |||
1697 | def test_sign_uboot_fit_image_without_spl(self): | ||
1698 | """ | ||
1699 | Summary: Check if U-Boot FIT image and Image Tree Source (its) are | ||
1700 | created and signed correctly for the scenario where only | ||
1701 | the U-Boot proper fitImage is being created and signed | ||
1702 | (no SPL included). | ||
1703 | Expected: 1) U-Boot its and FIT image are built successfully | ||
1704 | 2) Scanning the its file indicates signing is enabled | ||
1705 | as requested by SPL_SIGN_ENABLE (using keys generated | ||
1706 | via UBOOT_FIT_GENERATE_KEYS) | ||
1707 | 3) Dumping the FIT image indicates signature values | ||
1708 | are present | ||
1709 | 4) Examination of the do_uboot_assemble_fitimage | ||
1710 | runfile/logfile indicate that UBOOT_MKIMAGE and | ||
1711 | UBOOT_MKIMAGE_SIGN are working as expected. | ||
1712 | Product: oe-core | ||
1713 | Author: Jamin Lin <jamin_lin@aspeedtech.com> | ||
1714 | """ | ||
1715 | config = """ | ||
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 | ||
1718 | MACHINE = "qemuarm" | ||
1719 | UBOOT_MACHINE = "am57xx_evm_defconfig" | ||
1720 | # Enable creation and signing of the U-Boot fitImage (no SPL) | ||
1721 | UBOOT_FITIMAGE_ENABLE = "1" | ||
1722 | SPL_DTB_BINARY = "" | ||
1723 | SPL_SIGN_ENABLE = "1" | ||
1724 | SPL_SIGN_KEYNAME = "spl-oe-selftest" | ||
1725 | SPL_SIGN_KEYDIR = "${TOPDIR}/signing-keys" | ||
1726 | UBOOT_FIT_GENERATE_KEYS = "1" | ||
1727 | """ | ||
1728 | self.write_config(config) | ||
1729 | bb_vars = self._fit_get_bb_vars() | ||
1730 | self._test_fitimage(bb_vars) | ||
1731 | |||