Firmware Test Suite - Uses, Development, Contribution and GPL Fall - - PowerPoint PPT Presentation

firmware test suite uses development contribution and gpl
SMART_READER_LITE
LIVE PREVIEW

Firmware Test Suite - Uses, Development, Contribution and GPL Fall - - PowerPoint PPT Presentation

presented by Firmware Test Suite - Uses, Development, Contribution and GPL Fall 2017 UEFI Seminar and Plugfest November 1, 2017 Alex Hung - Canonical Ltd UEFI Plugfest October 2017 www.uefi.org 1 Agenda Introduction Installation


slide-1
SLIDE 1

presented by

Firmware Test Suite - Uses, Development, Contribution and GPL

Fall 2017 UEFI Seminar and Plugfest November 1, 2017 Alex Hung - Canonical Ltd

UEFI Plugfest – October 2017 www.uefi.org 1

slide-2
SLIDE 2

Agenda

  • Introduction
  • Installation & Uses
  • Develop and Contribute
  • FWTS License & FWTS

Community

UEFI Plugfest – October 2017 www.uefi.org 2

slide-3
SLIDE 3

Introduction

UEFI Plugfest – October 2017 www.uefi.org 3

slide-4
SLIDE 4

What is Firmware Test Suite (FWTS)?

  • The recommended ACPI SCT
  • An open-source Linux tool that automates

firmware checking

  • A good choice if one wants to

implement new tests for specific features

UEFI Plugfest – October 2017 www.uefi.org 4

slide-5
SLIDE 5

FWTS Framework

UEFI Plugfest – October 2017 www.uefi.org 5

Linux Kernel

UEFI Runtime Services ACPI Tables and AML

ACPICA

Hardware Devices CPU SMBIOS

Firmware Test Suite

ACPI BIOS Device Tree Kernel SMBIOS OPAL PCI UEFI etc…

slide-6
SLIDE 6

FWTS Framework – ACPI & UEFI

UEFI Plugfest – October 2017 www.uefi.org 6

ACPI

acpitables fadt mcfg method more ACPI tables…

UEFI Runtime

csm esrt

securebootcert uefibootpatch

more uefi runtime tests

slide-7
SLIDE 7

Installation & Uses

UEFI Plugfest – October 2017 www.uefi.org 7

slide-8
SLIDE 8

Getting FWTS-LIVE

  • Download - http://fwts.ubuntu.com/fwts-live/
  • Make bootable fwts-live USB disk

– Linux:

  • Identify USB disk: dmesg | tail -10 | grep Attached
  • Copy image: sudo dd if=fwts-live-17.09.00.img
  • f=/dev/sdb ; sync

– Windows: “Win32 Disk Imager”

UEFI Plugfest – October 2017 www.uefi.org 8

slide-9
SLIDE 9

Installing FWTS in Ubuntu

  • Add repository for latest release

–sudo add-apt-repository ppa:firmware- testing-team/ppa-fwts-stable

  • Install fwts

–sudo apt update –sudo apt install fwts fwts-frontend

UEFI Plugfest – October 2017 www.uefi.org 9

slide-10
SLIDE 10

Installing FWTS from Source Code

  • Download source code

– git clone git://kernel.ubuntu.com/hwe/fwts.git – git clone https://github.com/ColinIanKing/fwts

  • Setup build environments & configure

– sudo apt-get build-dep fwts – autoreconf -ivf && ./configure

  • Compile and install

– make clean && make -j4 && sudo make install

UEFI Plugfest – October 2017 www.uefi.org 10

slide-11
SLIDE 11

FWTS User Interfaces (Demo)

UEFI Plugfest – October 2017 www.uefi.org 11

Firmware Test Suite

ACPI APIC BIOS Device Tree Kernel SMBIOS PCI UEFI etc…

Command Line fwts-frontend (GUI)

slide-12
SLIDE 12

Using FWTS – Command Line

  • Run a single test, ex. C states

– sudo fwts cpufreq

  • Run multiple tests, ex. C states + PCIe ASPM

