[openwrt/openwrt] build: Allow specifying uImage time
LEDE Commits
lede-commits at lists.infradead.org
Sat May 20 12:29:50 PDT 2023
ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/a8a2a95351d711133e220c5c618822d3b72358ac
commit a8a2a95351d711133e220c5c618822d3b72358ac
Author: David Yang <mmyangfl at gmail.com>
AuthorDate: Wed Feb 8 09:59:27 2023 +0800
build: Allow specifying uImage time
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 at gmail.com>
---
include/image-commands.mk | 1 +
include/image.mk | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 6c385b85e8..ea602662a5 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -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 \
diff --git a/include/image.mk b/include/image.mk
index b801ef993c..0eae216ded 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -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 \
More information about the lede-commits
mailing list