[PATCH 1/4] colibri-imx8x: Increase the boot delay

From: Simon Glass <sjg@chromium.org> A delay of one second makes it hard for the lab to interrupt boot, thus causing test failures. Increase it to 5s Signed-off-by: Simon Glass <sjg@chromium.org> --- configs/colibri-imx8x_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index 3d576da05b3..210bb83d5f8 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -24,7 +24,7 @@ CONFIG_REMAKE_ELF=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_DISTRO_DEFAULTS=y -CONFIG_BOOTDELAY=1 +CONFIG_BOOTDELAY=5 CONFIG_OF_SYSTEM_SETUP=y CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile ${soc}-colibri-${fdt_board}.dtb" -- 2.43.0 base-commit: 136c959dd2d089710fb131956081d09b9da3bea4 branch: labh

From: Simon Glass <sjg@chromium.org> The pager can interfere with tests and there is a lab test which uses the build-efi script. Add an option to disable the pager so that the labgrid test can request that. Signed-off-by: Simon Glass <sjg@chromium.org> --- scripts/build-efi | 3 ++- scripts/build-qemu | 2 ++ scripts/build_helper.py | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/build-efi b/scripts/build-efi index 131aad50897..27446295b2d 100755 --- a/scripts/build-efi +++ b/scripts/build-efi @@ -155,7 +155,8 @@ class BuildEfi: def do_build(self, build): """Build U-Boot for the selected board""" - res = command.run_one('buildman', '-w', '-o', self.build_dir, + extra = ['-a', '~CONSOLE_PAGER'] if self.args.no_pager else [] + res = command.run_one('buildman', '-w', '-o', self.build_dir, *extra, '--board', build, '-I', raise_on_error=False) if res.return_code and res.return_code != 101: # Allow warnings raise ValueError( diff --git a/scripts/build-qemu b/scripts/build-qemu index 62f0bc41fad..522325a8d57 100755 --- a/scripts/build-qemu +++ b/scripts/build-qemu @@ -200,6 +200,8 @@ class BuildQemu: self.build_dir.mkdir(parents=True, exist_ok=True) cmd = ['buildman', '-w', '-o', str(self.build_dir), '--board', self.board, '-I'] + if self.args.no_pager: + cmd += ['-a', '~CONSOLE_PAGER'] self.execute_command( cmd, diff --git a/scripts/build_helper.py b/scripts/build_helper.py index 21162e5643e..d401da0215c 100644 --- a/scripts/build_helper.py +++ b/scripts/build_helper.py @@ -301,6 +301,8 @@ def add_common_args(parser): help='Use KVM (Kernel-based Virtual Machine) for acceleration') parser.add_argument('-K', '--kernel', help='Kernel to run using -kernel') + parser.add_argument('-n', '--no-pager', action='store_true', + help="Disable the pager (for testing)") parser.add_argument('-o', '--os', metavar='NAME', choices=['ubuntu'], help='Run a specified Operating System') parser.add_argument('-r', '--run', action='store_true', -- 2.43.0 base-commit: 136c959dd2d089710fb131956081d09b9da3bea4 branch: labh

From: Simon Glass <sjg@chromium.org> The EFI-media devices names were recently changed to make it easier to tell them apart. Update the tests as well, since this change caused them to fail. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: dea4ea00a72 ("efi: Set the efi_media device name when binding") --- test/py/tests/test_distro.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/py/tests/test_distro.py b/test/py/tests/test_distro.py index 77caf32145e..cc4aa265d90 100644 --- a/test/py/tests/test_distro.py +++ b/test/py/tests/test_distro.py @@ -84,7 +84,7 @@ def test_distro_arm_app_extlinux(ubman): ubman.run_command('bootmeth order extlinux') ubman.run_command('boot', wait_for_prompt=False) - ubman.expect(["Booting bootflow 'efi_media.bootdev.part_2' with extlinux"]) + ubman.expect(["Booting bootflow 'efi_media_1.bootdev.part_2' with extlinux"]) ubman.expect(['Exiting EFI']) ubman.expect(['Booting Linux on physical CPU']) @@ -102,7 +102,8 @@ def test_distro_arm_app_efi(ubman): ubman.run_command('bootmeth order efi') ubman.run_command('boot', wait_for_prompt=False) - ubman.expect(["Booting bootflow 'efi_media.bootdev.part_1' with efi"]) + ubman.expect( + ["Booting bootflow 'efi_media_1.bootdev.part_1' with efi"]) # Press Escape to force GRUB to appear, even if the silent menu was # enabled by a previous boot -- 2.43.0 base-commit: 136c959dd2d089710fb131956081d09b9da3bea4 branch: labh

From: Simon Glass <sjg@chromium.org> The distro test for EFI in the EFI ARM app is currently flaky. If the test does not send an 'escape' character, then the board may boot straight into Ubuntu. If it does, but didn't need to, then grub sits at the command prompt. Handle this by pressing escape twice (which should always go to the grub command line), then using the 'normal' command to start the menu. Signed-off-by: Simon Glass <sjg@chromium.org> --- test/py/tests/test_distro.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/py/tests/test_distro.py b/test/py/tests/test_distro.py index cc4aa265d90..d9bc9b18648 100644 --- a/test/py/tests/test_distro.py +++ b/test/py/tests/test_distro.py @@ -106,13 +106,21 @@ def test_distro_arm_app_efi(ubman): ["Booting bootflow 'efi_media_1.bootdev.part_1' with efi"]) # Press Escape to force GRUB to appear, even if the silent menu was - # enabled by a previous boot + # enabled by a previous boot. If the menu is already set to appear, this + # will exit to the grub> prompt + ubman.send('\x1b') + + # Press Escape again, to force it to the grub> prompt ubman.send('\x1b') # Wait until we see the editor appear with ubman.log.section('grub'): - ubman.expect(['ESC to return previous']) - # ubman.expect(['The highlighted entry will be executed automatically in 29s']) + ubman.expect(['grub>']) + + ubman.run_command('normal', wait_for_prompt=False) + + # exp = ubman.expect(['ESC to return previous', 'grub>']) + ubman.expect(['The highlighted entry will be executed automatically in']) # Press 'e' to edit the command line ubman.log.info("Pressing 'e'") -- 2.43.0 base-commit: 136c959dd2d089710fb131956081d09b9da3bea4 branch: labh
participants (1)
-
Simon Glass