diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-22 18:04:16 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-22 18:29:40 +0100 |
commit | 1235ea7c205c313e8dbb5c46917b8739abbfb152 (patch) | |
tree | 8aa37585f2a80740e1c5d9bb47f012f74699b5c1 /include | |
parent | 00f6944f16bfb05011058730a432130527485f54 (diff) | |
download | upstream-1235ea7c205c313e8dbb5c46917b8739abbfb152.tar.gz upstream-1235ea7c205c313e8dbb5c46917b8739abbfb152.tar.bz2 upstream-1235ea7c205c313e8dbb5c46917b8739abbfb152.zip |
image: add ModelNameLimit16
This script returns the model name limited to 16 characters.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/image-commands.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk index c3f8b4b95a..51e745958e 100644 --- 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 |