diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a838d35..fb8f6e2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,3 +1,4 @@ +--- # This is a basic workflow to help you get started with Actions name: CI @@ -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: diff --git a/Dockerfile b/Dockerfile index db105e1..d16c092 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 && \ diff --git a/Documentation/dev_workflow.md b/Documentation/dev_workflow.md index d8128a4..9f95b31 100644 --- a/Documentation/dev_workflow.md +++ b/Documentation/dev_workflow.md @@ -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 @@ -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 @@ -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 @@ -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 - ``` @@ -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. diff --git a/Documentation/fw_dell_optiplex.md b/Documentation/fw_dell_optiplex.md index d1eaa12..bc9dcd8 100644 --- a/Documentation/fw_dell_optiplex.md +++ b/Documentation/fw_dell_optiplex.md @@ -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. diff --git a/Documentation/use_cases.md b/Documentation/use_cases.md index f453ea9..2eec57b 100644 --- a/Documentation/use_cases.md +++ b/Documentation/use_cases.md @@ -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 diff --git a/README.md b/README.md index 071822f..0dd48a9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/scripts/aem/README.md b/scripts/aem/README.md index 2ac9f3e..8057b6a 100644 --- a/scripts/aem/README.md +++ b/scripts/aem/README.md @@ -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 @@ -17,7 +17,7 @@ Minimal `bzImage` and `initramfs.cpio` can be found in . 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: @@ -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`