From 9a93da087d0746bdab06ff798eb0661ca7383d9c Mon Sep 17 00:00:00 2001 From: Michael Cardell Widerkrantz Date: Thu, 22 May 2025 16:49:39 +0200 Subject: [PATCH] doc: Document how to flash with filesystem --- README.md | 20 +++++++++++++++++++- hw/application_fpga/fw/README.md | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d32a181..d247a5f 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,13 @@ https://github.com/tillitis/tkey-libs but keep our own copy of it in the repo. See below. -## Building +## Building & flashing + +You need a [TKey +Unlocked](https://shop.tillitis.se/products/tkey-not-provisioned) and +a [TKey Programmer +Board](https://shop.tillitis.se/products/tkey-dev-kit) to use this on +real hardware. Building is probably easiest using make and Podman. Do this to see all targets: @@ -103,6 +109,18 @@ cd contrib make run-make ``` +To flash the bitstream, the testloadapp in app slot 0 and the +partition table copies in one go, place the TKey Unlocked in the TP1, +then do: + +``` +make flash +``` + +This uses the make target `prog_flash` in +`hw/application_fpga/Makefile` behind the scenes, but mounts your TP1 +device into the container. + See the [Tillitis Developer Handbook](https://dev.tillitis.se) for more. diff --git a/hw/application_fpga/fw/README.md b/hw/application_fpga/fw/README.md index f871ec2..72d9524 100644 --- a/hw/application_fpga/fw/README.md +++ b/hw/application_fpga/fw/README.md @@ -765,6 +765,26 @@ initiated before starting for the first time. You need a [TKey Programmer Board](https://shop.tillitis.se/products/tkey-dev-kit) for this part. +If you just want to build and flash the bitstream, the testloadapp in +app slot 0, and the partition table copies in one go, place the TKey +Unlocked in the TP1, then: + +Using Podman, from the top level directory: + +``` +cd contrib +make flash +``` + +Using native tools: + +``` +cd hw/application_fpga +make prog_flash +``` + +If you want to prepare the filesystem yourself: + 1. Choose your pre-loaded app. You *must* have a pre-loaded app, for example `testloadapp`. Build it with the OCI image we use. The binary needs to produce the BLAKE2s digest in `allowed_app_digest`