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