create images directory for SDK
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
866ee950c0
commit
428b3198dc
6
Makefile
6
Makefile
|
@ -61,16 +61,14 @@ sdk: buildroot SDK/output/.config
|
|||
@$(call MESSAGE,"Making FunKey SDK")
|
||||
@$(BRMAKE) BR2_EXTERNAL=../SDK O=../SDK/output prepare-sdk
|
||||
@$(call MESSAGE,"Generating SDK tarball")
|
||||
@cd SDK/output/host; \
|
||||
PWD=$(shell pwd); \
|
||||
export LC_ALL=C; \
|
||||
SDK=FunKey-sdk-$(shell cat FunKey/board/funkey/rootfs-overlay/etc/sw-versions | cut -f 2); \
|
||||
grep -lr "$(shell pwd)/SDK/output/host" . | while read -r FILE ; do \
|
||||
grep -lr "$(shell pwd)/SDK/output/host" SDK/output/host | while read -r FILE ; do \
|
||||
if file -b --mime-type "$${FILE}" | grep -q '^text/'; then \
|
||||
sed -i "s|$(shell pwd)/SDK/output/host|/opt/$${SDK}|g" "$${FILE}"; \
|
||||
fi; \
|
||||
done; \
|
||||
cd $(shell pwd); \
|
||||
mkdir -p images; \
|
||||
tar czf "images/$${SDK}.tar.gz" \
|
||||
--owner=0 --group=0 --numeric-owner \
|
||||
--transform="s#^$(patsubst /%,%,$(shell pwd))/SDK/output/host#$${SDK}#" \
|
||||
|
|
Loading…
Reference in New Issue