– sudo fwts cpufreq aspm

  • Run all ACPI tests + all UEFI tests

– sudo fwts --acpitests --uefitests

  • View all tests

– fwts --show-tests-full

UEFI Plugfest – October 2017 www.uefi.org 12

slide-13
SLIDE 13

Using FWTS – Command Line

UEFI Plugfest – October 2017 www.uefi.org 13

slide-14
SLIDE 14

Using FWTS – fwts-frontend-text

UEFI Plugfest – October 2017 www.uefi.org 14

slide-15
SLIDE 15

Using FWTS – fwts-frontend-text

UEFI Plugfest – October 2017 www.uefi.org 15

slide-16
SLIDE 16

Using FWTS – fwts-frontend-text

UEFI Plugfest – October 2017 www.uefi.org 16

slide-17
SLIDE 17

Using FWTS – fwts-frontend-text

UEFI Plugfest – October 2017 www.uefi.org 17

slide-18
SLIDE 18

Using FWTS – fwts-frontend-text

UEFI Plugfest – October 2017 www.uefi.org 18

slide-19
SLIDE 19

Results.log

UEFI Plugfest – October 2017 www.uefi.org 19

slide-20
SLIDE 20

Results.log – Tests

UEFI Plugfest – October 2017 www.uefi.org 20

slide-21
SLIDE 21

Results.log – Summary

UEFI Plugfest – October 2017 www.uefi.org 21

slide-22
SLIDE 22

Develop and Contribute

UEFI Plugfest – October 2017 www.uefi.org 22

slide-23
SLIDE 23

FWTS Directories

UEFI Plugfest – October 2017 www.uefi.org 23

Firmware Test Suite

ACPI BIOS Device Tree Kernel SMBIOS Opal PCI UEFI etc…

slide-24
SLIDE 24

Adding an ACPI Table Test

  • Commit 74a34fe4abbe0902

UEFI Plugfest – October 2017 www.uefi.org 24

slide-25
SLIDE 25

Submitting Patches

UEFI Plugfest – October 2017 www.uefi.org 25

Send patches by Git Generate patches by Git

Header Signed-off

(Implement fwts-test tests)

Check Coding Styles (Linux Kernel) Function brackets Spaces & tabs Line length(?)

Write Some Code

Add a new test Fix a bug

slide-26
SLIDE 26

Why Contribute to FWTS?

  • Framework is easy to add new features,
  • ex. Device Tree
  • Existing code is available, ex. ARM’s

Server Base Boot Requirements (SBBR)

  • Example: an imaginary Linux-Only-Spec

that must exclude all Windows features

–No DBGP, DBG2, MSDM, and SLIC etc…

UEFI Plugfest – October 2017 www.uefi.org 26

slide-27
SLIDE 27

FWTS License & FWTS Community

UEFI Plugfest – October 2017 www.uefi.org 27

slide-28
SLIDE 28

License – GPLv2

  • FWTS uses GPLv2 license

– A “Copy-Left” license

  • Can-do & can’t-do
  • Should I upstream my code?

– It depends, but it is recommended

  • Must I open-source my code?

– Unless you release the binary, the answer is usually No – But maintenance gets difficult as FWTS grows

UEFI Plugfest – October 2017 www.uefi.org 28

slide-29
SLIDE 29

Contact FWTS community

  • Email List: fwts-devel@lists.ubuntu.com
  • Facebook: firmwaretestsuite
  • Twitter: fwts_team
  • UEFI Plugfest
  • https://wiki.ubuntu.com/FirmwareTestSuite

UEFI Plugfest – October 2017 www.uefi.org 29

slide-30
SLIDE 30

Q&A

UEFI Plugfest – October 2017 www.uefi.org 30

slide-31
SLIDE 31

Thanks for attending the Fall 2017 UEFI Seminar and Plugfest For more information on the Unified EFI Forum and UEFI Specifications, visit http://www.uefi.org

presented by

UEFI Plugfest – October 2017 www.uefi.org 31