Madhukar Pappireddy | 9062ebf | 2021-03-02 17:07:06 -0600 | [diff] [blame] | 1 | # |
Salman Nabi | db6d968 | 2025-02-25 12:45:13 +0000 | [diff] [blame] | 2 | # Copyright (c) 2021-2025 Arm Limited. All rights reserved. |
Madhukar Pappireddy | 9062ebf | 2021-03-02 17:07:06 -0600 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | # Expect script for Trusted Firmware + Linux boot process |
| 7 | # |
| 8 | # Refer to handle-arguments.inc for the list of parameters. |
| 9 | # |
| 10 | |
| 11 | source [file join [file dirname [info script]] handle-arguments.inc] |
| 12 | |
| 13 | # Trusted Firmware boot section |
| 14 | source [file join [file dirname [info script]] trusted-firmware.inc] |
| 15 | |
| 16 | # Linux kernel boot section |
Chris Kay | 78ea2c3 | 2022-11-15 12:24:24 +0000 | [diff] [blame] | 17 | expect_string "Booting Linux on physical CPU" "Linux is booting" |
| 18 | expect_string "Linux version" "Linux printed its version" |
Madhukar Pappireddy | 9062ebf | 2021-03-02 17:07:06 -0600 | [diff] [blame] | 19 | |
| 20 | # The kernel prints some information it takes from the preloaded DTB. |
| 21 | # Check for following information to see that we actually got the right DTB. |
| 22 | # 1. Machine model |
| 23 | # 2. Command line passed via the "/chosen" node |
Chris Kay | 27634d6 | 2024-02-09 16:27:38 +0000 | [diff] [blame] | 24 | expect_re "Machine model: FVP Base" "Linux successfully identified the machine model" |
Chris Kay | 78ea2c3 | 2022-11-15 12:24:24 +0000 | [diff] [blame] | 25 | expect_string "Kernel command line: console=ttyAMA0" "Linux received the correct command line" |
Madhukar Pappireddy | 9062ebf | 2021-03-02 17:07:06 -0600 | [diff] [blame] | 26 | |
Salman Nabi | db6d968 | 2025-02-25 12:45:13 +0000 | [diff] [blame] | 27 | # Check if the injected initrd values are correct and working |
| 28 | expect_string "Unpacking initramfs..." "Linux found the initrd values in the chosen node" |
| 29 | expect_string "Freeing initrd memory" "Linux successfully unpacked the initrd" |
| 30 | |
| 31 | # Check if Linux booted successfully and we have access to the Linux terminal |
| 32 | expect_string "Freeing unused kernel memory" "Linux kernel boot success" |
| 33 | expect_string "/ # " "The user has access to the Linux terminal" |
| 34 | |
Madhukar Pappireddy | 9062ebf | 2021-03-02 17:07:06 -0600 | [diff] [blame] | 35 | exit_uart 0 |