blob: 5d94de326321af6cdf188774ef7f355d1994428f [file] [log] [blame]
Madhukar Pappireddy9062ebf2021-03-02 17:07:06 -06001#
Salman Nabidb6d9682025-02-25 12:45:13 +00002# Copyright (c) 2021-2025 Arm Limited. All rights reserved.
Madhukar Pappireddy9062ebf2021-03-02 17:07:06 -06003#
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
11source [file join [file dirname [info script]] handle-arguments.inc]
12
13# Trusted Firmware boot section
14source [file join [file dirname [info script]] trusted-firmware.inc]
15
16# Linux kernel boot section
Chris Kay78ea2c32022-11-15 12:24:24 +000017expect_string "Booting Linux on physical CPU" "Linux is booting"
18expect_string "Linux version" "Linux printed its version"
Madhukar Pappireddy9062ebf2021-03-02 17:07:06 -060019
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 Kay27634d62024-02-09 16:27:38 +000024expect_re "Machine model: FVP Base" "Linux successfully identified the machine model"
Chris Kay78ea2c32022-11-15 12:24:24 +000025expect_string "Kernel command line: console=ttyAMA0" "Linux received the correct command line"
Madhukar Pappireddy9062ebf2021-03-02 17:07:06 -060026
Salman Nabidb6d9682025-02-25 12:45:13 +000027# Check if the injected initrd values are correct and working
28expect_string "Unpacking initramfs..." "Linux found the initrd values in the chosen node"
29expect_string "Freeing initrd memory" "Linux successfully unpacked the initrd"
30
31# Check if Linux booted successfully and we have access to the Linux terminal
32expect_string "Freeing unused kernel memory" "Linux kernel boot success"
33expect_string "/ # " "The user has access to the Linux terminal"
34
Madhukar Pappireddy9062ebf2021-03-02 17:07:06 -060035exit_uart 0