build: Allow specifying uImage time
authorDavid Yang <mmyangfl@gmail.com>
Wed, 8 Feb 2023 01:59:27 +0000 (09:59 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Sat, 20 May 2023 19:29:25 +0000 (21:29 +0200)
Some U-Boot checks for a specified uImage time and refuses to boot if
mismatched. This patch fixes it by recognizing UIMAGE_TIME parameter.

Signed-off-by: David Yang <mmyangfl@gmail.com>
include/image-commands.mk
include/image.mk

index 6c385b85e8cdc9f3215ec6742309f3686798dec6..ea602662a5b3c2e7627612089500c1fe28ee2201 100644 (file)
@@ -581,6 +581,7 @@ define Build/tplink-v2-image
 endef
 
 define Build/uImage
+       $(if $(UIMAGE_TIME),SOURCE_DATE_EPOCH="$(UIMAGE_TIME)") \
        mkimage \
                -A $(LINUX_KARCH) \
                -O linux \
index b801ef993c310c1acafb4b635211e585dddeb588..0eae216ded20f3e8fcd876819a4c96751ac4c292 100644 (file)
@@ -405,6 +405,7 @@ define Device/Init
   BOARD_NAME :=
   UIMAGE_MAGIC :=
   UIMAGE_NAME :=
+  UIMAGE_TIME :=
   DEVICE_COMPAT_VERSION := 1.0
   DEVICE_COMPAT_MESSAGE :=
   SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
@@ -425,7 +426,7 @@ DEFAULT_DEVICE_VARS := \
   DEVICE_DTS_CONFIG DEVICE_DTS_DELIMITER DEVICE_DTS_DIR DEVICE_DTS_OVERLAY \
   DEVICE_DTS_LOADADDR \
   DEVICE_FDT_NUM DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
-  SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
+  UIMAGE_TIME SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
   UBOOT_PATH IMAGE_SIZE \
   FACTORY_IMG_NAME FACTORY_SIZE \
   DEVICE_PACKAGES DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \