summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2023-03-13 13:15:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-22 13:53:29 +0000
commit923a9e11b192b974a929d1dbc7258ad13923fd15 (patch)
tree95a20682702556174ed2aac4c6566a391b29d13b /meta
parentda44a469f03b24ecfbb3d186b18115ff04188212 (diff)
downloadpoky-923a9e11b192b974a929d1dbc7258ad13923fd15.tar.gz
selftest: fitimage.py: respect INITRAMFS_IMAGE_NAME and KERNEL_FIT_LINK_NAME
* use these variables instead of assuming: "fitImage-its-%s-%s-%s" % (image_type, machine, machine) notice that these files have no extension and the -machine suffix is duplicated (once from core-image-minimal and once from kernel-fitimage.bbclass:kernel_do_deploy:append through KERNEL_FIT_LINK_NAME which is MACHINE by default: KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" [YOCTO #12937] (From OE-Core rev: d6e52428ca25d9b6ec2a52406f2d1859d05867d3) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/cases/fitimage.py34
1 files changed, 16 insertions, 18 deletions
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py
index 1570d54dfb..7bc171e02d 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -5,7 +5,7 @@
5# 5#
6 6
7from oeqa.selftest.case import OESelftestTestCase 7from oeqa.selftest.case import OESelftestTestCase
8from oeqa.utils.commands import runCmd, bitbake, get_bb_var 8from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
9import os 9import os
10import re 10import re
11 11
@@ -42,15 +42,14 @@ FIT_DESC = "A model description"
42 self.write_config(config) 42 self.write_config(config)
43 43
44 # fitImage is created as part of linux recipe 44 # fitImage is created as part of linux recipe
45 bitbake("virtual/kernel") 45 image = "virtual/kernel"
46 bitbake(image)
47 bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'INITRAMFS_IMAGE_NAME', 'KERNEL_FIT_LINK_NAME'], image)
46 48
47 image_type = "core-image-minimal" 49 fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'],
48 deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') 50 "fitImage-its-%s-%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_LINK_NAME']))
49 machine = get_bb_var('MACHINE') 51 fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'],
50 fitimage_its_path = os.path.join(deploy_dir_image, 52 "fitImage-%s-%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_LINK_NAME']))
51 "fitImage-its-%s-%s-%s" % (image_type, machine, machine))
52 fitimage_path = os.path.join(deploy_dir_image,
53 "fitImage-%s-%s-%s" % (image_type, machine, machine))
54 53
55 self.assertTrue(os.path.exists(fitimage_its_path), 54 self.assertTrue(os.path.exists(fitimage_its_path),
56 "%s image tree source doesn't exist" % (fitimage_its_path)) 55 "%s image tree source doesn't exist" % (fitimage_its_path))
@@ -123,15 +122,14 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'"
123 self.write_config(config) 122 self.write_config(config)
124 123
125 # fitImage is created as part of linux recipe 124 # fitImage is created as part of linux recipe
126 bitbake("virtual/kernel") 125 image = "virtual/kernel"
127 126 bitbake(image)
128 image_type = "core-image-minimal" 127 bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_LINK_NAME'], image)
129 deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') 128
130 machine = get_bb_var('MACHINE') 129 fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'],
131 fitimage_its_path = os.path.join(deploy_dir_image, 130 "fitImage-its-%s" % (bb_vars['KERNEL_FIT_LINK_NAME']))
132 "fitImage-its-%s" % (machine,)) 131 fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'],
133 fitimage_path = os.path.join(deploy_dir_image, 132 "fitImage-%s.bin" % (bb_vars['KERNEL_FIT_LINK_NAME']))
134 "fitImage-%s.bin" % (machine,))
135 133
136 self.assertTrue(os.path.exists(fitimage_its_path), 134 self.assertTrue(os.path.exists(fitimage_its_path),
137 "%s image tree source doesn't exist" % (fitimage_its_path)) 135 "%s image tree source doesn't exist" % (fitimage_its_path))