Browse Source

- rework makefiles; set up environment in several makefiles

master
vanhofen 6 years ago
parent
commit
2f8102277d
  1. 5
      Makefile
  2. 3
      make/archives.mk
  3. 3
      make/bootstrap.mk
  4. 5
      make/clean.mk
  5. 3
      make/crosstool.mk
  6. 5
      make/development-tools.mk
  7. 11
      make/environment-build.mk
  8. 48
      make/environment-image.mk
  9. 39
      make/environment-target.mk
  10. 38
      make/environment-update.mk
  11. 1
      make/ffmpeg-arm.mk
  12. 1
      make/ffmpeg-cst.mk
  13. 3
      make/gstreamer.mk
  14. 3
      make/host-tools.mk
  15. 37
      make/image-update.mk
  16. 70
      make/images.mk
  17. 3
      make/kernel-arm.mk
  18. 3
      make/kernel-cst.mk
  19. 5
      make/neutrino.mk
  20. 3
      make/ni.mk
  21. 5
      make/plugins-extra.mk
  22. 35
      make/plugins.mk
  23. 3
      make/prerequisites.mk
  24. 92
      make/rootfs.mk
  25. 3
      make/static-libs.mk
  26. 3
      make/system-libs-extra.mk
  27. 3
      make/system-libs.mk
  28. 5
      make/system-tools-extra.mk
  29. 3
      make/system-tools.mk
  30. 5
      make/update.mk

5
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
############################################################################

3
make/archives.mk

@ -1,4 +1,7 @@
#
# makefile for tarball download
#
# -----------------------------------------------------------------------------
LIBGCRYPT_VER=1.8.3
$(ARCHIVE)/libgcrypt-$(LIBGCRYPT_VER).tar.gz:

3
make/bootstrap.mk

@ -1,4 +1,7 @@
#
# makefile to setup and initialize the final buildsystem
#
# -----------------------------------------------------------------------------
BOOTSTRAP = targetprefix
BOOTSTRAP += $(D)

5
make/clean.mk

@ -1,4 +1,7 @@
# clean all for rebuild (except the toolchain)
#
# makefile for clean targets
#
# -----------------------------------------------------------------------------
rebuild-clean:
-rm -rf $(BUILD_TMP)

3
make/crosstool.mk

@ -1,4 +1,7 @@
#
# makefile to build crosstools
#
# -----------------------------------------------------------------------------
crosstool: crosstool-$(BOXARCH)-$(BOXSERIES)

5
make/development-tools.mk

@ -1,5 +1,6 @@
#Makefile to build development-tools
#
# makefile to build development-tools
#
# -----------------------------------------------------------------------------
valgrind: valgrind-$(BOXSERIES)

11
make/environment.mk → 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

48
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')

39
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

38
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

1
make/ffmpeg-arm.mk

@ -1,7 +1,6 @@
#
# ffmpeg
#
# -----------------------------------------------------------------------------
FFMPEG_VER = 4.0.2

1
make/ffmpeg-cst.mk

@ -1,7 +1,6 @@
#
# ffmpeg
#
# -----------------------------------------------------------------------------
FFMPEG_DEPS = $(D)/openssl $(D)/librtmp $(D)/libbluray $(D)/libass

3
make/gstreamer.mk

@ -1,5 +1,6 @@
#
# makefile to build gstreamer and all it's dependencies
#
# -----------------------------------------------------------------------------
# change to activate debug

3
make/host-tools.mk

@ -1,4 +1,7 @@
#
# makefile to build all needed host-binaries
#
# -----------------------------------------------------------------------------
host-preqs: \
host_pkg-config \

37
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

70
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); \

3
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

3
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

5
make/neutrino.mk

@ -1,4 +1,7 @@
# makefile to build NEUTRINO
#
# makefile to build Neutrino
#
# -----------------------------------------------------------------------------
YOUTUBE_DEV_KEY ?= AIzaSyBLdZe7M3rpNMZqSj-3IEvjbb2hATWJIdM
OMDB_API_KEY ?= 20711f9e

3
make/ni.mk

@ -1,4 +1,7 @@
#
# custom ni-makefile - just a collection of targets
#
# -----------------------------------------------------------------------------
init: preqs crosstools bootstrap

5
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

35
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

3
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

92
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

3
make/static-libs.mk

@ -1,4 +1,7 @@
#
# makefile to build static libraries
#
# -----------------------------------------------------------------------------
STATIC_LIBS =
ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd2 hd51))

3
make/system-libs-extra.mk

@ -1,5 +1,6 @@
#
# makefile to build system libs (currently unused in ni-image)
#
# -----------------------------------------------------------------------------
LIBID3TAG_VER=0.15.1b

3
make/system-libs.mk

@ -1,5 +1,6 @@
#
# makefile to build system libs
#
# -----------------------------------------------------------------------------
ZLIB_PATCH = zlib-ldflags-tests.patch

5
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

3
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)

5
make/update.mk

@ -1,4 +1,7 @@
# helper targets
#
# makefile for update targets
#
# -----------------------------------------------------------------------------
update-self:
export GIT_MERGE_AUTOEDIT=no && \

Loading…
Cancel
Save