diff --git a/Makefile b/Makefile index 82921120..61eb7193 100755 --- a/Makefile +++ b/Makefile @@ -1117,9 +1117,12 @@ u-boot-$(CONFIG_SYS_CONFIG_NAME).bin: u-boot.bin ifeq ($(TARGET_BUILD_VARIANT),tina) @cp -v $@ $(objtree)/../../../$(TARGET_BIN_DIR)/$(TARGET_BIN_NAME) else -#LICHEE_BUSSINESS could be empty and result in "//", bui it will be treated as "/", it's fine - @-cp -v $@ $(LICHEE_CHIP_CONFIG_DIR)/$(LICHEE_BUSSINESS)/bin/$(TARGET_BIN_NAME) - @-cp -v $@ $(LICHEE_PLAT_OUT)/$(TARGET_BIN_NAME) + @if [ -n "$(LICHEE_CHIP_CONFIG_DIR)" ] && [ -d "$(LICHEE_CHIP_CONFIG_DIR)/$(LICHEE_BUSSINESS)/bin" ]; then \ + cp -v $@ $(LICHEE_CHIP_CONFIG_DIR)/$(LICHEE_BUSSINESS)/bin/$(TARGET_BIN_NAME); \ + fi + @if [ -n "$(LICHEE_PLAT_OUT)" ] && [ -d "$(LICHEE_PLAT_OUT)" ]; then \ + cp -v $@ $(LICHEE_PLAT_OUT)/$(TARGET_BIN_NAME); \ + fi endif %.imx: %.bin @@ -1629,7 +1632,7 @@ define filechk_version.h echo \#define LD_VERSION_STRING \"$$(LC_ALL=C $(LD) --version | head -n 1)\"; ) endef -DIRTY:=$(shell echo `git describe --dirty|grep -o dirty$$`) +DIRTY:=$(shell echo `git describe --dirty --always 2>/dev/null|grep -o dirty$$`) DEF_DOT_CONFIG_HASH=$(shell echo `cat .tmp_config_from_defconfig.o.md5sum`) CUR_DOT_CONFIG_HASH=$(shell echo `md5sum .config| awk '{printf $$1}'`) CONFIG_DIRTY:=$(shell if [ $(DEF_DOT_CONFIG_HASH) = $(CUR_DOT_CONFIG_HASH) ]; \