Browse Source

- use more $(CD) variable

master
vanhofen 6 years ago
parent
commit
535eeee92a
  1. 2
      config.example
  2. 12
      make/bootstrap.mk
  3. 2
      make/crosstool.mk
  4. 2
      make/ffmpeg-coolstream.mk
  5. 4
      make/image-updates.mk
  6. 4
      make/linux-kernel.mk
  7. 2
      make/neutrino-plugins.mk
  8. 2
      make/neutrino.mk
  9. 38
      make/prerequisites.mk
  10. 8
      make/rootfs.mk
  11. 7
      make/system-libs.mk
  12. 6
      make/system-tools.mk
  13. 88
      make/update.mk

2
config.example

@ -27,5 +27,5 @@
# Create debug-image. Not useful in real life.
#DEBUG = yes
# NI DEV-mode. Do not touch!
# NI administrator mode. Do not touch!
#NI_ADMIN = true

12
make/bootstrap.mk

@ -132,15 +132,15 @@ cross-libs: | $(TARGET_DIR)
false; \
fi
ifeq ($(BOXSERIES), hd2)
cd $(TARGET_LIB_DIR) && \
ln -sf libuClibc-$(UCLIBC_VER).so libcrypt.so.0 && \
ln -sf libuClibc-$(UCLIBC_VER).so libdl.so.0 && \
ln -sf libuClibc-$(UCLIBC_VER).so libm.so.0 && \
ln -sf libuClibc-$(UCLIBC_VER).so libpthread.so.0 && \
$(CD) $(TARGET_LIB_DIR); \
ln -sf libuClibc-$(UCLIBC_VER).so libcrypt.so.0; \
ln -sf libuClibc-$(UCLIBC_VER).so libdl.so.0; \
ln -sf libuClibc-$(UCLIBC_VER).so libm.so.0; \
ln -sf libuClibc-$(UCLIBC_VER).so libpthread.so.0; \
ln -sf libuClibc-$(UCLIBC_VER).so librt.so.0
endif
ifeq ($(BOXSERIES), hd51)
cd $(TARGET_LIB_DIR) && \
$(CD) $(TARGET_LIB_DIR); \
ln -sf ld-2.23.so ld-linux.so.3
endif

2
make/crosstool.mk

@ -21,7 +21,7 @@ $(CROSSTOOL_BACKUP):
@false
crosstool-backup:
cd $(CROSS_DIR); \
$(CD) $(CROSS_DIR); \
tar -czvf $(CROSSTOOL_BACKUP) *
crosstool-restore: $(CROSSTOOL_BACKUP)

2
make/ffmpeg-coolstream.mk

@ -174,7 +174,7 @@ endif
$(D)/ffmpeg: $(FFMPEG_DEPS) | $(TARGET_DIR)
$(REMOVE)/$(NI_FFMPEG)
cd $(SOURCE_DIR)/$(NI_FFMPEG) && \
$(CD) $(SOURCE_DIR)/$(NI_FFMPEG); \
git checkout $(NI_FFMPEG_BRANCH)
tar -C $(SOURCE_DIR) -cp $(NI_FFMPEG) --exclude-vcs | tar -C $(BUILD_TMP) -x
$(CHDIR)/$(NI_FFMPEG); \

4
make/image-updates.mk

