diff --git a/Makefile b/Makefile index fc87394b..0afcf407 100755 --- a/Makefile +++ b/Makefile @@ -14,7 +14,10 @@ local-files: $(eval BOXMODEL = nevis) @mkdir -p local/{root,scripts} -include config.local -include make/environment.mk +include make/environment-build.mk +include make/environment-image.mk +include make/environment-target.mk +include make/environment-update.mk -include internal/internal.mk ############################################################################ diff --git a/make/archives.mk b/make/archives.mk index f291fbb8..27efa320 100644 --- a/make/archives.mk +++ b/make/archives.mk @@ -1,4 +1,7 @@ +# # makefile for tarball download +# +# ----------------------------------------------------------------------------- LIBGCRYPT_VER=1.8.3 $(ARCHIVE)/libgcrypt-$(LIBGCRYPT_VER).tar.gz: diff --git a/make/bootstrap.mk b/make/bootstrap.mk index c041ac81..12902a77 100644 --- a/make/bootstrap.mk +++ b/make/bootstrap.mk @@ -1,4 +1,7 @@ +# # makefile to setup and initialize the final buildsystem +# +# ----------------------------------------------------------------------------- BOOTSTRAP = targetprefix BOOTSTRAP += $(D) diff --git a/make/clean.mk b/make/clean.mk index f4b6c5b0..6dd199e0 100644 --- a/make/clean.mk +++ b/make/clean.mk @@ -1,4 +1,7 @@ -# clean all for rebuild (except the toolchain) +# +# makefile for clean targets +# +# ----------------------------------------------------------------------------- rebuild-clean: -rm -rf $(BUILD_TMP) diff --git a/make/crosstool.mk b/make/crosstool.mk index 852fb651..170ad47a 100644 --- a/make/crosstool.mk +++ b/make/crosstool.mk @@ -1,4 +1,7 @@ +# # makefile to build crosstools +# +# ----------------------------------------------------------------------------- crosstool: crosstool-$(BOXARCH)-$(BOXSERIES) diff --git a/make/development-tools.mk b/make/development-tools.mk index b7c9fb85..53c73599 100644 --- a/make/development-tools.mk +++ b/make/development-tools.mk @@ -1,5 +1,6 @@ -#Makefile to build development-tools - +# +# makefile to build development-tools +# # ----------------------------------------------------------------------------- valgrind: valgrind-$(BOXSERIES) diff --git a/make/environment.mk b/make/environment-build.mk similarity index 98% rename from make/environment.mk rename to make/environment-build.mk index 32f0b986..ea71e2e5 100644 --- a/make/environment.mk +++ b/make/environment-build.mk @@ -1,4 +1,7 @@ -# set up environment for other makefiles +# +# set up build environment for other makefiles +# +# ----------------------------------------------------------------------------- NUM_CPUS=$$(expr `grep -c ^processor /proc/cpuinfo`) @@ -133,6 +136,7 @@ MAINTAINER ?= NI-Team WHOAMI := $(shell id -un) ARCHIVE = $(BASE_DIR)/download BUILD_TMP = $(BASE_DIR)/build_tmp +ROOTFS = $(BUILD_TMP)/rootfs D = $(BASE_DIR)/deps DEPDIR = $(D) HOST_DIR = $(BASE_DIR)/host @@ -152,6 +156,7 @@ CONFIGS = $(BASE_DIR)/archive-configs PATCHES = $(BASE_DIR)/archive-patches IMAGEFILES = $(BASE_DIR)/archive-imagefiles SKEL_ROOT = $(BASE_DIR)/skel-root/$(BOXTYPE)/$(BOXSERIES) + BUILD ?= $(shell /usr/share/libtool/config.guess 2>/dev/null || /usr/share/libtool/config/config.guess 2>/dev/null || /usr/share/misc/config.guess) CCACHE = /usr/bin/ccache CCACHE_DIR = $(HOME)/.ccache-ni-buildsystem-$(BOXARCH)-$(BOXSERIES) @@ -161,10 +166,6 @@ STATIC_LIB_DIR = $(STATIC_DIR)/lib TARGET_LIB_DIR = $(TARGET_DIR)/lib TARGET_INCLUDE_DIR = $(TARGET_DIR)/include -# ca-certificates -CA-BUNDLE = ca-certificates.crt -CA-BUNDLE_DIR = /etc/ssl/certs - # create debug image DEBUG ?= no diff --git a/make/environment-image.mk b/make/environment-image.mk new file mode 100644 index 00000000..ff32db94 --- /dev/null +++ b/make/environment-image.mk @@ -0,0 +1,48 @@ +# +# set up image environment for other makefiles +# +# ----------------------------------------------------------------------------- + +# Release date +IMAGE_DATE = $(shell date +%Y%m%d%H%M) + +# Version Strings +IMAGE_VERSION = 350 +IMAGE_PREFIX = ni$(IMAGE_VERSION)-$(IMAGE_DATE) +IMAGE_SUFFIX = $(BOXTYPE_SC)-$(BOXMODEL) + +# Image-Type +# Release = 0 +# Beta = 1 +# Nightly = 2 +# Selfmade = 9 +IMAGE_TYPE ?= 9 + +# JFFS2-Summary +IMAGE_SUMMARIZE = yes + +# newimage-flag +IMAGE_NEW = no + +# Beta/Release Server +NI-SERVER = http://neutrino-images.de/neutrino-images +ifeq ($(IMAGE_TYPE), 0) + # Release + NI-SUBDIR = release + IMAGE_TYPE_STRING = release +else ifeq ($(IMAGE_TYPE), 1) + # Beta + NI-SUBDIR = beta + IMAGE_TYPE_STRING = beta +else ifeq ($(IMAGE_TYPE), 2) + # Nightly + NI-SUBDIR = nightly + IMAGE_TYPE_STRING = nightly +else + # Selfmade; just for compatibility; not needed for our builds + NI-SUBDIR = selfmade + IMAGE_TYPE_STRING = selfmade +endif + +IMAGE_URL = $(NI-SERVER)/$(NI-SUBDIR) +IMAGE_VERSION_STRING = $(shell echo $(IMAGE_VERSION) | sed -e :a -e 's/\(.*[0-9]\)\([0-9]\{2\}\)/\1.\2/;ta') diff --git a/make/environment-target.mk b/make/environment-target.mk new file mode 100644 index 00000000..2c7f2473 --- /dev/null +++ b/make/environment-target.mk @@ -0,0 +1,39 @@ +# +# set up target environment for other makefiles +# +# ----------------------------------------------------------------------------- + +BIN = $(TARGET_DIR)/bin +ETCINITD = $(TARGET_DIR)/etc/init.d +LIBPLUGINS = $(TARGET_DIR)/lib/tuxbox/plugins +SBIN = $(TARGET_DIR)/sbin +SHAREFLEX = $(TARGET_DIR)/share/tuxbox/neutrino/flex +SHAREICONS = $(TARGET_DIR)/share/tuxbox/neutrino/icons +SHAREPLUGINS = $(TARGET_DIR)/share/tuxbox/neutrino/plugins +SHARETHEMES = $(TARGET_DIR)/share/tuxbox/neutrino/themes +SHAREWEBRADIO = $(TARGET_DIR)/share/tuxbox/neutrino/webradio +SHAREWEBTV = $(TARGET_DIR)/share/tuxbox/neutrino/webtv +VARCONFIG = $(TARGET_DIR)/var/tuxbox/config +VARINITD = $(TARGET_DIR)/var/etc/init.d +VARPLUGINS = $(TARGET_DIR)/var/tuxbox/plugins + +$(BIN) \ +$(ETCINITD) \ +$(LIBPLUGINS) \ +$(SBIN) \ +$(SHAREFLEX) \ +$(SHAREICONS) \ +$(SHAREPLUGINS) \ +$(SHARETHEMES) \ +$(SHAREWEBRADIO) \ +$(SHAREWEBTV) \ +$(VARCONFIG) \ +$(VARINITD) \ +$(VARPLUGINS) : | $(TARGET_DIR) + mkdir -p $@ + +# ----------------------------------------------------------------------------- + +# ca-certificates +CA-BUNDLE = ca-certificates.crt +CA-BUNDLE_DIR = /etc/ssl/certs diff --git a/make/environment-update.mk b/make/environment-update.mk new file mode 100644 index 00000000..3934f9a7 --- /dev/null +++ b/make/environment-update.mk @@ -0,0 +1,38 @@ +# +# set up update environment for other makefiles +# +# ----------------------------------------------------------------------------- + +UPDATE_TEMP_DIR = $(BUILD_TMP)/temp_inst + +UPDATE_INST_DIR = $(UPDATE_TEMP_DIR)/inst +UPDATE_CTRL_DIR = $(UPDATE_TEMP_DIR)/ctrl + +POSTINSTALL_SH = $(UPDATE_CTRL_DIR)/postinstall.sh +PREINSTALL_SH = $(UPDATE_CTRL_DIR)/preinstall.sh + +# defaults for Neutrino-Update +UPDATE_DATE = $(shell date +%Y%m%d%H%M) +UPDATE_VERSION = $(IMAGE_VERSION) +UPDATE_VERSION_STRING = $(IMAGE_VERSION_STRING) + +UPDATE_PREFIX = $(IMAGE_PREFIX) +UPDATE_SUFFIX = $(BOXTYPE_SC)-$(BOXSERIES)-update + +UPDATE_NAME = $(UPDATE_PREFIX)-$(UPDATE_SUFFIX) +UPDATE_DESC = "Neutrino [$(BOXTYPE_SC)][$(BOXSERIES)] Update" +UPDATE_TYPE = U +# Release = 0 +# Beta = 1 +# Nightly = 2 +# Selfmade = 9 +# Locale = L +# Settings = S +# Update = U +# Addon = A +# Text = T + +UPDATE_URL = $(NI-SERVER)/$(NI-SUBDIR) +UPDATE_MD5FILE = update.txt +UPDATE_MD5FILE-BOXSERIES= update-$(BOXTYPE_SC)-$(BOXSERIES).txt +UPDATE_MD5FILE-BOXMODEL = update-$(BOXTYPE_SC)-$(BOXMODEL).txt diff --git a/make/ffmpeg-arm.mk b/make/ffmpeg-arm.mk index 8f1f26e6..2a798718 100644 --- a/make/ffmpeg-arm.mk +++ b/make/ffmpeg-arm.mk @@ -1,7 +1,6 @@ # # ffmpeg # - # ----------------------------------------------------------------------------- FFMPEG_VER = 4.0.2 diff --git a/make/ffmpeg-cst.mk b/make/ffmpeg-cst.mk index be3fb040..a8fe7367 100644 --- a/make/ffmpeg-cst.mk +++ b/make/ffmpeg-cst.mk @@ -1,7 +1,6 @@ # # ffmpeg # - # ----------------------------------------------------------------------------- FFMPEG_DEPS = $(D)/openssl $(D)/librtmp $(D)/libbluray $(D)/libass diff --git a/make/gstreamer.mk b/make/gstreamer.mk index fe3f9269..b041fc34 100644 --- a/make/gstreamer.mk +++ b/make/gstreamer.mk @@ -1,5 +1,6 @@ +# # makefile to build gstreamer and all it's dependencies - +# # ----------------------------------------------------------------------------- # change to activate debug diff --git a/make/host-tools.mk b/make/host-tools.mk index 5a667e6e..c2378fcb 100644 --- a/make/host-tools.mk +++ b/make/host-tools.mk @@ -1,4 +1,7 @@ +# # makefile to build all needed host-binaries +# +# ----------------------------------------------------------------------------- host-preqs: \ host_pkg-config \ diff --git a/make/image-update.mk b/make/image-update.mk index 8a9b196b..ea2a55ae 100644 --- a/make/image-update.mk +++ b/make/image-update.mk @@ -1,39 +1,6 @@ +# # makefile for image updates - -UPDATE_TEMP_DIR = $(BUILD_TMP)/temp_inst - -UPDATE_INST_DIR = $(UPDATE_TEMP_DIR)/inst -UPDATE_CTRL_DIR = $(UPDATE_TEMP_DIR)/ctrl - -POSTINSTALL_SH = $(UPDATE_CTRL_DIR)/postinstall.sh -PREINSTALL_SH = $(UPDATE_CTRL_DIR)/preinstall.sh - -# defaults for Neutrino-Update -UPDATE_DATE = $(shell date +%Y%m%d%H%M) -UPDATE_VERSION = $(IMAGE_VERSION) -UPDATE_VERSION_STRING = $(IMAGE_VERSION_STRING) - -UPDATE_PREFIX = $(IMAGE_PREFIX) -UPDATE_SUFFIX = $(BOXTYPE_SC)-$(BOXSERIES)-update - -UPDATE_NAME = $(UPDATE_PREFIX)-$(UPDATE_SUFFIX) -UPDATE_DESC = "Neutrino [$(BOXTYPE_SC)][$(BOXSERIES)] Update" -UPDATE_TYPE = U -# Release = 0 -# Beta = 1 -# Nightly = 2 -# Selfmade = 9 -# Locale = L -# Settings = S -# Update = U -# Addon = A -# Text = T - -UPDATE_URL = $(NI-SERVER)/$(NI-SUBDIR) -UPDATE_MD5FILE = update.txt -UPDATE_MD5FILE-BOXSERIES= update-$(BOXTYPE_SC)-$(BOXSERIES).txt -UPDATE_MD5FILE-BOXMODEL = update-$(BOXTYPE_SC)-$(BOXMODEL).txt - +# # ----------------------------------------------------------------------------- u-neutrino: neutrino-clean diff --git a/make/images.mk b/make/images.mk index 6cd55d7e..3cc52433 100644 --- a/make/images.mk +++ b/make/images.mk @@ -1,53 +1,9 @@ +# +# makefile to generate images +# +# ----------------------------------------------------------------------------- -# makefile to generate images; also holds useful variables. - -# Release date -IMAGE_DATE = $(shell date +%Y%m%d%H%M) - -# Version Strings -IMAGE_VERSION = 350 -IMAGE_PREFIX = ni$(IMAGE_VERSION)-$(IMAGE_DATE) -IMAGE_SUFFIX = $(BOXTYPE_SC)-$(BOXMODEL) - -# Image-Type -# Release = 0 -# Beta = 1 -# Nightly = 2 -# Selfmade = 9 -IMAGE_TYPE ?= 9 - -# JFFS2-Summary -SUMMARIZE = yes - -# newimage-flag -NEWIMAGE = no - -# Beta/Release Server -NI-SERVER = http://neutrino-images.de/neutrino-images -ifeq ($(IMAGE_TYPE), 0) - # Release - NI-SUBDIR = release - IMAGE_TYPE_STRING = release -else ifeq ($(IMAGE_TYPE), 1) - # Beta - NI-SUBDIR = beta - IMAGE_TYPE_STRING = beta -else ifeq ($(IMAGE_TYPE), 2) - # Nightly - NI-SUBDIR = nightly - IMAGE_TYPE_STRING = nightly -else - # Selfmade; just for compatibility; not needed for our builds - NI-SUBDIR = selfmade - IMAGE_TYPE_STRING = selfmade -endif - -IMAGE_URL = $(NI-SERVER)/$(NI-SUBDIR) -IMAGE_VERSION_STRING = $(shell echo $(IMAGE_VERSION) | sed -e :a -e 's/\(.*[0-9]\)\([0-9]\{2\}\)/\1.\2/;ta') - -BOX = $(BUILD_TMP)/rootfs - -MKFSFLAGS = -U -D $(BUILD_TMP)/devtable-$(BOXSERIES).txt -r $(BOX) +MKFSFLAGS = -U -D $(BUILD_TMP)/devtable-$(BOXSERIES).txt -r $(ROOTFS) ifeq ($(BOXSERIES), hd1) MKFSFLAGS += -p endif @@ -117,12 +73,12 @@ endif flash-image-cst: IMAGE_NAME=$(IMAGE_PREFIX)-$(IMAGE_SUFFIX) flash-image-cst: IMAGE_DESC="$(BOXNAME) [$(IMAGE_SUFFIX)][$(BOXSERIES)] $(shell echo $(IMAGE_TYPE_STRING) | sed 's/.*/\u&/')" flash-image-cst: IMAGE_MD5FILE=$(IMAGE_TYPE_STRING)-$(IMAGE_SUFFIX).txt -flash-image-cst: IMAGE_DATE=$(shell cat $(BOX)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) +flash-image-cst: IMAGE_DATE=$(shell cat $(ROOTFS)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) flash-image-cst: make devtable mkfs.jffs2 -e $(ERASE_SIZE) $(MKFSFLAGS) -o $(IMAGE_DIR)/$(IMAGE_NAME).img make devtable-remove -ifeq ($(SUMMARIZE), yes) +ifeq ($(IMAGE_SUMMARIZE), yes) sumtool -e $(ERASE_SIZE) $(SUMFLAGS) -i $(IMAGE_DIR)/$(IMAGE_NAME).img -o $(IMAGE_DIR)/$(IMAGE_NAME)-sum.img rm -f $(IMAGE_DIR)/$(IMAGE_NAME).img mv $(IMAGE_DIR)/$(IMAGE_NAME)-sum.img $(IMAGE_DIR)/$(IMAGE_NAME).img @@ -159,12 +115,12 @@ flash-image-arm: BOXNAME="AX/Mut@nt" flash-image-arm: IMAGE_NAME=$(IMAGE_PREFIX)-$(IMAGE_SUFFIX) flash-image-arm: IMAGE_DESC="$(BOXNAME) [$(IMAGE_SUFFIX)] $(shell echo $(IMAGE_TYPE_STRING) | sed 's/.*/\u&/')" flash-image-arm: IMAGE_MD5FILE=$(IMAGE_TYPE_STRING)-$(IMAGE_SUFFIX).txt -flash-image-arm: IMAGE_DATE=$(shell cat $(BOX)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) +flash-image-arm: IMAGE_DATE=$(shell cat $(ROOTFS)/.version | grep "^version=" | cut -d= -f2 | cut -c 5-) flash-image-arm: mkdir -p $(IMAGE_DIR)/$(BOXMODEL) cp $(ZIMAGE_DTB) $(IMAGE_DIR)/$(BOXMODEL)/kernel.bin - cd $(BOX); \ - tar -cvf $(IMAGE_DIR)/$(BOXMODEL)/rootfs.tar -C $(BOX) . > /dev/null 2>&1; \ + cd $(ROOTFS); \ + tar -cvf $(IMAGE_DIR)/$(BOXMODEL)/rootfs.tar -C $(ROOTFS) . > /dev/null 2>&1; \ bzip2 $(IMAGE_DIR)/$(BOXMODEL)/rootfs.tar # Create minimal image cd $(IMAGE_DIR)/$(BOXMODEL); \ @@ -207,7 +163,7 @@ flash-image-arm-multi: mkdir -p $(HD51_BUILD_TMP) # Create a sparse image block dd if=/dev/zero of=$(HD51_BUILD_TMP)/$(HD51_IMAGE_LINK) seek=$(shell expr $(HD51_IMAGE_ROOTFS_SIZE) \* $(BLOCK_SECTOR)) count=0 bs=$(BLOCK_SIZE) - mkfs.ext4 -F $(HD51_BUILD_TMP)/$(HD51_IMAGE_LINK) -d $(BOX) + mkfs.ext4 -F $(HD51_BUILD_TMP)/$(HD51_IMAGE_LINK) -d $(ROOTFS) # Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected) fsck.ext4 -pvfD $(HD51_BUILD_TMP)/$(HD51_IMAGE_LINK) || [ $? -le 3 ] dd if=/dev/zero of=$(EMMC_IMAGE) bs=$(BLOCK_SIZE) count=0 seek=$(shell expr $(EMMC_IMAGE_SIZE) \* $(BLOCK_SECTOR)) @@ -243,8 +199,8 @@ flash-image-arm-multi: mkdir -p $(IMAGE_DIR)/$(BOXMODEL) cp $(ZIMAGE_DTB) $(IMAGE_DIR)/$(BOXMODEL)/kernel.bin cp $(EMMC_IMAGE) $(IMAGE_DIR)/$(BOXMODEL) - cd $(BOX); \ - tar -cvf $(IMAGE_DIR)/$(BOXMODEL)/rootfs.tar -C $(BOX) . > /dev/null 2>&1; \ + cd $(ROOTFS); \ + tar -cvf $(IMAGE_DIR)/$(BOXMODEL)/rootfs.tar -C $(ROOTFS) . > /dev/null 2>&1; \ bzip2 $(IMAGE_DIR)/$(BOXMODEL)/rootfs.tar echo $(IMAGE_PREFIX) > $(IMAGE_DIR)/$(BOXMODEL)/imageversion cd $(IMAGE_DIR); \ diff --git a/make/kernel-arm.mk b/make/kernel-arm.mk index b30e7d57..1d9e584c 100644 --- a/make/kernel-arm.mk +++ b/make/kernel-arm.mk @@ -1,4 +1,7 @@ +# # makefile to build armbox kernel +# +# ----------------------------------------------------------------------------- DTB = $(BUILD_TMP)/linux-$(KERNEL_VERSION)/arch/arm/boot/dts/$(KERNEL_DTB).dtb ZIMAGE = $(BUILD_TMP)/linux-$(KERNEL_VERSION)/arch/arm/boot/zImage diff --git a/make/kernel-cst.mk b/make/kernel-cst.mk index 90aa139b..724a991d 100644 --- a/make/kernel-cst.mk +++ b/make/kernel-cst.mk @@ -1,4 +1,7 @@ +# # makefile to build coolstream kernel +# +# ----------------------------------------------------------------------------- DTB = $(SOURCE_DIR)/$(NI_DRIVERS-BIN)/$(DRIVERS_DIR)/device-tree-overlay/$(KERNEL_DTB).dtb IMAGE = $(BUILD_TMP)/linux-$(KERNEL_VERSION)/arch/arm/boot/Image diff --git a/make/neutrino.mk b/make/neutrino.mk index ee130a9d..42bc98d6 100644 --- a/make/neutrino.mk +++ b/make/neutrino.mk @@ -1,4 +1,7 @@ -# makefile to build NEUTRINO +# +# makefile to build Neutrino +# +# ----------------------------------------------------------------------------- YOUTUBE_DEV_KEY ?= AIzaSyBLdZe7M3rpNMZqSj-3IEvjbb2hATWJIdM OMDB_API_KEY ?= 20711f9e diff --git a/make/ni.mk b/make/ni.mk index cdb8596b..f9b8914f 100644 --- a/make/ni.mk +++ b/make/ni.mk @@ -1,4 +1,7 @@ +# # custom ni-makefile - just a collection of targets +# +# ----------------------------------------------------------------------------- init: preqs crosstools bootstrap diff --git a/make/plugins-extra.mk b/make/plugins-extra.mk index 00a59cdf..8f1f5ea2 100644 --- a/make/plugins-extra.mk +++ b/make/plugins-extra.mk @@ -1,4 +1,7 @@ -# makefile for plugins (currently unused in ni-image) +# +# makefile to build plugins (currently unused in ni-image) +# +# ----------------------------------------------------------------------------- #logoview logoview: $(SOURCE_DIR)/$(TUXBOX_PLUGINS) $(D)/neutrino $(BIN)/logoview diff --git a/make/plugins.mk b/make/plugins.mk index b8f94e5b..d9d59f8c 100644 --- a/make/plugins.mk +++ b/make/plugins.mk @@ -1,37 +1,10 @@ -# makefile for plugins +# +# makefile to build plugins +# +# ----------------------------------------------------------------------------- TARGET_DIR ?= $(DESTDIR) -# Some useful variables -BIN = $(TARGET_DIR)/bin -ETCINITD = $(TARGET_DIR)/etc/init.d -LIBPLUGINS = $(TARGET_DIR)/lib/tuxbox/plugins -SBIN = $(TARGET_DIR)/sbin -SHAREFLEX = $(TARGET_DIR)/share/tuxbox/neutrino/flex -SHAREICONS = $(TARGET_DIR)/share/tuxbox/neutrino/icons -SHAREPLUGINS = $(TARGET_DIR)/share/tuxbox/neutrino/plugins -SHARETHEMES = $(TARGET_DIR)/share/tuxbox/neutrino/themes -SHAREWEBRADIO = $(TARGET_DIR)/share/tuxbox/neutrino/webradio -SHAREWEBTV = $(TARGET_DIR)/share/tuxbox/neutrino/webtv -VARCONFIG = $(TARGET_DIR)/var/tuxbox/config -VARINITD = $(TARGET_DIR)/var/etc/init.d -VARPLUGINS = $(TARGET_DIR)/var/tuxbox/plugins - -$(BIN) \ -$(ETCINITD) \ -$(LIBPLUGINS) \ -$(SBIN) \ -$(SHAREFLEX) \ -$(SHAREICONS) \ -$(SHAREPLUGINS) \ -$(SHARETHEMES) \ -$(SHAREWEBRADIO) \ -$(SHAREWEBTV) \ -$(VARCONFIG) \ -$(VARINITD) \ -$(VARPLUGINS) : | $(TARGET_DIR) - mkdir -p $@ - init-scripts: \ init-camd diff --git a/make/prerequisites.mk b/make/prerequisites.mk index fba651aa..0541abf8 100644 --- a/make/prerequisites.mk +++ b/make/prerequisites.mk @@ -1,4 +1,7 @@ +# # makefile for basic prerequisites +# +# ----------------------------------------------------------------------------- TOOLCHECK = find-git find-svn find-gzip find-bzip2 find-patch find-gawk TOOLCHECK += find-makeinfo find-automake find-gcc find-libtool find-bison diff --git a/make/rootfs.mk b/make/rootfs.mk index 7a075cfc..3084d66d 100644 --- a/make/rootfs.mk +++ b/make/rootfs.mk @@ -1,7 +1,9 @@ +# # targets to create rootfs +# +# ----------------------------------------------------------------------------- -# rootfs targets -rootfs: .version update.urls $(BOX) cleanup strip softlinks +rootfs: .version update.urls $(ROOTFS) cleanup strip softlinks .version: $(TARGET_DIR)/.version $(TARGET_DIR)/.version: @@ -32,53 +34,53 @@ $(TARGET_DIR)/var/etc/update.urls: echo "$(CHANNELLISTS_URL)/$(CHANNELLISTS_MD5FILE)" >> $@ # create filesystem for our images -$(BOX): | $(TARGET_DIR) - rm -rf $(BOX) - cp -a $(TARGET_DIR) $(BOX) +$(ROOTFS): | $(TARGET_DIR) + rm -rf $(ROOTFS) + cp -a $(TARGET_DIR) $(ROOTFS) # cleanup filesystem from useless stuff -cleanup: $(BOX) - rm -rf $(BOX)/{include,mymodules} - rm -rf $(BOX)/share/{aclocal,gdb,locale,man,doc,info,common-lisp} - rm -rf $(BOX)/lib/pkgconfig - rm -f $(BOX)/lib/libvorbisenc* - rm -rf $(BOX)/lib/sigc++* - rm -rf $(BOX)/lib/glib-2.0 - find $(BOX) \( -name .gitignore -o -name .gitkeep \) -type f -print0 | xargs --no-run-if-empty -0 rm -f - find $(BOX)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs --no-run-if-empty -0 rm -f +cleanup: $(ROOTFS) + rm -rf $(ROOTFS)/{include,mymodules} + rm -rf $(ROOTFS)/share/{aclocal,gdb,locale,man,doc,info,common-lisp} + rm -rf $(ROOTFS)/lib/pkgconfig + rm -f $(ROOTFS)/lib/libvorbisenc* + rm -rf $(ROOTFS)/lib/sigc++* + rm -rf $(ROOTFS)/lib/glib-2.0 + find $(ROOTFS) \( -name .gitignore -o -name .gitkeep \) -type f -print0 | xargs --no-run-if-empty -0 rm -f + find $(ROOTFS)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs --no-run-if-empty -0 rm -f @echo -e "$(TERM_YELLOW)" - @du -sh $(BOX) + @du -sh $(ROOTFS) @echo -e "$(TERM_NORMAL)" # strip bins and libs in filesystem -strip: $(BOX) +strip: $(ROOTFS) ifneq ($(DEBUG), yes) @echo "*******************************************************" @echo "*** The following warnings from strip are harmless! ***" @echo "*******************************************************" - find $(BOX)/bin -type f -print0 | xargs -0 $(TARGET)-strip || true - find $(BOX)/sbin -type f -print0 | xargs -0 $(TARGET)-strip || true - find $(BOX)/lib \( \ - -path $(BOX)/lib/libnexus.so -o \ - -path $(BOX)/lib/libnxpl.so -o \ - -path $(BOX)/lib/libv3ddriver.so -o \ + find $(ROOTFS)/bin -type f -print0 | xargs -0 $(TARGET)-strip || true + find $(ROOTFS)/sbin -type f -print0 | xargs -0 $(TARGET)-strip || true + find $(ROOTFS)/lib \( \ + -path $(ROOTFS)/lib/libnexus.so -o \ + -path $(ROOTFS)/lib/libnxpl.so -o \ + -path $(ROOTFS)/lib/libv3ddriver.so -o \ \ - -path $(BOX)/lib/modules \) -prune -o \ + -path $(ROOTFS)/lib/modules \) -prune -o \ -type f -print0 | xargs -0 $(TARGET)-strip || true ifeq ($(BOXSERIES), hd2) - find $(BOX)/lib/modules/$(KERNEL_VERSION_FULL)/kernel -type f -name '*.ko' | xargs -n 1 $(TARGET)-objcopy --strip-unneeded + find $(ROOTFS)/lib/modules/$(KERNEL_VERSION_FULL)/kernel -type f -name '*.ko' | xargs -n 1 $(TARGET)-objcopy --strip-unneeded endif @echo -e "$(TERM_YELLOW)" - @du -sh $(BOX) + @du -sh $(ROOTFS) @echo -e "$(TERM_NORMAL)" endif ifeq ($(DEBUG), yes) @echo "*******************************************************" @echo "*** The following warnings from strip are harmless! ***" @echo "*******************************************************" - find $(BOX)/bin -path $(BOX)/bin/neutrino -prune -o -type f -print0 | xargs -0 $(TARGET)-strip || true - find $(BOX)/sbin -type f -print0 | xargs -0 $(TARGET)-strip || true - find $(BOX)/lib/valgrind -type f -print0 | xargs -0 $(TARGET)-strip || true + find $(ROOTFS)/bin -path $(ROOTFS)/bin/neutrino -prune -o -type f -print0 | xargs -0 $(TARGET)-strip || true + find $(ROOTFS)/sbin -type f -print0 | xargs -0 $(TARGET)-strip || true + find $(ROOTFS)/lib/valgrind -type f -print0 | xargs -0 $(TARGET)-strip || true @echo "*******************************************************" @echo "*** Strip samba for debug image ***" @echo "*******************************************************" @@ -90,28 +92,28 @@ ifeq ($(DEBUG), yes) $(TARGET)-strip $(TARGET_DIR)/lib/libtdb.so.1 $(TARGET)-strip $(TARGET_DIR)/lib/libtalloc.so.1 $(TARGET)-strip $(TARGET_DIR)/lib/libwbclient.so.0 - find $(BOX)/lib/samba -type f -print0 | xargs -0 $(TARGET)-strip || true + find $(ROOTFS)/lib/samba -type f -print0 | xargs -0 $(TARGET)-strip || true @echo -e "$(TERM_YELLOW)" - @du -sh $(BOX) + @du -sh $(ROOTFS) @echo -e "$(TERM_NORMAL)" endif # create softlinks in filesystem -softlinks: $(BOX) - pushd $(BOX) && \ +softlinks: $(ROOTFS) + pushd $(ROOTFS) && \ ln -sf /var/root root ifeq ($(BOXSERIES), hd51) - pushd $(BOX) && \ + pushd $(ROOTFS) && \ ln -sf /var/root home endif - pushd $(BOX)/usr && \ + pushd $(ROOTFS)/usr && \ ln -sf /share share - pushd $(BOX)/var && \ + pushd $(ROOTFS)/var && \ ln -sf /tmp run && \ ln -sf /tmp tmp - pushd $(BOX)/etc && \ + pushd $(ROOTFS)/etc && \ ln -sf /proc/mounts mtab - pushd $(BOX)/etc/init.d && \ + pushd $(ROOTFS)/etc/init.d && \ ln -sf fstab K99fstab && \ ln -sf fstab S01fstab && \ ln -sf syslogd K98syslogd && \ @@ -120,7 +122,7 @@ endif ln -sf inetd S53inetd && \ ln -sf inetd K80inetd ifeq ($(BOXSERIES), hd2) - pushd $(BOX)/etc && \ + pushd $(ROOTFS)/etc && \ ln -sf /var/etc/exports exports && \ ln -sf /var/etc/fstab fstab && \ ln -sf /var/etc/hostname hostname && \ @@ -128,20 +130,20 @@ ifeq ($(BOXSERIES), hd2) ln -sf /var/etc/passwd passwd && \ ln -sf /var/etc/resolv.conf resolv.conf && \ ln -sf /var/etc/wpa_supplicant.conf wpa_supplicant.conf - pushd $(BOX)/etc/network && \ + pushd $(ROOTFS)/etc/network && \ ln -sf /var/etc/network/interfaces interfaces - pushd $(BOX)/lib && \ + pushd $(ROOTFS)/lib && \ ln -sf libuClibc-$(UCLIBC_VER).so libcrypt.so.0 && \ ln -sf libuClibc-$(UCLIBC_VER).so libdl.so.0 && \ ln -sf libuClibc-$(UCLIBC_VER).so libpthread.so.0 && \ ln -sf libuClibc-$(UCLIBC_VER).so libm.so.0 && \ ln -sf libuClibc-$(UCLIBC_VER).so librt.so.0 - ifeq ($(NEWIMAGE), yes) - touch -f $(BOX)/var/etc/.newimage + ifeq ($(IMAGE_NEW), yes) + touch -f $(ROOTFS)/var/etc/.newimage endif endif - mkdir -p $(BOX)/var/tuxbox/config && \ - pushd $(BOX)/var/tuxbox/config && \ + mkdir -p $(ROOTFS)/var/tuxbox/config && \ + pushd $(ROOTFS)/var/tuxbox/config && \ ln -sf /var/keys/SoftCam.Key SoftCam.Key get-update-info: get-update-info-$(BOXSERIES) @@ -188,7 +190,7 @@ personalize: | $(TARGET_DIR) PHONY += rootfs PHONY += .version $(TARGET_DIR)/.version PHONY += update.urls $(TARGET_DIR)/var/etc/update.urls -PHONY += $(BOX) +PHONY += $(ROOTFS) PHONY += cleanup PHONY += strip PHONY += softlinks diff --git a/make/static-libs.mk b/make/static-libs.mk index 3cf6a378..c9d47a58 100644 --- a/make/static-libs.mk +++ b/make/static-libs.mk @@ -1,4 +1,7 @@ +# # makefile to build static libraries +# +# ----------------------------------------------------------------------------- STATIC_LIBS = ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd2 hd51)) diff --git a/make/system-libs-extra.mk b/make/system-libs-extra.mk index 151cae87..b6641ee8 100644 --- a/make/system-libs-extra.mk +++ b/make/system-libs-extra.mk @@ -1,5 +1,6 @@ +# # makefile to build system libs (currently unused in ni-image) - +# # ----------------------------------------------------------------------------- LIBID3TAG_VER=0.15.1b diff --git a/make/system-libs.mk b/make/system-libs.mk index b98baba2..af6d9a8c 100644 --- a/make/system-libs.mk +++ b/make/system-libs.mk @@ -1,5 +1,6 @@ +# # makefile to build system libs - +# # ----------------------------------------------------------------------------- ZLIB_PATCH = zlib-ldflags-tests.patch diff --git a/make/system-tools-extra.mk b/make/system-tools-extra.mk index 2020f92f..133e95f8 100644 --- a/make/system-tools-extra.mk +++ b/make/system-tools-extra.mk @@ -1,5 +1,6 @@ -# makefile to build extra system tools (mostly unused) - +# +# makefile to build system tools (currently unused in ni-image) +# # ----------------------------------------------------------------------------- # usbutils-008 needs udev diff --git a/make/system-tools.mk b/make/system-tools.mk index f413125d..4e2ecb19 100644 --- a/make/system-tools.mk +++ b/make/system-tools.mk @@ -1,5 +1,6 @@ +# # makefile to build system tools - +# # ----------------------------------------------------------------------------- $(D)/openvpn: $(D)/lzo $(D)/openssl $(ARCHIVE)/openvpn-$(OPENVPN_VER).tar.xz | $(TARGET_DIR) diff --git a/make/update.mk b/make/update.mk index 57c9eff8..50522028 100644 --- a/make/update.mk +++ b/make/update.mk @@ -1,4 +1,7 @@ -# helper targets +# +# makefile for update targets +# +# ----------------------------------------------------------------------------- update-self: export GIT_MERGE_AUTOEDIT=no && \