diff options
| author | INAGAKI Hiroshi | 2024-04-08 06:25:15 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2025-06-22 20:17:20 +0000 |
| commit | 4392d1a92b747d3c39701eb6eac5e457f7fa0848 (patch) | |
| tree | 32515730731e20cb546a1dfc449e85793d6f5bff | |
| parent | f9743c5190cea4589a117b2fbccd67a761069ec4 (diff) | |
| download | openwrt-4392d1a92b747d3c39701eb6eac5e457f7fa0848.tar.gz | |
build: add dtb support for sysupgrade-tar
Add dtb support for Build/sysupgrade-tar definition and
sysupgrade-tar.sh script.
This changes are required for updating dtb separately.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | include/image-commands.mk | 2 | ||||
| -rwxr-xr-x | scripts/sysupgrade-tar.sh | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk index ac3f305362..ea21ca2bf0 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -679,10 +679,12 @@ define Build/senao-header endef define Build/sysupgrade-tar + $(eval dtb=$(call param_get,dtb,$(1))) sh $(TOPDIR)/scripts/sysupgrade-tar.sh \ --board $(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)) \ --kernel $(call param_get_default,kernel,$(1),$(IMAGE_KERNEL)) \ --rootfs $(call param_get_default,rootfs,$(1),$(IMAGE_ROOTFS)) \ + $(if $(dtb),--dtb $(dtb)) \ $@ endef diff --git a/scripts/sysupgrade-tar.sh b/scripts/sysupgrade-tar.sh index b93b2584bb..c101dbf00b 100755 --- a/scripts/sysupgrade-tar.sh +++ b/scripts/sysupgrade-tar.sh @@ -5,6 +5,7 @@ board="" kernel="" rootfs="" +dtb="" outfile="" err="" @@ -28,6 +29,12 @@ while [ "$1" ]; do shift continue ;; + "--dtb") + dtb="$2" + shift + shift + continue + ;; *) if [ ! "$outfile" ]; then outfile=$1 @@ -38,8 +45,8 @@ while [ "$1" ]; do esac done -if [ ! -n "$board" -o ! -r "$kernel" -a ! -r "$rootfs" -o ! "$outfile" ]; then - echo "syntax: $0 [--board boardname] [--kernel kernelimage] [--rootfs rootfs] out" +if [ ! -n "$board" -o ! -r "$kernel" -a ! -r "$rootfs" -o ! "$outfile" -o -n "$dtb" -a ! -r "$dtb" ]; then + echo "syntax: $0 [--board boardname] [--kernel kernelimage] [--rootfs rootfs] [--dtb dtb] out" exit 1 fi @@ -66,6 +73,7 @@ if [ -n "${rootfs}" ]; then esac fi [ -z "${kernel}" ] || cp "${kernel}" "${tmpdir}/sysupgrade-${board}/kernel" +[ -z "${dtb}" ] || cp "${dtb}" "${tmpdir}/sysupgrade-${board}/dtb" mtime="" if [ -n "$SOURCE_DATE_EPOCH" ]; then |