linuxboot / heads

A minimal Linux that runs as a coreboot or LinuxBoot ROM payload to provide a secure, flexible boot environment for laptops, workstations and servers.
https://osresearch.net/
GNU General Public License v2.0
1.41k stars 183 forks source link

Embed blobs downloading into board configurations (based on t440p work) #1335

Open tlaurion opened 1 year ago

tlaurion commented 1 year ago

t440p board inclusion brought interesting new way of downloading needed blobs prior of building final coreboot step of a board makefile per global Makefile config.

Thanks to @rbreslow, the t440p introduced an old dream of having boards being able to self download its needed blobs directly from board configuration prior of building final coreboot stage which requires those blobs to be in place. Change was introduced because t440p requires an additional coreboot util to be built to be able to extract haswell mrc blob, therefore needing coreboot to be extracted, patched and then that util build for host for the host to be able to use that tool to extract the archive downloaded and extract the needed blob prior of building coreboot to use it.

As of now, xx20 and xx30 blobs are downloaded and extracted in CircleCI prep step, making the blobs cached once to be used by all boards being built after.

This will need a bit more thought prior of refactoring CircleCI config and boards configs to include same concept. This is good for UX: no more need to do anything, a board will download a place blobs in place. In CI: this means the blobs will be redownloaded musltiple times if not part of a workspace cache passed along, meaning that:

rbreslow commented 1 year ago

Consider the T440p pattern of inheriting from a base config: https://github.com/osresearch/heads/blob/2995376cdaffae4457f3042bfdbd33414b475086/boards/t440p-hotp-maximized/t440p-hotp-maximized.config#L1-L2

This will reduce duplication of the blob downloading Make targets and generally clean things up.