projects
/
openwrt
/
staging
/
ynezz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00f6944
)
image: add ModelNameLimit16
author
Álvaro Fernández Rojas
<noltari@gmail.com>
Mon, 22 Feb 2021 17:04:16 +0000
(18:04 +0100)
committer
Álvaro Fernández Rojas
<noltari@gmail.com>
Mon, 22 Feb 2021 17:29:40 +0000
(18:29 +0100)
This script returns the model name limited to 16 characters.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
include/image-commands.mk
patch
|
blob
|
history
diff --git
a/include/image-commands.mk
b/include/image-commands.mk
index c3f8b4b95a30eeecc4ff90892506f85100933ab9..51e745958e627a739fdb809ffbdee9216157527f 100644
(file)
--- a/
include/image-commands.mk
+++ b/
include/image-commands.mk
@@
-3,6
+3,10
@@
IMAGE_KERNEL = $(word 1,$^)
IMAGE_ROOTFS = $(word 2,$^)
+define ModelNameLimit16
+$(shell expr substr "$(word 2, $(subst _, ,$(1)))" 1 16)
+endef
+
define rootfs_align
$(patsubst %-256k,0x40000,$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs%,0x4,$(patsubst root.%,%,$(1))))))
endef