mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
README.md qemu.md + CircleCI: point to images for building and using nix developed created docker image
- push v0.1.3 and have latest point to the same image, add repro notes inside of README.md - modify qemu.md to also refer to using docker images TODO: remove NIX_REPRO_NOTES prior of merging Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
parent
2b2356e87e
commit
f4db4b791c
@ -45,7 +45,7 @@ commands:
|
|||||||
jobs:
|
jobs:
|
||||||
prep_env:
|
prep_env:
|
||||||
docker:
|
docker:
|
||||||
- image: tlaurion/heads-dev-env:v0.1.1
|
- image: tlaurion/heads-dev-env:v0.1.3
|
||||||
resource_class: large
|
resource_class: large
|
||||||
working_directory: ~/heads
|
working_directory: ~/heads
|
||||||
steps:
|
steps:
|
||||||
@ -111,7 +111,7 @@ jobs:
|
|||||||
|
|
||||||
build_and_persist:
|
build_and_persist:
|
||||||
docker:
|
docker:
|
||||||
- image: tlaurion/heads-dev-env:v0.1.1
|
- image: tlaurion/heads-dev-env:v0.1.3
|
||||||
resource_class: large
|
resource_class: large
|
||||||
working_directory: ~/heads
|
working_directory: ~/heads
|
||||||
parameters:
|
parameters:
|
||||||
@ -139,7 +139,7 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: tlaurion/heads-dev-env:v0.1.1
|
- image: tlaurion/heads-dev-env:v0.1.3
|
||||||
resource_class: large
|
resource_class: large
|
||||||
working_directory: ~/heads
|
working_directory: ~/heads
|
||||||
parameters:
|
parameters:
|
||||||
@ -160,7 +160,7 @@ jobs:
|
|||||||
|
|
||||||
save_cache:
|
save_cache:
|
||||||
docker:
|
docker:
|
||||||
- image: tlaurion/heads-dev-env:v0.1.1
|
- image: tlaurion/heads-dev-env:v0.1.3
|
||||||
resource_class: large
|
resource_class: large
|
||||||
working_directory: ~/heads
|
working_directory: ~/heads
|
||||||
steps:
|
steps:
|
||||||
|
41
README.md
41
README.md
@ -28,8 +28,49 @@ Please refer to [Heads-wiki](https://osresearch.net) for your Heads' documentati
|
|||||||
|
|
||||||
Building heads
|
Building heads
|
||||||
===
|
===
|
||||||
|
|
||||||
|
Build docker from nix develop layer locally
|
||||||
|
====
|
||||||
|
|
||||||
|
```
|
||||||
|
sh <(curl -L https://nixos.org/nix/install) --no-daemon
|
||||||
|
. /home/user/.nix-profile/etc/profile.d/nix.sh
|
||||||
|
nix build .#dockerImage && docker load < result
|
||||||
|
```
|
||||||
|
|
||||||
|
Jump into docker image
|
||||||
|
=====
|
||||||
|
`docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) linuxboot/heads:dev-env`
|
||||||
|
|
||||||
|
Build a board from docker image
|
||||||
|
=====
|
||||||
`make BOARD=board_name` where board_name is the name of the board directory under `./boards` directory.
|
`make BOARD=board_name` where board_name is the name of the board directory under `./boards` directory.
|
||||||
|
|
||||||
|
|
||||||
|
Use prepared docker image from docker hub
|
||||||
|
====
|
||||||
|
```
|
||||||
|
docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) tlaurion/heads-dev-env:latest -- make BOARD=qemu-coreboot-whiptail-tpm2
|
||||||
|
docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) tlaurion/heads-dev-env:latest -- make BOARD=qemu-coreboot-whiptail-tpm2 run
|
||||||
|
```
|
||||||
|
|
||||||
|
Maintenance notes on docker image
|
||||||
|
===
|
||||||
|
Redo the steps above in case the flake.nix or nix.lock changes. Then publish on docker hub:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker tag tlaurion/heads-dev-env:vx.y.z tlaurion/heads-dev-env:latest
|
||||||
|
docker push tlaurion/heads-dev-env:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
- Local builds can use ":latest"
|
||||||
|
- To reproduce CirlceCI results, make sure to use the same versioned tag declared under .circleci/config.yml's "image:"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
General notes on reproducible builds
|
||||||
|
===
|
||||||
In order to build reproducible firmware images, Heads builds a specific
|
In order to build reproducible firmware images, Heads builds a specific
|
||||||
version of gcc and uses it to compile the Linux kernel and various tools
|
version of gcc and uses it to compile the Linux kernel and various tools
|
||||||
that go into the initrd. Unfortunately this means the first step is a
|
that go into the initrd. Unfortunately this means the first step is a
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
qemu-coreboot-(fb)whiptail-tpm[1,2](-hotp) boards
|
qemu-coreboot-(fb)whiptail-tpmX(-hotp) boards
|
||||||
===
|
===
|
||||||
|
|
||||||
The `qemu-coreboot-fbwhiptail-tpm1-hotp` configuration (and their variants) permits testing of most features of Heads.
|
The `qemu-coreboot-fbwhiptail-tpm1-hotp` configuration (and their variants) permits testing of most features of Heads.
|
||||||
@ -87,3 +87,14 @@ swtpm on Debian bookworm
|
|||||||
===
|
===
|
||||||
1. Install dependencies
|
1. Install dependencies
|
||||||
* `sudo apt install swtpm swtpm-tools`
|
* `sudo apt install swtpm swtpm-tools`
|
||||||
|
|
||||||
|
swtpm on nix docker image
|
||||||
|
===
|
||||||
|
Nothing to do. Everything needed is in the docker image.
|
||||||
|
|
||||||
|
Just make sure to pass DISPLAY environement variable on your docker command line. eg:
|
||||||
|
* Remotely downloaded docker image (doing make command only inside of docker example):
|
||||||
|
* `docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) tlaurion/heads-dev-env:latest -- make BOARD=qemu-coreboot-whiptail-tpm2`
|
||||||
|
* `docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) tlaurion/heads-dev-env:latest -- make BOARD=qemu-coreboot-whiptail-tpm2 run`
|
||||||
|
* Locally created docker image from nix develop environment (jumping into docker image variation of the above, where developer does what he wants within):
|
||||||
|
* `docker run -e DISPLAY=$DISPLAY --network host --rm -ti -v $(pwd):$(pwd) -w $(pwd) linuxboot/heads:dev-env`
|
||||||
|
Loading…
Reference in New Issue
Block a user