[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/9] tests/acceptance: Use image_expand() in test_arm_orangepi_ub
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 5/9] tests/acceptance: Use image_expand() in test_arm_orangepi_uboot_netbsd9 |
Date: |
Wed, 23 Jun 2021 20:00:17 +0200 |
The NetBSD OrangePi image must be at least 2GiB, not less.
Expand the SD card image to this size before using it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
tests/acceptance/boot_linux_console.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/acceptance/boot_linux_console.py
b/tests/acceptance/boot_linux_console.py
index 61069f0064f..b10f7257503 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -868,7 +868,12 @@ def test_arm_orangepi_uboot_netbsd9(self):
:avocado: tags=device:sd
:avocado: tags=os:netbsd
"""
- # This test download a 304MB compressed image and expand it to 2GB
+ # This test download a 304MB compressed image and expand it to 2GB,
+ # which is the minimum card size required by the NetBSD installer:
+ # https://wiki.netbsd.org/ports/evbarm/raspberry_pi/#index7h2
+ # "A 2 GB card is the smallest workable size that the installation
+ # image will fit on."
+ NETBSD_SDCARD_MINSIZE = 2 * 1024 * 1024 * 1024
deb_url = ('http://snapshot.debian.org/archive/debian/'
'20200108T145233Z/pool/main/u/u-boot/'
'u-boot-sunxi_2020.01%2Bdfsg-1_armhf.deb')
@@ -886,7 +891,7 @@ def test_arm_orangepi_uboot_netbsd9(self):
image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash)
image_path = os.path.join(self.workdir, 'armv7.img')
archive.gzip_uncompress(image_path_gz, image_path)
- image_pow2ceil_expand(image_path)
+ image_expand(image_path, NETBSD_SDCARD_MINSIZE)
image_drive_args = 'if=sd,format=raw,snapshot=on,file=' + image_path
# dd if=u-boot-sunxi-with-spl.bin of=armv7.img bs=1K seek=8
conv=notrunc
--
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é <=
- [RFC PATCH 6/9] tests/acceptance: Use image_expand() in test_arm_orangepi_bionic_20_08, Philippe Mathieu-Daudé, 2021/06/23
- [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