test/py: Set up an Ubuntu image with space for FDE

Update one of the Ubuntu images to provide space for using full-disk
encryption.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-10-21 04:32:51 +01:00
parent 31fd3d283e
commit 8863215954
2 changed files with 9 additions and 4 deletions

View File

@@ -6,14 +6,19 @@
from img.common import setup_extlinux_image
def setup_ubuntu_image(config, log, devnum, basename, version='24.04.1 LTS'):
"""Create a 20MB Ubuntu disk image with a single FAT partition
def setup_ubuntu_image(config, log, devnum, basename, version='24.04.1 LTS',
use_fde=False):
"""Create a Ubuntu disk image with a FAT partition and ext4 partition
This creates a FAT partition containing extlinux files, kernel, etc. and a
separate ext4 partition containing the root disk
Args:
config (ArbitraryAttributeContainer): Configuration
log (multiplexed_log.Logfile): Log to write to
devnum (int): Device number to use, e.g. 1
basename (str): Base name to use in the filename, e.g. 'mmc'
use_fde (bool): True to set up full-disk encryption
"""
vmlinux = 'vmlinuz-6.8.0-53-generic'
initrd = 'initrd.img-6.8.0-53-generic'
@@ -44,4 +49,4 @@ label l0r
initrd /boot/%s
''' % ((version, vmlinux, initrd) * 2)
setup_extlinux_image(config, log, devnum, basename, vmlinux, initrd, dtbdir,
script)
script, part2_size=60 if use_fde else 1)

View File

@@ -83,7 +83,7 @@ def test_ut_dm_init_bootstd(u_boot_config, u_boot_log):
setup_ubuntu_image(u_boot_config, u_boot_log, 3, 'flash', '25.04')
setup_localboot_image(u_boot_config, u_boot_log)
setup_vbe_image(u_boot_config, u_boot_log)
setup_ubuntu_image(u_boot_config, u_boot_log, 11, 'mmc')
setup_ubuntu_image(u_boot_config, u_boot_log, 11, 'mmc', use_fde=True)
def test_ut(ubman, ut_subtest):
"""Execute a "ut" subtest.