From f16c0b19ea38b619b1bc74004356326adabfc406 Mon Sep 17 00:00:00 2001 From: Dan Green Date: Wed, 19 Jun 2024 15:33:28 -0700 Subject: [PATCH] Target for making mp2 fsbl header --- Makefile | 4 ++++ fsbl_header.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 26e56ad..4da4ba6 100644 --- a/Makefile +++ b/Makefile @@ -138,6 +138,10 @@ image: $(BIN) python3 fsbl_header.py $(BUILDDIR)/$(BINARYNAME).bin $(BUILDDIR)/$(BINARYNAME).stm32 @ls -l $(BUILDDIR)/$(BINARYNAME).stm32 +image-mp2: $(BIN) + python3 fsbl_header.py --format=mp2 $(BUILDDIR)/$(BINARYNAME).bin $(BUILDDIR)/$(BINARYNAME).stm32 + @ls -l $(BUILDDIR)/$(BINARYNAME).stm32 + load: image @read -p "What is the disk device (Enter for $(SD_DISK_DEV)): " DISK && \ DISK=$${DISK:-$(SD_DISK_DEV)} && \ diff --git a/fsbl_header.py b/fsbl_header.py index 57439aa..1658270 100755 --- a/fsbl_header.py +++ b/fsbl_header.py @@ -11,14 +11,14 @@ def add_mp2_fsbl_header(binary_file): payload = bytearray(binary_file[0x100:]) - header = struct.pack("