Projecte

General

Perfil

« Anterior | Següent » 

Revisió 9204ae8b

Afegit per Pau Escrich fa més de 12 anys

Changed output image name to <model>-<Community>_<git_branch>-<type>-<timestamp>.bin

Visualitza les diferències:

Makefile
IMAGES = images
SHELL = bash
QMP_FEED = package/feeds/qmp_packages
COMMUNITY ?= qMp
J ?= 1
V ?= 0
T =
......
$(eval $(if $(DEV),QMP_GIT=$(QMP_GIT_RW),QMP_GIT=$(QMP_GIT_RO)))
$(eval $(if $(TARGET),,TARGET=$(T)))
#Getting output image names
IMAGE_PATH = $(shell echo $(IMAGE) | cut -d' ' -f1 )
SIMAGE_PATH = $(shell echo $(SYSUPGRADE) | cut -d' ' -f1 )
IM_NAME = $(shell echo $(IMAGE) | grep ' ' | cut -d' ' -f2 | sed s/TIMESTAMP/$(TIMESTAMP)/g )
$(eval $(if $(IM_NAME),,IM_NAME=$(NAME)-factory-$(TIMESTAMP).bin))
SIM_NAME = $(shell echo $(SYSUPGRADE) | grep ' ' | cut -d' ' -f2 | sed s/TIMESTAMP/$(TIMESTAMP)/g )
$(eval $(if $(SIM_NAME),,SIM_NAME=$(NAME)-sysupgrade-$(TIMESTAMP).bin))
#Getting output image paths
IMAGE_PATH = $(IMAGE)
SIMAGE_PATH = $(SYSUPGRADE)
CONFIG = $(BUILD_DIR)/$(TARGET)/.config
KCONFIG = $(BUILD_DIR)/$(TARGET)/target/linux/$(ARCH)/config-*
......
endef
define post_build
$(eval BRANCH_GIT=$(shell git --git-dir=$(BUILD_DIR)/qmp/.git branch|grep ^*|cut -d " " -f 2))
$(eval IM_NAME=$(NAME)-$(COMMUNITY)_$(BRANCH_GIT)-factory-$(TIMESTAMP).bin)
$(eval SIM_NAME=$(NAME)-$(COMMUNITY)_$(BRANCH_GIT)-sysupgrade-$(TIMESTAMP).bin)
$(eval COMP=$(shell ls $(BUILD_DIR)/$(TARGET)/$(IMAGE_PATH) 2>/dev/null | grep -c \\.gz))
mkdir -p $(IMAGES)
@[ $(COMP) -eq 1 ] && gunzip $(BUILD_DIR)/$(TARGET)/$(IMAGE_PATH) -c > $(IMAGES)/$(IM_NAME) || true
......
$(call post_build)
all: build
default: build
world: build

També disponible a: Unified diff