projects
/
openwrt
/
staging
/
yousong.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5369a03
)
image: add support for k unit suffix to pad-offset
author
Mathias Kresin
<
[email protected]
>
Sat, 3 Sep 2016 05:36:12 +0000
(07:36 +0200)
committer
Mathias Kresin
<
[email protected]
>
Sat, 3 Sep 2016 05:36:12 +0000
(07:36 +0200)
Allows to specificy the padding and offset in kilobytes to be
consistent with pad-to.
Signed-off-by: Mathias Kresin <
[email protected]
>
include/image-commands.mk
patch
|
blob
|
history
diff --git
a/include/image-commands.mk
b/include/image-commands.mk
index 40a9619c31c4d3015d9d001b140081d27f5aea24..3b9ea3ccba887fe7cc32ed657ec2543c25feec7f 100644
(file)
--- a/
include/image-commands.mk
+++ b/
include/image-commands.mk
@@
-137,8
+137,8
@@
endef
define Build/pad-offset
let \
size="$$(stat -c%s $@)" \
- pad="$(
word 1, $(1
))" \
- offset="$(
word 2, $(1
))" \
+ pad="$(
subst k,* 1024,$(word 1, $(1)
))" \
+ offset="$(
subst k,* 1024,$(word 2, $(1)
))" \
pad="(pad - ((size + offset) % pad)) % pad" \
newsize='size + pad'; \
dd if=$@
[email protected]
bs=$$newsize count=1 conv=sync