Browse Source

- add small target to paint wonderful lines into terminal

master
vanhofen 6 years ago
parent
commit
5986b06f89
  1. 30
      Makefile
  2. 7
      make/bootstrap.mk
  3. 2
      make/clean.mk
  4. 19
      make/prerequisites.mk
  5. 34
      make/rootfs.mk

30
Makefile

@ -24,10 +24,9 @@ include make/environment-build.mk
include make/environment-image.mk
include make/environment-target.mk
include make/environment-update.mk
-include internal/internal.mk
printenv:
@echo '============================================================================== '
@make line
@echo "Build Environment Varibles:"
@echo "CROSS_DIR: $(CROSS_DIR)"
@echo "TARGET: $(TARGET)"
@ -39,7 +38,7 @@ printenv:
@echo "BOXTYPE: $(BOXTYPE)"
@echo "BOXSERIES: $(BOXSERIES)"
@echo "BOXMODEL: $(BOXMODEL)"
@echo '============================================================================== '
@make line
@echo ""
@echo "'make help' lists useful targets."
@echo ""
@ -65,6 +64,7 @@ printenv:
fi
help:
@make line
@echo "A few helpful make targets:"
@echo " * make preqs - Downloads necessary stuff"
@echo " * make crosstool - Build cross toolchain"
@ -81,12 +81,11 @@ help:
@echo "Total renew:"
@echo " * make all-clean - Reset buildsystem to delivery state"
@echo " but doesn't touch your local stuff"
@make line
done:
# -----------------------------------------------------------------------------
@echo "*************"
@echo -e "*** $(TERM_GREEN)Done!$(TERM_NORMAL) ***"
@echo "*************"
-include internal/internal.mk
include make/archives.mk
include make/bootstrap.mk
@ -114,16 +113,25 @@ include make/update.mk
include make/ni.mk
# for your local extensions, e.g. special plugins or similar ...
# put them into $(BASE_DIR)/local since that is ignored in .gitignore
-include ./Makefile.local
all:
@echo "'make all' is not a valid target. Please read the documentation."
line:
@for i in $$(seq 1 1 $$(tput cols)); do printf -; done
@echo
done:
@make line
@echo -e "$(TERM_GREEN)Done$(TERM_NORMAL)"
@make line
# target for testing only. not useful otherwise
everything: $(shell sed -n 's/^\$$.D.\/\(.*\):.*/\1/p' make/*.mk)
# for local extensions, e.g. special plugins or similar...
# put them into $(BASE_DIR)/local since that is ignored in .gitignore
-include ./Makefile.local
.print-phony:
@echo $(PHONY)

7
make/bootstrap.mk

@ -22,7 +22,9 @@ ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd2 hd51))
endif
bootstrap: $(BOOTSTRAP)
@make line
@echo -e "$(TERM_YELLOW)Bootstrapped for $(shell echo $(BOXTYPE) | sed 's/.*/\u&/') $(BOXMODEL)$(TERM_NORMAL)"
@make line
skeleton: | $(TARGET_DIR)
cp --remove-destination -a $(SKEL_ROOT)/* $(TARGET_DIR)/
@ -55,10 +57,9 @@ endif
make skeleton
$(TARGET_DIR):
@echo "**********************************************************************"
@make line
@echo "TARGET_DIR does not exist. You probably need to run 'make bootstrap'"
@echo "**********************************************************************"
@echo ""
@make line
@false
$(D) \

2
make/clean.mk

@ -31,7 +31,7 @@ ccache-clean:
@$(CCACHE) -C
all-clean: rebuild-clean staging-clean host-clean static-base-clean
@echo -e "\n$(TERM_RED_BOLD)Any other key then CTRL-C will now remove CROSS_DIR$(TERM_NORMAL)"
@echo -e "\n$(TERM_RED_BOLD)Any other key then CTRL-C will now remove CROSS_BASE$(TERM_NORMAL)"
@read
make cross-base-clean

19
make/prerequisites.mk

@ -16,27 +16,20 @@ TOOLCHECK += find-lzma find-gperf find-gettext find-bc
preqs: download ni-git
$(CCACHE):
@echo
@make line
@echo "ccache package on host missing."
@echo "==============================="
@echo
@make line
@false
download:
@make line
@echo "Download directory missing."
@echo
@echo "Download directory missing:"
@echo "==========================="
@echo "You need to make a directory named 'download' by executing 'mkdir download'"
@echo "or create a symlink to the directory where you keep your sources, e.g. by"
@echo "typing 'ln -s /path/to/my/Archive download'."
@echo
@echo "You need to make a directory named 'download' by executing 'mkdir download' or create a symlink to the directory where you keep your sources, e.g. by typing 'ln -s /path/to/my/Archive download'."
@make line
@false
$(SOURCE_DIR)/$(NI_NEUTRINO):
@echo ' ============================================================================== '
@echo " Cloning ni-neutrino-hd git repo"
@echo " and creating remote repo '$(TUXBOX_REMOTE_REPO)'"
@echo ' ============================================================================== '
mkdir -p $(SOURCE_DIR)
cd $(SOURCE_DIR) && \
git clone $(NI_GIT)/$(notdir $@).git

34
make/rootfs.mk

@ -55,9 +55,9 @@ cleanup: $(ROOTFS)
# strip bins and libs in filesystem
strip: $(ROOTFS)
ifneq ($(DEBUG), yes)
@echo "*******************************************************"
@echo "*** The following warnings from strip are harmless! ***"
@echo "*******************************************************"
@make line
@echo "The following warnings from strip are harmless!"
@make line
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 \( \
@ -75,15 +75,15 @@ endif
@echo -e "$(TERM_NORMAL)"
endif
ifeq ($(DEBUG), yes)
@echo "*******************************************************"
@echo "*** The following warnings from strip are harmless! ***"
@echo "*******************************************************"
@make line
@echo "The following warnings from strip are harmless!"
@make line
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 "*******************************************************"
@make line
@echo "Strip samba for debug image"
@make line
$(TARGET)-strip $(TARGET_DIR)/bin/smbclient
$(TARGET)-strip $(TARGET_DIR)/bin/smbpasswd
$(TARGET)-strip $(TARGET_DIR)/lib/libsmbsharemodes.so.0
@ -149,9 +149,9 @@ endif
get-update-info: get-update-info-$(BOXSERIES)
get-update-info-hd2:
@echo " ============================================================================== "
@echo " Get update info for model $(shell echo $(BOXMODEL) | sed 's/.*/\u&/')"
@echo ""
@make line
@echo "Get update info for model $(shell echo $(BOXMODEL) | sed 's/.*/\u&/')"
@echo
@cd $(SOURCE_DIR)/$(NI_DRIVERS-BIN)/$(DRIVERS_DIR); \
test -e ./u-boot.bin && ( \
strings u-boot.bin | grep -m1 "U-Boot "; \
@ -164,18 +164,18 @@ get-update-info-hd2:
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"; \
);
@echo " ============================================================================== "
@make line
get-update-info-hd1:
@echo " ============================================================================== "
@echo " Get update info for model $(shell echo $(BOXMODEL) | sed 's/.*/\u&/')"
@echo ""
@make line
@echo "Get update info for model $(shell echo $(BOXMODEL) | sed 's/.*/\u&/')"
@echo
@cd $(BASE_DIR)/root/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"; \
);
@echo " ============================================================================== "
@make line
personalize: | $(TARGET_DIR)
$(call local-script,$(notdir $@),start)

Loading…
Cancel
Save