[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 6/9] tests/acceptance: Use image_expand() in test_arm_orangep
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 6/9] tests/acceptance: Use image_expand() in test_arm_orangepi_bionic_20_08 |
Date: |
Wed, 23 Jun 2021 20:00:18 +0200 |
U-Boot expects the SD card size to be at least 2GiB, so
expand the SD card image to this size before using it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
TODO: U-Boot reference?
---
tests/acceptance/boot_linux_console.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/acceptance/boot_linux_console.py
b/tests/acceptance/boot_linux_console.py
index b10f7257503..c4c0f0b393d 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -820,11 +820,13 @@ def test_arm_orangepi_bionic_20_08(self):
:avocado: tags=arch:arm
:avocado: tags=machine:orangepi-pc
:avocado: tags=device:sd
+ :avocado: tags=u-boot
"""
- # This test download a 275 MiB compressed image and expand it
- # to 1036 MiB, but the underlying filesystem is 1552 MiB...
- # As we expand it to 2 GiB we are safe.
+ # This test download a 275 MiB compressed image and inflate it
+ # to 1036 MiB, but 1/ the underlying filesystem is 1552 MiB,
+ # 2/ U-Boot loads TFTP filenames from the last sector below
+ # 2 GiB, so we need to expand the image further more to 2 GiB.
image_url = ('https://archive.armbian.com/orangepipc/archive/'
'Armbian_20.08.1_Orangepipc_bionic_current_5.8.5.img.xz')
@@ -833,7 +835,7 @@ def test_arm_orangepi_bionic_20_08(self):
image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash,
algorithm='sha256')
image_path = archive.extract(image_path_xz, self.workdir)
- image_pow2ceil_expand(image_path)
+ image_expand(image_path, 2 * 1024 * 1024 * 1024)
self.vm.set_console()
self.vm.add_args('-drive', 'file=' + image_path + ',if=sd,format=raw',
--
2.31.1
- [RFC PATCH 0/9] hw/sd: Allow card size not power of 2 again, Philippe Mathieu-Daudé, 2021/06/23
- [PATCH 1/9] hw/sd: When card is in wrong state, log which state it is, Philippe Mathieu-Daudé, 2021/06/23
- [PATCH 2/9] hw/sd: Extract address_in_range() helper, log invalid accesses, Philippe Mathieu-Daudé, 2021/06/23
- [PATCH 3/9] tests/acceptance: Tag NetBSD tests as 'os:netbsd', Philippe Mathieu-Daudé, 2021/06/23
- [PATCH 4/9] tests/acceptance: Extract image_expand() helper, Philippe Mathieu-Daudé, 2021/06/23
- [PATCH 5/9] tests/acceptance: Use image_expand() in test_arm_orangepi_uboot_netbsd9, Philippe Mathieu-Daudé, 2021/06/23
- [RFC PATCH 6/9] tests/acceptance: Use image_expand() in test_arm_orangepi_bionic_20_08,
Philippe Mathieu-Daudé <=
- [RFC PATCH 7/9] tests/acceptance: Do not expand SD card image in test_arm_orangepi_sd, Philippe Mathieu-Daudé, 2021/06/23
- [PATCH 8/9] tests/acceptance: Remove now unused pow2ceil(), Philippe Mathieu-Daudé, 2021/06/23
- [RFC PATCH 9/9] hw/sd: Allow card size not power of 2 again, Philippe Mathieu-Daudé, 2021/06/23
- Re: [RFC PATCH 0/9] hw/sd: Allow card size not power of 2 again, Alexander Bulekov, 2021/06/23