fw: Change loader app

- Change loader app from testloadapp to defaultapp
- Update default_partition.bin to contain defaultapp.bin
This commit is contained in:
Jonas Thörnblad 2025-08-21 16:15:53 +02:00 committed by Mikael Ågren
parent babdef52f5
commit 1926d19146
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
8 changed files with 13 additions and 13 deletions

View file

@ -106,7 +106,7 @@ to use this on real hardware.
Building is probably easiest using make and Podman. Building is probably easiest using make and Podman.
To build everything and then flash the resulting bitstream with the To build everything and then flash the resulting bitstream with the
testloadapp in app slot 0 and the partition table copies in one go, defaultapp in app slot 0 and the partition table copies in one go,
place the TKey Unlocked in the TP1, then do: place the TKey Unlocked in the TP1, then do:
``` ```

View file

@ -16,7 +16,7 @@ all:
@echo "run-make-no-clean Like run-make but without cleaning first, useful for iterative firmware dev" @echo "run-make-no-clean Like run-make but without cleaning first, useful for iterative firmware dev"
@echo "run-make-ch552-no-clean Like run-make-ch552 but without cleaning first, useful for iterative firmware dev" @echo "run-make-ch552-no-clean Like run-make-ch552 but without cleaning first, useful for iterative firmware dev"
@echo "run-make-clean_fw Like run-make but cleans only firmware" @echo "run-make-clean_fw Like run-make but cleans only firmware"
@echo "flash Build bitstream and testloadapp.bin then program them and the partition table onto the TKey SPI flash" @echo "flash Build bitstream and defaultapp.bin then program them and the partition table onto the TKey SPI flash"
@echo "pull Pull down the image '$(IMAGE)' (Podman)" @echo "pull Pull down the image '$(IMAGE)' (Podman)"
@echo "build-image Build a toolchain image named '$(BUILDIMAGE)' (Podman)" @echo "build-image Build a toolchain image named '$(BUILDIMAGE)' (Podman)"
@echo " A newly built image can be used like: make IMAGE=$(BUILDIMAGE) run" @echo " A newly built image can be used like: make IMAGE=$(BUILDIMAGE) run"

View file

@ -474,7 +474,7 @@ tb_application_fpga: $(SIM_VERILOG_SRCS) \
prog_flash: check-hardware application_fpga.bin prog_flash: check-hardware application_fpga.bin
tillitis-iceprog application_fpga.bin tillitis-iceprog application_fpga.bin
make -C apps make -C apps
(cd tools && ./load_preloaded_app.sh 0 ../apps/testloadapp.bin) (cd tools && ./load_preloaded_app.sh 0 ../apps/defaultapp.bin)
.PHONY: prog_flash .PHONY: prog_flash
prog_flash_bs: check-hardware application_fpga.bin prog_flash_bs: check-hardware application_fpga.bin
@ -561,7 +561,7 @@ help:
@echo "tb_application_fpga Build testbench simulation for the design" @echo "tb_application_fpga Build testbench simulation for the design"
@echo "lint Run lint on Verilog source files." @echo "lint Run lint on Verilog source files."
@echo "tb Run all testbenches" @echo "tb Run all testbenches"
@echo "prog_flash Program device flash with FGPA bitstream (including firmware), partition table, and testloadapp.bin (using the RPi Pico-based programmer)." @echo "prog_flash Program device flash with FGPA bitstream (including firmware), partition table, and defaultapp.bin (using the RPi Pico-based programmer)."
@echo "prog_flash_bs Program device flash with FGPA bitstream including firmware (using the RPi Pico-based programmer)." @echo "prog_flash_bs Program device flash with FGPA bitstream including firmware (using the RPi Pico-based programmer)."
@echo "prog_flash_testfw Program device flash as above, but with testfw." @echo "prog_flash_testfw Program device flash as above, but with testfw."
@echo "clean Delete all generated files." @echo "clean Delete all generated files."

View file

@ -1 +1 @@
dfba361c83337c6bac2364d1fd8f115eeb7feeae5faabbdf0713c79b44bbd78d application_fpga.bin e1d00c7ff336b46ef55c72561fef36736fc3ad403b9dfc320ab1aa57821f9c5c application_fpga.bin

View file

@ -1 +1 @@
4be2767d5ddd30b5422f4b58075365cb6d988259e88ffa14d6d243560b289f54eaf0c351e9d744cff8ec3a18b1830f3925a86f36bd2096c12eccce25ed44993c firmware.bin 3962830ae67c08f4e8b6e077c84e2de40b63703a5e1fffe29243ee2a5958d3c9ac992e7b88a2154639ae10db369161cbc27a150b450f047fbcb866b40d8661c9 firmware.bin

View file

@ -768,7 +768,7 @@ initiated before starting for the first time. You need a [TKey
Programmer Board](https://shop.tillitis.se/products/tkey-dev-kit) for Programmer Board](https://shop.tillitis.se/products/tkey-dev-kit) for
this part. this part.
If you just want to build and flash the bitstream, the testloadapp in If you just want to build and flash the bitstream, the defaultapp in
app slot 0, and the partition table copies in one go, place the TKey app slot 0, and the partition table copies in one go, place the TKey
Unlocked in the TP1, then: Unlocked in the TP1, then:
@ -789,7 +789,7 @@ make prog_flash
If you want to prepare the filesystem yourself: If you want to prepare the filesystem yourself:
1. Choose your pre-loaded app. You *must* have a pre-loaded app, for 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 example `defaultapp`. Build it with the OCI image we use. The
binary needs to produce the BLAKE2s digest in `allowed_app_digest` binary needs to produce the BLAKE2s digest in `allowed_app_digest`
`tk1/mgmt_app.c`. `tk1/mgmt_app.c`.
@ -797,7 +797,7 @@ If you want to prepare the filesystem yourself:
``` ```
$ cd ../tools $ cd ../tools
$ ./load_preloaded_app.sh 0 ../fw/testloadapp/testloadapp.bin $ ./load_preloaded_app.sh 0 ../apps/defaultapp.bin
``` ```
If you want to use a different pre-loaded app you have to If you want to use a different pre-loaded app you have to

View file

@ -13,10 +13,10 @@
// To update this, compute the BLAKE2s digest of the app.bin // To update this, compute the BLAKE2s digest of the app.bin
// clang-format off // clang-format off
static const uint8_t allowed_app_digest[32] = { static const uint8_t allowed_app_digest[32] = {
0x85, 0x29, 0xe3, 0x25, 0xf5, 0x8d, 0x53, 0x5f, 0x40, 0x7f, 0x58, 0xbe, 0x39, 0xcf, 0xae, 0xaf,
0xe1, 0x2a, 0x77, 0x92, 0xe7, 0xdc, 0x4b, 0x4d, 0x43, 0xa0, 0x75, 0x90, 0x4d, 0x43, 0xa3, 0x2e,
0x01, 0x85, 0x17, 0xca, 0xfd, 0x54, 0x83, 0xb3, 0xa1, 0x5f, 0x4c, 0x1b, 0x6a, 0xf3, 0x69, 0x4d,
0xbb, 0x28, 0x4f, 0xa1, 0x98, 0x5f, 0x9e, 0x56, 0x74, 0x05, 0x21, 0x63, 0xa0, 0xd3, 0x69, 0x34,
}; };
// clang-format on // clang-format on