test_ut: Drop support for fallback files

We don't need the fallback anymore. Remove the code which uses these
files.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Simon Glass 2024-11-21 15:32:13 -07:00 committed by Tom Rini
parent 2fad73a166
commit 01c0695d9d

View file

@ -57,19 +57,6 @@ def setup_image(cons, devnum, part_type, img_size=20, second_part=False,
stdin=spec.encode('utf-8'))
return fname, mnt
def copy_prepared_image(cons, devnum, fname, basename='mmc'):
"""Use a prepared image since we cannot create one
Args:
cons (ConsoleBase): Console touse
devnum (int): device number
fname (str): Filename of MMC image
basename (str): Base name to use in the filename, e.g. 'mmc'
"""
infname = os.path.join(cons.config.source_dir,
f'test/py/tests/bootstd/{basename}{devnum}.img.xz')
u_boot_utils.run_and_log(cons, ['sh', '-c', f'xz -dc {infname} >{fname}'])
def setup_bootmenu_image(cons):
"""Create a 20MB disk image with a single ext4 partition
@ -78,7 +65,6 @@ def setup_bootmenu_image(cons):
mmc_dev = 4
fname, mnt = setup_image(cons, mmc_dev, 0x83)
complete = False
script = '''# DO NOT EDIT THIS FILE
#
# Please edit /boot/armbianEnv.txt to set supported parameters
@ -187,19 +173,14 @@ booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
u_boot_utils.run_and_log(cons, f'fallocate -l 18M {fsfile}')
u_boot_utils.run_and_log(cons, f'mkfs.ext4 {fsfile} -d {mnt}')
u_boot_utils.run_and_log(cons, f'dd if={fsfile} of={fname} bs=1M seek=1')
complete = True
u_boot_utils.run_and_log(cons, f'rm -rf {mnt}')
u_boot_utils.run_and_log(cons, f'rm -f {fsfile}')
if not complete:
copy_prepared_image(cons, mmc_dev, fname)
def setup_bootflow_image(cons):
"""Create a 20MB disk image with a single FAT partition"""
mmc_dev = 1
fname, mnt = setup_image(cons, mmc_dev, 0xc, second_part=True)
complete = False
vmlinux = 'vmlinuz-5.3.7-301.fc31.armv7hl'
initrd = 'initramfs-5.3.7-301.fc31.armv7hl.img'
dtbdir = 'dtb-5.3.7-301.fc31.armv7hl'
@ -244,11 +225,8 @@ label Fedora-Workstation-armhfp-31-1.9 (5.3.7-301.fc31.armv7hl)
u_boot_utils.run_and_log(cons, f'mkfs.vfat {fsfile}')
u_boot_utils.run_and_log(cons, ['sh', '-c', f'mcopy -i {fsfile} {mnt}/* ::/'])
u_boot_utils.run_and_log(cons, f'dd if={fsfile} of={fname} bs=1M seek=1')
complete = True
u_boot_utils.run_and_log(cons, f'rm -rf {mnt}')
u_boot_utils.run_and_log(cons, f'rm -f {fsfile}')
if not complete:
copy_prepared_image(cons, mmc_dev, fname)
def setup_cros_image(cons):
"""Create a 20MB disk image with ChromiumOS partitions"""
@ -569,7 +547,6 @@ def setup_efi_image(cons):
fname, mnt = setup_image(cons, devnum, 0xc, second_part=True,
basename=basename)
complete = False
efi_dir = os.path.join(mnt, 'EFI')
mkdir_cond(efi_dir)
bootdir = os.path.join(efi_dir, 'BOOT')
@ -585,14 +562,9 @@ def setup_efi_image(cons):
u_boot_utils.run_and_log(cons, f'mkfs.vfat {fsfile}')
u_boot_utils.run_and_log(cons, ['sh', '-c', f'mcopy -vs -i {fsfile} {mnt}/* ::/'])
u_boot_utils.run_and_log(cons, f'dd if={fsfile} of={fname} bs=1M seek=1')
complete = True
u_boot_utils.run_and_log(cons, f'rm -rf {mnt}')
u_boot_utils.run_and_log(cons, f'rm -f {fsfile}')
if not complete:
copy_prepared_image(cons, devnum, fname, basename)
@pytest.mark.buildconfigspec('cmd_bootflow')
@pytest.mark.buildconfigspec('sandbox')
def test_ut_dm_init_bootstd(u_boot_console):