Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pre commit failures #11

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# This is a basic workflow to help you get started with Actions

name: CI
Expand All @@ -6,11 +7,11 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
branches: ["master"]
tags:
- v*.*.*
pull_request:
branches: [ "master" ]
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ RUN \
wget \
xz-utils \
zlib1g-dev \
&& apt-get clean
&& apt-get clean

ENV PATH="/usr/lib/ccache:${PATH}"
RUN mkdir /home/trenchboot/.ccache && \
Expand Down
28 changes: 17 additions & 11 deletions Documentation/dev_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ on remote machine.

Assumptions:

- during development, you may and probably at some point will break booting on
* during development, you may and probably at some point will break booting on
target device, so don't test on host
- you should have a way of booting another Linux distribution on target, even if
* you should have a way of booting another Linux distribution on target, even if
main disk's bootloader isn't working
- this can be either another drive with another bootloader or iPXE
- bootable USB stick with live Debian should be good
- there is network connection between target and host
- target obtains its IP through DHCP or is set manually (not shown below)
- this can be either another drive with another bootloader or iPXE
- bootable USB stick with live Debian should be good
* there is network connection between target and host
- target obtains its IP through DHCP or is set manually (not shown below)

# Workflow

Expand All @@ -26,12 +26,12 @@ details. The description here will be a bit more streamlined.
Start by creating a directory where you'll be working and copy `aem.sh` there.
Create configuration file called `aem-cfg.sh`. It's a bash script which `aem.sh`
sources on startup. You want to adjust the following:
* branches and maybe URLs to projects if not working on default ones
* IP address of your machine (**don't miss this**)
* port to use when starting a local HTTP server in case `8080` is in use
* disk and partition devices on DUT (**checking this twice won't hurt**, don't
* branches and maybe URLs to projects if not working on default ones
* IP address of your machine (**don't miss this**)
* port to use when starting a local HTTP server in case `8080` is in use
* disk and partition devices on DUT (**checking this twice won't hurt**, don't
put in device of your USB stick instead of the target disk!)
* list of files to send to DUT in case you want to use different names or
* list of files to send to DUT in case you want to use different names or
location on DUT (don't forget to adjust `grub.cfg` accordingly)

```bash
Expand Down Expand Up @@ -63,6 +63,7 @@ for output, which might need to be changed for VGA.
## Initialization on host

Run:

```bash
./aem.sh init
./aem.sh build
Expand All @@ -75,11 +76,13 @@ subdirectory at this point. The latter two can be found in
## Setup on DUT

Start serving HTTP data on your host:

```bash
./aem.sh serve
```

Run this on DUT, but with IP and port number of your host machine:

```bash
wget -O - 10.0.2.2:8080 | bash -
```
Expand All @@ -88,14 +91,17 @@ wget -O - 10.0.2.2:8080 | bash -

Run `build` subcommand with optional `grub` or `xen` parameter (depending on
where you've made your edits):

```bash
./aem.sh build
```

In case of changes to the list of GRUB submodules, also do:

```bash
./aem.sh serve update
```

This will regenerate related files provided by the HTTP server.

On the DUT side, run the `wget` command from again to apply changes.
6 changes: 3 additions & 3 deletions Documentation/fw_dell_optiplex.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Firmware preparation
# Firmware preparation

### Configuring firmware for the Dell OptiPlex 7010/9010
## Configuring firmware for the Dell OptiPlex 7010/9010

This step prepares the firmware with TXT firmware for the Dell OptiPlex
7010/9010 computer. Do note that some of the binary blobs necessary for building
functional firmware are not publically available and we cannot share them here.
functional firmware are not publicly available and we cannot share them here.
You may need to extract them yourself, but these steps are not covered in this
tutorial.

Expand Down
8 changes: 4 additions & 4 deletions Documentation/use_cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
### Software

* coreboot revision: coreboot-4.17-287-g4dba71fd25-v0.1.0
* build instructions: [Build firmware with TXT for Dell OptiPlex](fw_dell_optiplex.md)
* flash instructions: [Dasharo documentation](https://docs.dasharo.com/variants/dell_optiplex/initial-deployment/)
- build instructions: [Build firmware with TXT for Dell OptiPlex](fw_dell_optiplex.md)
- flash instructions: [Dasharo documentation](https://docs.dasharo.com/variants/dell_optiplex/initial-deployment/)
* GRUB revision: [intel-txt-aem](https://github.com/TrenchBoot/grub/tree/intel-txt-aem)
* [build and installation instruction](./dev_workflow.md)
- [build and installation instruction](./dev_workflow.md)
* Xen revision: [aem/develop](https://github.com/3mdeb/xen/tree/aem/develop)
* [build and installation instruction](./dev_workflow.md)
- [build and installation instruction](./dev_workflow.md)
* Qubes OS 4.1
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# trenchboot-sdk

SDK for building and maintaining TrenchBoot patches fro GRUB2, Xen and Linux kernel.
SDK for building and maintaining TrenchBoot patches for GRUB2, Xen and Linux
kernel.

## How to compile most recent TrenchBoot patches

Expand Down
16 changes: 9 additions & 7 deletions scripts/aem/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Script for provisioning a DUT with WIP GRUB and Xen
# Script for provisioning a DUT with WIP GRUB and Xen

### Setup on first use
## Setup on first use

```bash
./aem.sh init # can specify --depth=1
Expand All @@ -17,7 +17,7 @@ Minimal `bzImage` and `initramfs.cpio` can be found in
<http://boot.3mdeb.com/tb/mb2/>. Full kernel and initramfs from most
distributions should also work, as long as they are built for Xen.

### After making changes in GRUB/Xen
## After making changes in GRUB/Xen

Rebuild everything:

Expand All @@ -41,27 +41,29 @@ Rebuild only Xen:
./aem.sh build xen
```

### On DUT
## On DUT

```bash
wget -O - 10.0.2.2:8080 | bash -
```

### After done with everything
## After done with everything

Remove everything but config and your files in webroot/:

```bash
./aem.sh purge
```

The server is stopped automatically if it was still running.

### Multiple workspaces
## Multiple workspaces

You can put the script in `$PATH` or call it outside of the directory it resides
in in current way. This enables creation of multiple independent workspaces.
Could be useful for working with several branches of projects.

### Some implementation details
## Some implementation details

The script downloaded via `wget` on DUT is generated by `aem.sh`. So all your
edits will be lost on the next `./aem.sh serve on` or `./aem.sh serve update`
Expand Down
Loading