Refactor the AST2700 functional test to boot using the vbootrom image instead of manually loading boot components with -device loader. The boot ROM binary is now passed via the -bios option, using the image located in pc-bios/ast27x0_bootrom.bin.
Signed-off-by: Jamin Lin <jamin_...@aspeedtech.com> --- tests/functional/test_aarch64_aspeed.py | 38 +------------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/test_aarch64_aspeed.py index c25c966278..971f548534 100755 --- a/tests/functional/test_aarch64_aspeed.py +++ b/tests/functional/test_aarch64_aspeed.py @@ -36,43 +36,7 @@ def do_test_aarch64_aspeed_sdk_start(self, image): 'c1f4496aec06743c812a6e9a1a18d032f34d62f3ddb6956e924fef62aa2046a5') def start_ast2700_test(self, name): - num_cpu = 4 - uboot_size = os.path.getsize(self.scratch_file(name, - 'u-boot-nodtb.bin')) - uboot_dtb_load_addr = hex(0x400000000 + uboot_size) - - load_images_list = [ - { - 'addr': '0x400000000', - 'file': self.scratch_file(name, - 'u-boot-nodtb.bin') - }, - { - 'addr': str(uboot_dtb_load_addr), - 'file': self.scratch_file(name, 'u-boot.dtb') - }, - { - 'addr': '0x430000000', - 'file': self.scratch_file(name, 'bl31.bin') - }, - { - 'addr': '0x430080000', - 'file': self.scratch_file(name, 'optee', - 'tee-raw.bin') - } - ] - - for load_image in load_images_list: - addr = load_image['addr'] - file = load_image['file'] - self.vm.add_args('-device', - f'loader,force-raw=on,addr={addr},file={file}') - - for i in range(num_cpu): - self.vm.add_args('-device', - f'loader,addr=0x430000000,cpu-num={i}') - - self.vm.add_args('-smp', str(num_cpu)) + self.vm.add_args('-bios', 'ast27x0_bootrom.bin') self.vm.add_args('-device', 'tmp105,bus=aspeed.i2c.bus.1,address=0x4d,id=tmp-test') self.do_test_aarch64_aspeed_sdk_start( -- 2.43.0