aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-06-26 17:19:28 +0200
committerPetr Štetiar <ynezz@true.cz>2019-06-27 17:15:37 +0200
commitef5b7aa6c3a58d272c8b4ecdb8b1d970d5436e05 (patch)
tree1a7a65acb0357cced907ee836514da2edce79736 /include
parent683341d98f0ab6e0a0e7e4de19d41ea9e069c59c (diff)
downloadupstream-ef5b7aa6c3a58d272c8b4ecdb8b1d970d5436e05.tar.gz
upstream-ef5b7aa6c3a58d272c8b4ecdb8b1d970d5436e05.tar.bz2
upstream-ef5b7aa6c3a58d272c8b4ecdb8b1d970d5436e05.zip
build: image: make image padding OS agnostic
Image padding with dd needs to be done in an OS independent way as not all dd understand capital letter unit specifiers, and not all understand lowercase either. Fixes: 97833a57eff1 ("build: image: add pad-to and pad-rootfs-squashfs helpers") Reported-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'include')
-rw-r--r--include/image.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/image.mk b/include/image.mk
index 3702469823..855e391b46 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -185,8 +185,10 @@ define Image/pad-to
mv $(1).new $(1)
endef
+ROOTFS_PARTSIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024)))
+
define Image/pad-root-squashfs
- $(call Image/pad-to,$(KDIR)/root.squashfs,$(if $(1),$(1),$(CONFIG_TARGET_ROOTFS_PARTSIZE)M))
+ $(call Image/pad-to,$(KDIR)/root.squashfs,$(if $(1),$(1),$(ROOTFS_PARTSIZE)))
endef
# $(1) source dts file
@@ -284,11 +286,9 @@ define Image/mkfs/ubifs
-o $@ -d $(call mkfs_target_dir,$(1))
endef
-E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024)))
-
define Image/mkfs/ext4
$(STAGING_DIR_HOST)/bin/make_ext4fs \
- -l $(E2SIZE) -b $(CONFIG_TARGET_EXT4_BLOCKSIZE) \
+ -l $(ROOTFS_PARTSIZE) -b $(CONFIG_TARGET_EXT4_BLOCKSIZE) \
$(if $(CONFIG_TARGET_EXT4_RESERVED_PCT),-m $(CONFIG_TARGET_EXT4_RESERVED_PCT)) \
$(if $(CONFIG_TARGET_EXT4_JOURNAL),,-J) \
$(if $(SOURCE_DATE_EPOCH),-T $(SOURCE_DATE_EPOCH)) \