Browse Source

- add imagedescription to .version file

master
vanhofen 5 years ago
parent
commit
3b86ad1c4d
  1. 11
      make/environment-image.mk
  2. 11
      make/images.mk
  3. 1
      make/target-rootfs.mk

11
make/environment-image.mk

@ -21,12 +21,12 @@ IMAGE_DATE = $(shell date +%Y%m%d%H%M)
IMAGE_PREFIX = ni$(IMAGE_VER)-$(IMAGE_DATE)
IMAGE_SUFFIX = $(BOXTYPE_SC)-$(BOXMODEL)
# Image-Type
IMAGE_NAME = $(IMAGE_PREFIX)-$(IMAGE_SUFFIX)
IMAGE_TYPE ?= 9
# Release = 0
# Beta = 1
# Nightly = 2
# Selfmade = 9
IMAGE_TYPE ?= 9
# JFFS2-Summary
IMAGE_SUMMARIZE = yes
@ -54,7 +54,14 @@ else
IMAGE_TYPE_STRING = selfmade
endif
ifeq ($(BOXTYPE), $(filter $(BOXTYPE), coolstream))
IMAGE_DESC ="$(BOXNAME) [$(IMAGE_SUFFIX)][$(BOXSERIES)] $(shell echo $(IMAGE_TYPE_STRING) | sed 's/.*/\u&/')"
else
IMAGE_DESC ="$(BOXNAME) [$(IMAGE_SUFFIX)] $(shell echo $(IMAGE_TYPE_STRING) | sed 's/.*/\u&/')"
endif
IMAGE_URL = $(NI-SERVER)/$(NI-SUBDIR)
IMAGE_MD5FILE = $(IMAGE_TYPE_STRING)-$(IMAGE_SUFFIX).txt
IMAGE_BUILD_TMP = $(BUILD_TMP)/image-build

11
make/images.mk

@ -71,9 +71,6 @@ endif
# -----------------------------------------------------------------------------
flash-image-coolstream: IMAGE_NAME=$(IMAGE_PREFIX)-$(IMAGE_SUFFIX)
flash-image-coolstream: IMAGE_DESC="$(BOXNAME) [$(IMAGE_SUFFIX)][$(BOXSERIES)] $(shell echo $(IMAGE_TYPE_STRING) | sed 's/.*/\u&/')"
flash-image-coolstream: IMAGE_MD5FILE=$(IMAGE_TYPE_STRING)-$(IMAGE_SUFFIX).txt
flash-image-coolstream: IMAGE_DATE=$(shell cat $(ROOTFS)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-)
flash-image-coolstream: | $(IMAGE_DIR)
make devtable
@ -112,9 +109,6 @@ endif
# -----------------------------------------------------------------------------
flash-image-hd51: IMAGE_NAME=$(IMAGE_PREFIX)-$(IMAGE_SUFFIX)
flash-image-hd51: IMAGE_DESC="$(BOXNAME) [$(IMAGE_SUFFIX)] $(shell echo $(IMAGE_TYPE_STRING) | sed 's/.*/\u&/')"
flash-image-hd51: IMAGE_MD5FILE=$(IMAGE_TYPE_STRING)-$(IMAGE_SUFFIX).txt
flash-image-hd51: IMAGE_DATE=$(shell cat $(ROOTFS)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-)
flash-image-hd51: | $(IMAGE_DIR)
rm -rf $(IMAGE_BUILD_TMP)
@ -167,7 +161,6 @@ LINUX_SWAP_PARTITION_SIZE = 204800
STORAGE_PARTITION_OFFSET = "$(shell expr $(LINUX_SWAP_PARTITION_OFFSET) \+ $(LINUX_SWAP_PARTITION_SIZE))"
#STORAGE_PARTITION_SIZE = 204800 # remaining flash memory
flash-image-hd51-multi: IMAGE_NAME=$(IMAGE_PREFIX)-$(IMAGE_SUFFIX)
flash-image-hd51-multi: | $(IMAGE_DIR)
rm -rf $(IMAGE_BUILD_TMP)
mkdir -p $(IMAGE_BUILD_TMP)
@ -220,9 +213,6 @@ flash-image-hd51-multi: | $(IMAGE_DIR)
# -----------------------------------------------------------------------------
# armbox vu+
flash-image-vuplus: IMAGE_NAME=$(IMAGE_PREFIX)-$(IMAGE_SUFFIX)
flash-image-vuplus: IMAGE_DESC="$(BOXNAME) [$(IMAGE_SUFFIX)] $(shell echo $(IMAGE_TYPE_STRING) | sed 's/.*/\u&/')"
flash-image-vuplus: IMAGE_MD5FILE=$(IMAGE_TYPE_STRING)-$(IMAGE_SUFFIX).txt
flash-image-vuplus: IMAGE_DATE=$(shell cat $(ROOTFS)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-)
flash-image-vuplus: | $(IMAGE_DIR)
rm -rf $(IMAGE_BUILD_TMP)
@ -237,7 +227,6 @@ flash-image-vuplus: | $(IMAGE_DIR)
echo $(IMAGE_URL)/$(IMAGE_NAME).tgz $(IMAGE_TYPE)$(IMAGE_VER)$(IMAGE_DATE) `md5sum $(IMAGE_DIR)/$(IMAGE_NAME).tgz | cut -c1-32` $(IMAGE_DESC) $(IMAGE_VERSION) >> $(IMAGE_DIR)/$(IMAGE_MD5FILE)
rm -rf $(IMAGE_BUILD_TMP)
flash-image-vuplus-multi: IMAGE_NAME=$(IMAGE_PREFIX)-$(IMAGE_SUFFIX)
flash-image-vuplus-multi: vmlinuz-initrd
flash-image-vuplus-multi: | $(IMAGE_DIR)
rm -rf $(IMAGE_BUILD_TMP)

1
make/target-rootfs.mk

@ -15,6 +15,7 @@ endif
$(TARGET_DIR)/.version: | $(TARGET_DIR)
echo "distro=NI" > $(@)
echo "imagename=NI \o/ Neutrino-Image" >> $(@)
echo "imagedescription=$(IMAGE_DESC)" >> $(@)
echo "imageversion=$(IMAGE_VERSION)" >> $(@)
echo "version=$(IMAGE_TYPE)$(IMAGE_VER)$(IMAGE_DATE)" >> $(@)
echo "describe=$$(git describe --always --long --tags | sed 's/-/./2')" >> $(@)

Loading…
Cancel
Save