1 # SPDX-License-Identifier: GPL-2.0+
2 # Copyright 2022 Google LLC
11 @pytest.mark.boardspec('sandbox_vpl')
12 @pytest.mark.requiredtool('dtc')
13 def test_vbe_vpl(u_boot_console):
15 #cmd = [cons.config.build_dir + fname, '-v']
16 ram = os.path.join(cons.config.build_dir, 'ram.bin')
17 fdt = os.path.join(cons.config.build_dir, 'arch/sandbox/dts/test.dtb')
19 # Enable firmware1 and the mmc that it uses. These are needed for the full
21 u_boot_utils.run_and_log(
22 cons, f'fdtput -t s {fdt} /bootstd/firmware0 status disabled')
23 u_boot_utils.run_and_log(
24 cons, f'fdtput -t s {fdt} /bootstd/firmware1 status okay')
25 u_boot_utils.run_and_log(
26 cons, f'fdtput -t s {fdt} /mmc3 status okay')
28 # Remove any existing RAM file, so we don't have old data present
29 if os.path.exists(ram):
31 flags = ['-p', os.path.join(cons.config.build_dir, 'image.bin'), '-w',
33 cons.restart_uboot_with_flags(flags)
35 # Make sure that VBE was used in both VPL (to load SPL) and SPL (to load
37 output = cons.run_command('vbe state')
38 assert output == 'Phases: VPL SPL'