diff options
author | Petr Štetiar <ynezz@true.cz> | 2023-06-15 16:11:27 +0200 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-11-13 14:01:25 +0100 |
commit | 8fc496be860192f8bd1f16913657626014c8863f (patch) | |
tree | ceaec6fbb489b493a2548dea7d85a02faf49e62a /include | |
parent | b522da5b16c7e5952d364b933b921786198f9fe5 (diff) | |
download | openwrt-8fc496be860192f8bd1f16913657626014c8863f.tar.gz openwrt-8fc496be860192f8bd1f16913657626014c8863f.tar.bz2 openwrt-8fc496be860192f8bd1f16913657626014c8863f.zip |
treewide: fix shell errors during dump stage
Fixes following issues:
bash: -c: line 1: `echo 1686820180<LINUX_VERMAGIC> | /staging_dir/host/bin/mkhash md5 | cut -b1-8'
bash: -c: line 1: `echo 1686820180<LINUX_VERMAGIC> | /staging_dir/host/bin/mkhash md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/''
bash: -c: line 1: syntax error near unexpected token `|'
bash: line 1: *1024*1024: syntax error: operand expected (error token is "*1024*1024")
bash: line 1: (64 + ): syntax error: operand expected (error token is ")")
expr: syntax error: missing argument after '+'
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'include')
-rw-r--r-- | include/image.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/image.mk b/include/image.mk index 9736e4e164..4ebff2e9ae 100644 --- a/include/image.mk +++ b/include/image.mk @@ -40,8 +40,10 @@ IMG_PREFIX_VERCODE:=$(if $(CONFIG_VERSION_CODE_FILENAMES),$(call sanitize,$(VERS IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET)) IMG_ROOTFS:=$(IMG_PREFIX)-rootfs IMG_COMBINED:=$(IMG_PREFIX)-combined +ifeq ($(DUMP),) IMG_PART_SIGNATURE:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | $(MKHASH) md5 | cut -b1-8) IMG_PART_DISKGUID:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | $(MKHASH) md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/') +endif MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt @@ -167,7 +169,9 @@ define Image/pad-to mv $(1).new $(1) endef +ifeq ($(DUMP),) ROOTFS_PARTSIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024))) +endif define Image/pad-root-squashfs $(call Image/pad-to,$(KDIR)/root.squashfs,$(if $(1),$(1),$(ROOTFS_PARTSIZE))) |