Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 1 | # |
Leonardo Sandoval | 579c737 | 2020-10-23 15:23:32 -0500 | [diff] [blame^] | 2 | # Copyright (c) 2019-2020 Arm Limited. All rights reserved. |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame] | 6 | # Expect script for Trusted Firmware + EDK2 UART0 |
| 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 | # EDK2 section |
| 17 | expect { |
| 18 | "UEFI firmware" { |
| 19 | puts "<<EDK2 starting>>" |
| 20 | } |
| 21 | timeout { |
| 22 | exit_uart -1 |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | expect { |
| 27 | "UEFI Interactive Shell" { |
| 28 | puts "<<EDK2 shell starting>>" |
| 29 | } |
| 30 | timeout { |
| 31 | exit_uart -1 |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | expect { |
| 36 | "any other key to continue." { |
| 37 | send "\r" |
| 38 | } |
| 39 | timeout { |
| 40 | exit_uart -1 |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | expect { |
| 45 | "Shell>" { |
| 46 | send "fs0:\r" |
| 47 | } |
| 48 | timeout { |
| 49 | exit_uart -1 |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | expect { |
| 54 | "FS0:" { |
| 55 | send "UefiInfo.efi\r" |
| 56 | puts "<<Loading UEFI application>>" |
| 57 | } |
| 58 | timeout { |
| 59 | exit_uart -1 |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | expect { |
| 64 | -re "Loading driver at .* UefiInfo.efi" { |
| 65 | puts "<<UEFI application is being loaded>>" |
| 66 | } |
| 67 | timeout { |
| 68 | exit_uart -1 |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | expect { |
| 73 | "FS0:" { |
| 74 | puts "<<UEFI application loaded>>" |
| 75 | } |
| 76 | timeout { |
| 77 | exit_uart -1 |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | exit_uart 0 |