aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Marinho <jose.marinho@arm.com>2021-08-09 16:57:30 +0100
committerJose Marinho <jose.marinho@arm.com>2021-08-09 16:57:30 +0100
commit68864dce1d8c87c0ad8062441b76bb3536c67a13 (patch)
treeaa211c33de3173662f61bbf6810b38296de46861
parent72cd65b488022cc7ecc8776e4a4fc33a03f4a81b (diff)
Add an image version field to the FIP
-rw-r--r--Readme.rst12
-rw-r--r--top.mk4
2 files changed, 13 insertions, 3 deletions
diff --git a/Readme.rst b/Readme.rst
index e917f32..a024cf4 100644
--- a/Readme.rst
+++ b/Readme.rst
@@ -36,7 +36,12 @@ Build
make make imx8mm_evk_defconfig
make addcapsuleconfig
- make -j8
+ make -j8 FIP_VERSION=<arbitrary FIP image verion>
+
+
+.. note::
+
+ The <arbitrary FIP image version> must be a value representable in 32bits and greater than 0.
Executing the Prototype
~~~~~~~~~~~~~~~~~~~~~~~
@@ -51,7 +56,8 @@ The rescue mode is selected by the following make invocation:
::
- make RESCUE=1
+ make RESCUE=1 FIP_VERSION=<arbitrary FIP image verion>
+
The build procedure outputs the image imx8mm_sd.img.
The imx8mm_sd.img contains the U-boot-spl, FIT, FIP at offsets 33K 384K and 1.5M respectively.
@@ -125,7 +131,7 @@ Build
make qemu_arm64_defconfig
make addcapsuleconfig
- make -j8
+ make -j8 FIP_VERSION=<arbitrary FIP image verion>
Execute the simulation
~~~~~~~~~~~~~~~~~~~~~~
diff --git a/top.mk b/top.mk
index 892eff8..7a92f24 100644
--- a/top.mk
+++ b/top.mk
@@ -20,6 +20,8 @@ OPTEE_PATH := $(CURDIR)/optee_os
TFA_PATH := $(CURDIR)/trusted-firmware-a
UBOOT_PATH := $(CURDIR)/u-boot
+FIP_VERSION ?= 1
+
# Give the option of building in a separate directory
ifneq ($(BUILD_OUTPUT),)
__BUILD := $(realpath $(BUILD_OUTPUT))
@@ -269,6 +271,8 @@ TFA_EXTRA += NEED_BL2=yes bl2 fip
#TFA_EXTRA += DEBUG=1
+TFA_EXTRA += FIP_VERSION=${FIP_VERSION}
+
FLASH_IMAGE ?= $(TFA_OUTPUT)/$(TFA_PLAT)/release/flash-image.bin
SD_IMAGE := $(subst ",,$(CONFIG_SYS_CONFIG_NAME))-sdcard.img
ESP_SIZE ?= $$((64*1024*1024))