open source firmware @ facebook•facebook promotes open source • systems software: kernel,...

27
Open Source Firmware @ Facebook David Hendricks: Firmware Engineer Andrea Barberio: Production Engineer "if you don't own your firmware, your firmware owns you"

Upload: others

Post on 25-May-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Open Source Firmware @ Facebook

David Hendricks: Firmware EngineerAndrea Barberio: Production Engineer

"if you don't own your firmware, your firmware owns you"

Page 2: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

• Facebook promotes open source• Systems Software: Kernel, CentOS, chef, etc.

• Hardware: Open Compute Project, Telecom Infrastructure Project

• Lots more: https://github.com/facebook and https://github.com/facebookincubator

Open Source @ Facebook

Page 3: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Open Source Firmware @ Facebook

OpenBMC initially released in 2015 and is quickly becoming standard on OCP hardware

System firmware is the next logical step

Page 4: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

• First bit of code that runs when CPU is turned on• Sometimes referred to as "BIOS"

System firmware in a nutshell

Initialize Hardware

Load OS

Page 5: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Problem: Local booting is more complex

Then NowFew, simple interfaces Many interfaces and protocols

Page 6: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Problem: Local booting is more complex

Then NowFew, simple interfaces Many interfaces and protocolsSimple, low-speed links High-speed links

Page 7: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Problem: Local booting is more complex

Then NowFew, simple interfaces Many interfaces and protocolsSimple, low-speed links High-speed links

Blindly execute MBR (CHS 0/0/1) Decrypt & mount filesystem

Page 8: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Problem: Network booting is more complex

Then NowSmall, trusted networks Global, untrusted networks

Page 9: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Problem: Network booting is more complex

Then NowSmall, trusted networks Global, untrusted networks

Few, simple interfaces and protocols Many interfaces and protocols

Page 10: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Problem: Network booting is more complex

Then NowSmall, trusted networks Global, untrusted networks

Few, simple interfaces and protocols Many interfaces and protocols

TFTP/PXE, security an afterthought TLS/HTTPS, designed for security

Page 11: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

TL;DR: SysFW is complex

Then/Now Now/FutureSysFW/BIOS is an OS Let Linux Do It

Page 12: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

The Solution: Let Linux Do It

Then/Now Now/FutureSysFW/BIOS is an OS Let Linux Do It

Opaque Open, well-understood at FB

Page 13: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

The Solution: Let Linux Do It

Then/Now Now/FutureSysFW/BIOS is an OS Let Linux Do It

Opaque Open, well-understood at FBProprietary ecosystem Auditable, debuggable

Page 14: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

The Solution: Let Linux Do It

Then/Now Now/FutureSysFW/BIOS is an OS Let Linux Do It

Opaque Open, well-understood at FBProprietary ecosystem Auditable, debuggableVendor-specific tooling Open-source tools

Page 15: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

The Solution: Let Linux Do It

Then/Now Now/FutureSysFW/BIOS is an OS Let Linux Do It

Opaque Open, well-understood at FBProprietary ecosystem Auditable, debuggableVendor-specific tooling Open-source tools

Product-specific Portable, re-usable

Page 16: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Let Linux Do it

• Put a kernel+initramfs in boot ROM

• Do minimal silicon init and jump to Linux as soon as possible

• Use Linux to boot Linux

Page 17: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Let Linux Do it

• Put a kernel+initramfs in boot ROM• Do minimal silicon init and jump to

Linux as soon as possible• Use Linux to boot Linux• Production-quality drivers,

networking

Page 18: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Let Linux Do it

• Put a kernel+initramfs in boot ROM• Do minimal silicon init and jump to

Linux as soon as possible• Use Linux to boot Linux• Production-quality drivers,

networking• Add features + tools as needed• Debug, build, deploy on our

schedule• Flexible security architecture• Boot in seconds, not minutes• Bring modern, open-source

development to the firmware

Page 19: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Scoping out the problemOpen Source Firmware @ Facebook

Page 20: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

That's a lot of servers

(and switches, too!)

Page 21: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

...and we're not just working on datacenters.

Page 22: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

OCP Open System Firmware

Because if you don't own your firmwareyour firmware owns you!

-- Ron Minnich

Page 23: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

• Andrea Barberio – Production Engineer @ FacebookHost Provisioning Engineering team

• Before we start: what are the LinuxBoot components?

Hands on with LinuxBoot

Page 24: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

LinuxBoot architecture @ FB

source: systemboot.org

Page 25: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Live demo (on a VM)

Page 26: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

Additional resources:• linuxboot.org• u-root.tk• systemboot.org

Thanks!

Questions?

• tpmtool.org• opencompute.org• telecominfraproject.com

David Hendricks <[email protected]>Andrea Barberio <[email protected]>

Page 27: Open Source Firmware @ Facebook•Facebook promotes open source • Systems Software: Kernel, CentOS, chef, etc. • Hardware: Open Compute Project, Telecom Infrastructure Project

(if you are here, the live demo failed)