From patchwork Wed Aug 20 14:46:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 92 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701226; bh=gSMDlb9gGNJe5NcwuaI25PAcL4vgy3pRWPyMsIS8wvI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ZOiZLH/+cV8gnJHOabRpmF+pHY39/r4fyJs6rZITDnNdvuT1MD1zLBQqUyanl+A/m YCjIg9Q+VWw4e2bNq8wyvpDcA2y87ZoUaNnB+6dj4/jKbEYHnNKW9egUjfy2Htro9o sW2GS5dUMM1gmlRhKNG42eoC+cATu5Q+QfNOv1ZfoKO2r8iiVGF4HjJ9LNoimYdaJm n3j+jpe5ph4ls9rKp0Re9OxLZkPIqP6dogskJDUC+vgxQwBEHSdtMYwrud+VeCXemw JqqsAu6+SXgSbaaNaZhj/N8nBATqvBnMFmbhNPYtaZFibG9TUiesOYarDc9D66Lua0 IeDOF6a4BiYuw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8BF8F67419 for ; Wed, 20 Aug 2025 08:47:06 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id rnVR7Rem2gzi for ; Wed, 20 Aug 2025 08:47:06 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701225; bh=gSMDlb9gGNJe5NcwuaI25PAcL4vgy3pRWPyMsIS8wvI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IJ1h5ISywOvK9st+e7Y96MDgkdvm/VJ99dtg+AumyyBfTwimDSzcQ0/W0hKTW81Ye R5a/7OJEbvMeqWgn/qu3foiT8v+C8aQLebIX46ScN8kA/Pc8fv/5MUJOQvwg8rRT/k 6S2CyxI7zG6VGVqRBt/YSnzKi5V4lxhjo2c6Iio0yCmguaiV1OsjQwbwexBtjieoDm UzVwKMnH08Zr8pC9qu0oK6qR3RAic5XlOs/x0WDlY/xASPY/DwJN8ebFBtVn72D9Uz reRLLwmGYTKFn2oTMKjXxxCb50GVo2jTIoDFV3t7LTJ9hhZvOmGAS6HlQy6VgpW9Ek gfAA2VvWoBkIQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6EC13676B2 for ; Wed, 20 Aug 2025 08:47:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701218; bh=6Wbn4Ter9zaM1CO9pdMIxkXdp8CT/v+9fdaY2XnmnYI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cQcJlSt/he7zGyZq83IxK9DXc4dvCfhy52f8xEqTmrMmBz83dk8cUyQcN1eruZV5h paYheGEWemNPusjCRMjTVhwyJLzTuckfYA7Je4jvdiOrpBCEH5N7awayfyjKXNTVic P7pKK1F3hE9iFsI30vStkmwQ032nLyU/dBQMAPn5DJrauYyIJ0S3eyI8Xc8sw2o995 JJ1Ix5m91oyE4o7GFbjJs/LR6IGkFdKKyGbYJk4oRYvxjPiET+j93W+b5Ql/fB7Pv+ PqnWZQDw3pFmcO41HnuGFuYXL+6uWgArSbNH7Q/rsqTpqqYi1iGVukFKkVxBHWN+Rx y+Olszo/nSBSg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B4F1567696; Wed, 20 Aug 2025 08:46:58 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 9FbWSPU8stti; Wed, 20 Aug 2025 08:46:58 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755701215; bh=iCFH0hmo01aGvC6ikUhOQx2/yjbMvl8LMw8hmzyny7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jPk5MqlIks2kXyBvQTIXJ0EvSzBdJQaRrTA+WxJpT4bZ0gj234H2RELPBJumhjU5I 6CLyVtyExAZpCMPEZBSUgUirvbXPErj4+O1OC+RKlYsEoH0oGm8K4K7guEEVIPRO84 TY2t+2rhO/TtvI7YrUJfkqwe0/C9L98g4xjpphsWVvnvn16boEk3fCus3JMToMm93p kjR+8i7UepX2q+9UKtGfx2wr8epoPZGFxwUmYFvM00vS1BZS/6bG4JyMHwn/U9lSb8 DZQgwERwzMWV0EJZ3gIjhpDgeVJaGVd2tjwk0szwE9H6p4gc5SB1uJfeXOtQxaTFjg ZZWD480F+44yg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2FB536768B; Wed, 20 Aug 2025 08:46:55 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 20 Aug 2025 08:46:16 -0600 Message-ID: <20250820144621.1073679-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250820144621.1073679-1-sjg@u-boot.org> References: <20250820144621.1073679-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 56KZCAR5RXQLUL2BPWTE4LVC3YDUMU7U X-Message-ID-Hash: 56KZCAR5RXQLUL2BPWTE4LVC3YDUMU7U X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 14/14] test: efi: Add a test for the app booting Ubuntu via EFI List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Now that the EFI app supports booting Ubuntu via the EFI bootmeth, add a test for this, for ARM. This uses the sjg lab. Signed-off-by: Simon Glass --- test/py/tests/test_distro.py | 57 +++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/test/py/tests/test_distro.py b/test/py/tests/test_distro.py index 17190b7205b..77caf32145e 100644 --- a/test/py/tests/test_distro.py +++ b/test/py/tests/test_distro.py @@ -78,11 +78,10 @@ def test_distro_script(ubman): @pytest.mark.boardspec('efi-arm_app64') @pytest.mark.role('efi-aarch64') -def test_distro_arm_app(ubman): - """Test that the ARM EFI app can boot into Ubuntu 25.04""" - # with ubman.log.section('build'): - # utils.run_and_log(ubman, ['scripts/build-efi', '-a', 'arm']) +def test_distro_arm_app_extlinux(ubman): + """Test that the ARM EFI app can boot into Ubuntu 25.04 via extlinux""" with ubman.log.section('boot'): + 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"]) @@ -94,3 +93,53 @@ def test_distro_arm_app(ubman): ubman.expect(['Welcome to Ubuntu 25.04!']) ubman.restart_uboot() + +@pytest.mark.boardspec('efi-arm_app64') +@pytest.mark.role('efi-aarch64') +def test_distro_arm_app_efi(ubman): + """Test that the ARM EFI app can boot into Ubuntu 25.04 via EFI""" + with ubman.log.section('boot'): + 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"]) + + # Press Escape to force GRUB to appear, even if the silent menu was + # enabled by a previous boot + 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']) + + # Press 'e' to edit the command line + ubman.log.info("Pressing 'e'") + ubman.send('e') + for _ in range(10): + ubman.ctrl('N') + expected = '\tlinux\t/boot/vmlinuz-6.14.0-27-generic ' + expected += 'root=UUID=e5665fb4-e1de-4335-86da-357ad5422319 ro ' + for _ in expected: + ubman.ctrl('F') + + to_erase = 'quiet splash' + for _ in to_erase: + ubman.ctrl('D') + ubman.ctrl('X') + ubman.expect(['Booting a command list']) + + with ubman.log.section('exit boot-services'): + ubman.expect(['EFI stub: Exiting boot services...']) + + ubman.log.info("boot") + ubman.expect(['Booting Linux on physical CPU']) + + with ubman.log.section('initrd'): + ubman.expect(['Freeing initrd memory:']) + ubman.expect(['Run /init as init process']) + + with ubman.temporary_timeout(200 * 1000): + ubman.expect(['Ubuntu 25.04 qarm ttyAMA0']) + + ubman.restart_uboot()