Skip to content
Vincent Stehlé edited this page Jun 17, 2024 · 4 revisions

Note

This page is obsolete and kept for convenience.

This document is a guide for testing EBBR compliance.

Prerequisites

Obtain Tools and Distro images

Needed for device under test:

  • Platform under test with firmware already installed
  • Firmware capsule image in Firmware Management Protocol (FMP) format

3rd party tools

  • UEFI SCT installed on USB drive
  • One or more generic Linux Distro ISO images on USB drives

Test Plan

U-Boot Tests

U-Boot Sniff Test

The U-Boot Sniff test isn't testing for anything particular. Instead it runs through a list of common U-Boot commands that should provide predictable output. While running through the list, look out for crashes or error messages from U-Boot.

While logging the output from the serial console, reboot the platform and run the following commands from the U-Boot shell. Save the log as 'u-boot-snifftest-.log'.

u-boot=> help
u-boot=> version
u-boot=> printenv
u-boot=> printenv -e
u-boot=> bdinfo
u-boot=> rtc list
u-boot=> sf probe
u-boot=> usb reset
u-boot=> usb info
u-boot=> mmc rescan
u-boot=> mmc list
u-boot=> mmc info
u-boot=> efidebug devices
u-boot=> efidebug drivers
u-boot=> efidebug dh
u-boot=> efidebug memmap
u-boot=> efidebug tables
u-boot=> efidebug boot dump

UEFI Tests

Download and build SCT as per instructions here: https://github.com/glikely/edk2-test-manifest. Unzip the resulting SCT zip file onto a FAT formatted USB drive and use it to boot the platform. Firmware should boot to the UEFI Shell.

UEFI Sniff Test

While capturing the output from the serial console, boot into the UEFI shell from the SCT USB drive and run the following commands. Save the log as 'uefi-snifftest.log'

FS0:\Sct\> cd ..
FS0:\> pci
FS0:\> drivers
FS0:\> devices
FS0:\> devtree
FS0:\> dmpstore
FS0:\> dh -d -v
FS0:\> memmap

Run the UEFI SCT Test Suite

To run the SCT, From the UEFI shell run the tests in the EBBR sequence file:

FS0:\Sct\> sct -s EBBR.seq -v

The SCT will take several hours to run, and the platform will reboot several times. When the SCT has completed it will return to the FS0:> prompt and the SCT logs will be saved on the USB drive. Process the logs with the parser to get a summary of results:

$ cd /path/to/edk2-test-build/sct_parser
$ ./parser.py --config EBBR.yaml /path/to/Summary.ekl EBBR.seq --csv out.csv --json out.json --yaml out.yaml

Results:
INFO apply_rules: Updated 361 test(s) out of 10906 after applying 132 rule(s)
INFO main: 0 dropped(s), 0 failure(s), 30 ignored(s), 10545 pass(s), 331 waived(s), 0 warning(s)

Test UpdateCapsule()

Copy the firmware capsule file to the root of the SCT USB drive and boot into the UEFI shell on the platform.

FS0:\Sct\> cd ..
.... FIXME ... ADD CapsuleApp commands ...

Linux Tests

Test install of Linux distros

One of the goals of EBBR is to support booting unmodified generic UEFI distro images, preferably from an ISO image written to a USB key. The following distros produce suitable ISO images

Fedora IoT -
OpenSuse -
Debian
Ubuntu Aarch64 Server

To test Linux distro install, write the ISO image to a USB drive and use it to boot the system while logging the console output

$ dd if=/path/to/distro-image.iso of=/dev/sd[?] ; sync

Linux Sniff Test

While capturing the output from the serial console, boot into the installed Linux distro, login as root and run the following commands. Save the log as <distro>-snifftest.log.

# dmesg
# lspci -vvv
# lscpu
# lsblk
# dmidecode
# uname -a
# efibootmgr

Finally, archive the entire content of /sys/firmware as <distro>-firmware.tar.gz.

Clone this wiki locally