@ -117,7 +117,7 @@ pathauf-192:
mkdir -pv $(UPDATE_INST_DIR)/var/tuxbox/config/zapit && \
cp -f $(IMAGEFILES)/channellists/$@/* $(UPDATE_INST_DIR)/var/tuxbox/config/zapit/
# remove non-printable chars and re-format xml-files
cd $(UPDATE_INST_DIR)/var/tuxbox/config/zapit/; \
$(CD) $(UPDATE_INST_DIR)/var/tuxbox/config/zapit/; \
for file in *.xml; do \
sed -i 's/[^[:print:]]//g' $$file; \
XMLLINT_INDENT=" " \
@ -186,7 +186,7 @@ u-clean-all: u-clean
rm -rf $(UPDATE_DIR)
u-update-bin:
set -e; cd $(BUILD_TMP); \
$(CD) $(BUILD_TMP); \
tar -czvf $(UPDATE_DIR)/$(UPDATE_NAME).bin temp_inst
echo $(UPDATE_URL)/$(UPDATE_NAME).bin $(UPDATE_TYPE)$(UPDATE_VER)$(UPDATE_DATE) `md5sum $(UPDATE_DIR)/$(UPDATE_NAME).bin | cut -c1-32` $(UPDATE_DESC) $(UPDATE_VERSION) >> $(UPDATE_DIR)/$(UPDATE_MD5FILE)
$(MAKE) u-clean

4
make/linux-kernel.mk

@ -52,7 +52,7 @@ endif
# -----------------------------------------------------------------------------
$(D)/kernel.do_checkout: $(SOURCE_DIR)/$(NI_LINUX-KERNEL)
cd $(SOURCE_DIR)/$(NI_LINUX-KERNEL); \
$(CD) $(SOURCE_DIR)/$(NI_LINUX-KERNEL); \
git checkout $(KERNEL_BRANCH)
$(TOUCH)
@ -61,7 +61,7 @@ $(D)/kernel.do_prepare: kernel.do_checkout
$(REMOVE)/$(KERNEL_OBJ)
$(REMOVE)/$(KERNEL_MODULES)
tar -C $(SOURCE_DIR) -cp $(NI_LINUX-KERNEL) --exclude-vcs | tar -C $(BUILD_TMP) -x
cd $(BUILD_TMP); \
$(CD) $(BUILD_TMP); \
mv $(NI_LINUX-KERNEL) $(KERNEL_SRC)
$(MKDIR)/$(KERNEL_OBJ)
$(MKDIR)/$(KERNEL_MODULES)

2
make/neutrino-plugins.mk

@ -103,7 +103,7 @@ $(D)/channellogos: $(SOURCE_DIR)/$(NI_LOGO-STUFF) $(SHAREICONS)
install -m 0644 $(SOURCE_DIR)/$(NI_LOGO-STUFF)/logos/* $(SHAREICONS)/logo
mkdir -p $(SHAREICONS)/logo/events
install -m 0644 $(SOURCE_DIR)/$(NI_LOGO-STUFF)/logos-events/* $(SHAREICONS)/logo/events
cd $(SOURCE_DIR)/$(NI_LOGO-STUFF)/logo-links && \
$(CD) $(SOURCE_DIR)/$(NI_LOGO-STUFF)/logo-links; \
./logo-linker.sh logo-links.db $(SHAREICONS)/logo
$(TOUCH)

2
make/neutrino.mk

@ -134,7 +134,7 @@ N_BUILDENV = \
$(N_OBJ_DIR)/config.status: $(N_DEPS)
test -d $(N_OBJ_DIR) || mkdir -p $(N_OBJ_DIR)
cd $(SOURCE_DIR)/$(NI_NEUTRINO) && \
$(CD) $(SOURCE_DIR)/$(NI_NEUTRINO); \
git checkout $(NI_NEUTRINO_BRANCH)
$(SOURCE_DIR)/$(NI_NEUTRINO)/autogen.sh
pushd $(N_OBJ_DIR) && \

38
make/prerequisites.mk

@ -71,54 +71,54 @@ $(SOURCE_DIR):
mkdir -p $@
$(SOURCE_DIR)/$(NI_NEUTRINO):
cd $(SOURCE_DIR) && \
$(CD) $(SOURCE_DIR); \
git clone $(NI_GIT)/$(notdir $@).git
pushd $@ && \
git remote add $(TUXBOX_REMOTE_REPO) $(TUXBOX_GIT)/$(TUXBOX_NEUTRINO).git && \
$(CD) $@; \
git remote add $(TUXBOX_REMOTE_REPO) $(TUXBOX_GIT)/$(TUXBOX_NEUTRINO).git; \
git fetch $(TUXBOX_REMOTE_REPO)
$(BUILD-GENERIC-PC):
git clone $(NI_GIT)/$(NI_BUILD-GENERIC-PC).git $(BUILD-GENERIC-PC)
$(SOURCE_DIR)/$(NI_LIBSTB-HAL):
cd $(SOURCE_DIR) && \
$(CD) $(SOURCE_DIR); \
git clone $(NI_GIT)/$(notdir $@).git
cd $@ && \
git remote add $(TANGO_REMOTE_REPO) https://github.com/TangoCash/libstb-hal-tangos.git && \
$(CD) $@; \
git remote add $(TANGO_REMOTE_REPO) https://github.com/TangoCash/libstb-hal-tangos.git; \
git fetch $(TANGO_REMOTE_REPO)
$(SOURCE_DIR)/$(NI_LIBCOOLSTREAM):
ifeq ($(HAS_LIBCS), yes)
cd $(SOURCE_DIR) && \
$(CD) $(SOURCE_DIR); \
git clone $(NI_GIT)/$(notdir $@).git
cd $@ && \
$(CD) $@; \
git checkout $(NI_LIBCOOLSTREAM_BRANCH)
endif
# upstream for rebase
$(SOURCE_DIR)/$(NI_FFMPEG):
cd $(SOURCE_DIR) && \
$(CD) $(SOURCE_DIR); \
git clone $(NI_GIT)/$(notdir $@).git
cd $@ && \
git remote add upstream https://git.ffmpeg.org/ffmpeg.git && \
$(CD) $@; \
git remote add upstream https://git.ffmpeg.org/ffmpeg.git; \
git fetch --all
# upstream for rebase
# torvalds for cherry-picking
$(SOURCE_DIR)/$(NI_LINUX-KERNEL):
cd $(SOURCE_DIR) && \
$(CD) $(SOURCE_DIR); \
git clone $(NI_GIT)/$(notdir $@).git
cd $@ && \
git remote add upstream https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git && \
git remote add torvalds https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git && \
$(CD) $@; \
git remote add upstream https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git; \
git remote add torvalds https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git; \
git fetch --all
# upstream for rebase
$(SOURCE_DIR)/$(NI_OFGWRITE):
cd $(SOURCE_DIR) && \
$(CD) $(SOURCE_DIR); \
git clone $(NI_GIT)/$(notdir $@).git
cd $@ && \
git remote add upstream https://github.com/oe-alliance/ofgwrite.git && \
$(CD) $@ && \
git remote add upstream https://github.com/oe-alliance/ofgwrite.git; \
git fetch --all
$(SOURCE_DIR)/$(NI_DRIVERS-BIN) \
@ -127,7 +127,7 @@ $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS) \
$(SOURCE_DIR)/$(NI_OPENTHREADS) \
$(SOURCE_DIR)/$(NI_RTMPDUMP) \
$(SOURCE_DIR)/$(NI_STREAMRIPPER):
cd $(SOURCE_DIR) && \
$(CD) $(SOURCE_DIR); \
git clone $(NI_GIT)/$(notdir $@).git
ni-sources: $(SOURCE_DIR) \

8
make/rootfs.mk

@ -162,15 +162,15 @@ get-update-info-hd2:
$(call draw_line);
@echo "Get update info for model $(shell echo $(BOXMODEL) | sed 's/.*/\u&/')"
@echo
@cd $(SOURCE_DIR)/$(NI_DRIVERS-BIN)/$(BOXTYPE)/$(DRIVERS_DIR); \
@$(CD) $(SOURCE_DIR)/$(NI_DRIVERS-BIN)/$(BOXTYPE)/$(DRIVERS_DIR); \
test -e ./u-boot.bin && ( \
strings u-boot.bin | grep -m1 "U-Boot "; \
); \
test -e ./uldr.bin && ( \
strings uldr.bin | grep -m1 "Microloader "; \
); \
cd $(TARGET_DIR)/var/update; \
test -e ./vmlinux.ub.gz && ( \
$(CD) $(TARGET_DIR)/var/update; \
test -e ./vmlinux.ub.gz && ( \
dd if=./vmlinux.ub.gz bs=1 skip=$$(LC_ALL=C grep -a -b -o $$'\x1f\x8b\x08\x00\x00\x00\x00\x00' ./vmlinux.ub.gz \
| cut -d ':' -f 1) | zcat | grep -a "Linux version"; \
);
@ -180,7 +180,7 @@ get-update-info-hd1:
$(call draw_line);
@echo "Get update info for model $(shell echo $(BOXMODEL) | sed 's/.*/\u&/')"
@echo
@cd $(TARGET_DIR)/var/update; \
@$(CD) $(TARGET_DIR)/var/update; \
test -e ./zImage && ( \
dd if=./zImage bs=1 skip=$$(LC_ALL=C grep -a -b -o $$'\x1f\x8b\x08\x00\x00\x00\x00\x00' ./zImage \
| cut -d ':' -f 1) | zcat | grep -a "Linux version"; \

7
make/system-libs.mk

@ -654,7 +654,8 @@ $(D)/lua: $(D)/libncurses $(ARCHIVE)/lua-$(LUA_VER).tar.gz | $(TARGET_DIR)
$(MAKE) linux PKG_VERSION=$(LUA_VER) CC=$(TARGET)-gcc LD=$(TARGET)-ld AR="$(TARGET)-ar rcu" RANLIB=$(TARGET)-ranlib LDFLAGS="$(TARGET_LDFLAGS)"; \
$(MAKE) install INSTALL_TOP=$(TARGET_DIR)
install -D -m 0755 $(BUILD_TMP)/lua-$(LUA_VER)/src/liblua.so.$(LUA_VER) $(TARGET_LIB_DIR)/liblua.so.$(LUA_VER)
cd $(TARGET_LIB_DIR); ln -sf liblua.so.$(LUA_VER) $(TARGET_LIB_DIR)/liblua.so
$(CD) $(TARGET_LIB_DIR); \
ln -sf liblua.so.$(LUA_VER) $(TARGET_LIB_DIR)/liblua.so
install -D -m 0644 $(BUILD_TMP)/lua-$(LUA_VER)/etc/lua.pc $(PKG_CONFIG_PATH)/lua.pc
$(REWRITE_PKGCONF)/lua.pc
rm -rf $(TARGET_DIR)/bin/luac
@ -806,7 +807,7 @@ $(D)/libaacs: $(ARCHIVE)/libaacs-$(LIBAACS_VER).tar.bz2 $(D)/libgcrypt | $(TARGE
$(REWRITE_PKGCONF)/libaacs.pc
$(REWRITE_LIBTOOL)/libaacs.la
$(REMOVE)/libaacs-$(LIBAACS_VER)
cd $(TARGET_DIR); \
$(CD) $(TARGET_DIR); \
mkdir -p .config/aacs .cache/aacs/vuk
cp $(IMAGEFILES)/libaacs/KEYDB.cfg $(TARGET_DIR)/.config/aacs
$(TOUCH)
@ -830,7 +831,7 @@ $(D)/libbdplus: $(ARCHIVE)/libbdplus-$(LIBBDPLUS_VER).tar.bz2 $(D)/libaacs | $(T
$(REWRITE_PKGCONF)/libbdplus.pc
$(REWRITE_LIBTOOL)/libbdplus.la
$(REMOVE)/libbdplus-$(LIBBDPLUS_VER)
cd $(TARGET_DIR); \
$(CD) $(TARGET_DIR); \
mkdir -p .config/bdplus/vm0
cp -f $(IMAGEFILES)/libbdplus/* $(TARGET_DIR)/.config/bdplus/vm0
$(TOUCH)

6
make/system-tools.mk

@ -582,8 +582,8 @@ $(D)/e2fsprogs: $(ARCHIVE)/e2fsprogs-$(E2FSPROGS_VER).tar.gz | $(TARGET_DIR)
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REWRITE_PKGCONF)/uuid.pc
$(REMOVE)/e2fsprogs-$(E2FSPROGS_VER)
cd $(TARGET_DIR) && rm sbin/dumpe2fs sbin/logsave sbin/e2undo \
sbin/filefrag sbin/e2freefrag bin/chattr bin/lsattr bin/uuidgen
$(CD) $(TARGET_DIR); \
rm sbin/dumpe2fs sbin/logsave sbin/e2undo sbin/filefrag sbin/e2freefrag bin/chattr bin/lsattr bin/uuidgen
$(TOUCH)
# -----------------------------------------------------------------------------
@ -1383,7 +1383,7 @@ $(ARCHIVE)/$(CA-BUNDLE_SOURCE):
$(WGET) $(CA-BUNDLE_URL)
$(D)/ca-bundle: $(ARCHIVE)/$(CA-BUNDLE_SOURCE) | $(TARGET_DIR)
cd $(ARCHIVE); \
$(CD) $(ARCHIVE); \
curl --remote-name --time-cond $(CA-BUNDLE_SOURCE) $(CA-BUNDLE_URL)
install -D -m 0644 $(ARCHIVE)/$(CA-BUNDLE_SOURCE) $(TARGET_DIR)/$(CA-BUNDLE_DIR)/$(CA-BUNDLE)
$(TOUCH)

88
make/update.mk

@ -4,36 +4,36 @@
# -----------------------------------------------------------------------------
update-self:
export GIT_MERGE_AUTOEDIT=no && \
export GIT_MERGE_AUTOEDIT=no; \
git pull
ifeq ($(HAS_INTERNALS), yes)
cd $(BASE_DIR)/$(NI_INTERNALS) && git pull
$(CD) $(BASE_DIR)/$(NI_INTERNALS); git pull
endif
update-neutrino:
export GIT_MERGE_AUTOEDIT=no && \
cd $(SOURCE_DIR)/$(NI_NEUTRINO) && \
git checkout $(NI_NEUTRINO_BRANCH) && \
git pull origin $(NI_NEUTRINO_BRANCH) && \
export GIT_MERGE_AUTOEDIT=no; \
$(CD) $(SOURCE_DIR)/$(NI_NEUTRINO); \
git checkout $(NI_NEUTRINO_BRANCH); \
git pull origin $(NI_NEUTRINO_BRANCH); \
git fetch
update-remotes:
ifeq ($(NI_ADMIN), true)
export GIT_MERGE_AUTOEDIT=no && \
cd $(SOURCE_DIR)/$(NI_NEUTRINO) && \
git checkout $(NI_NEUTRINO_BRANCH) && \
export GIT_MERGE_AUTOEDIT=no; \
$(CD) $(SOURCE_DIR)/$(NI_NEUTRINO); \
git checkout $(NI_NEUTRINO_BRANCH); \
git fetch --all
cd $(SOURCE_DIR)/$(NI_LIBSTB-HAL) && \
git checkout master && \
git fetch --all && \
$(CD) $(SOURCE_DIR)/$(NI_LIBSTB-HAL); \
git checkout master; \
git fetch --all; \
git pull $(TANGO_REMOTE_REPO) master
cd $(SOURCE_DIR)/$(NI_OFGWRITE) && \
git checkout master && \
git fetch --all && \
$(CD) $(SOURCE_DIR)/$(NI_OFGWRITE); \
git checkout master; \
git fetch --all; \
git pull upstream master
cd $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS) && \
git checkout master && \
git fetch --all && \
$(CD) $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS); \
git checkout master; \
git fetch --all; \
./update-tuxbox-remotes.sh
endif
@ -46,20 +46,20 @@ update-ni-force:
make update-ni-sources
update-ni-sources: ni-sources
cd $(BUILD-GENERIC-PC) && git pull
cd $(SOURCE_DIR)/$(NI_DRIVERS-BIN) && git pull
cd $(SOURCE_DIR)/$(NI_FFMPEG) && git pull --all && git checkout $(NI_FFMPEG_BRANCH)
$(CD) $(BUILD-GENERIC-PC); git pull
$(CD) $(SOURCE_DIR)/$(NI_DRIVERS-BIN); git pull
$(CD) $(SOURCE_DIR)/$(NI_FFMPEG); git pull --all; git checkout $(NI_FFMPEG_BRANCH)
ifeq ($(HAS_LIBCS), yes)
cd $(SOURCE_DIR)/$(NI_LIBCOOLSTREAM) && git pull --all && git checkout $(NI_LIBCOOLSTREAM_BRANCH)
$(CD) $(SOURCE_DIR)/$(NI_LIBCOOLSTREAM); git pull --all; git checkout $(NI_LIBCOOLSTREAM_BRANCH)
endif
cd $(SOURCE_DIR)/$(NI_LIBSTB-HAL) && git pull
cd $(SOURCE_DIR)/$(NI_LINUX-KERNEL) && git pull --all && git checkout $(KERNEL_BRANCH)
cd $(SOURCE_DIR)/$(NI_LOGO-STUFF) && git pull
cd $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS) && git pull
cd $(SOURCE_DIR)/$(NI_OFGWRITE) && git pull
cd $(SOURCE_DIR)/$(NI_OPENTHREADS) && git pull
cd $(SOURCE_DIR)/$(NI_RTMPDUMP) && git pull
cd $(SOURCE_DIR)/$(NI_STREAMRIPPER) && git pull
$(CD) $(SOURCE_DIR)/$(NI_LIBSTB-HAL); git pull
$(CD) $(SOURCE_DIR)/$(NI_LINUX-KERNEL); git pull --all; git checkout $(KERNEL_BRANCH)
$(CD) $(SOURCE_DIR)/$(NI_LOGO-STUFF); git pull
$(CD) $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS); git pull
$(CD) $(SOURCE_DIR)/$(NI_OFGWRITE); git pull
$(CD) $(SOURCE_DIR)/$(NI_OPENTHREADS); git pull
$(CD) $(SOURCE_DIR)/$(NI_RTMPDUMP); git pull
$(CD) $(SOURCE_DIR)/$(NI_STREAMRIPPER); git pull
update-ni:
make update-self
@ -72,23 +72,23 @@ update-all: update-ni update-remotes
push:
git push
ifeq ($(HAS_INTERNALS), yes)
cd $(BASE_DIR)/$(NI_INTERNALS) && git push
$(CD) $(BASE_DIR)/$(NI_INTERNALS); git push
endif
cd $(BUILD-GENERIC-PC) && git push
cd $(SOURCE_DIR)/$(NI_DRIVERS-BIN) && git push
cd $(SOURCE_DIR)/$(NI_FFMPEG) && git push --all
$(CD) $(BUILD-GENERIC-PC); git push
$(CD) $(SOURCE_DIR)/$(NI_DRIVERS-BIN); git push
$(CD) $(SOURCE_DIR)/$(NI_FFMPEG); git push --all
ifeq ($(HAS_LIBCS), yes)
cd $(SOURCE_DIR)/$(NI_LIBCOOLSTREAM) && git push --all
$(CD) $(SOURCE_DIR)/$(NI_LIBCOOLSTREAM); git push --all
endif
cd $(SOURCE_DIR)/$(NI_LIBSTB-HAL) && git push
cd $(SOURCE_DIR)/$(NI_LINUX-KERNEL) && git push --all
cd $(SOURCE_DIR)/$(NI_LOGO-STUFF) && git push
cd $(SOURCE_DIR)/$(NI_NEUTRINO) && git push
cd $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS) && git push
cd $(SOURCE_DIR)/$(NI_OFGWRITE) && git push
cd $(SOURCE_DIR)/$(NI_OPENTHREADS) && git push
cd $(SOURCE_DIR)/$(NI_RTMPDUMP) && git push
cd $(SOURCE_DIR)/$(NI_STREAMRIPPER) && git push
$(CD) $(SOURCE_DIR)/$(NI_LIBSTB-HAL); git push
$(CD) $(SOURCE_DIR)/$(NI_LINUX-KERNEL); git push --all
$(CD) $(SOURCE_DIR)/$(NI_LOGO-STUFF); git push
$(CD) $(SOURCE_DIR)/$(NI_NEUTRINO); git push
$(CD) $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS); git push
$(CD) $(SOURCE_DIR)/$(NI_OFGWRITE); git push
$(CD) $(SOURCE_DIR)/$(NI_OPENTHREADS); git push
$(CD) $(SOURCE_DIR)/$(NI_RTMPDUMP); git push
$(CD) $(SOURCE_DIR)/$(NI_STREAMRIPPER); git push
# -----------------------------------------------------------------------------

Loading…
Cancel
Save