Browse Source

- skel-root/coolstream: remove precompiled kernels

master
vanhofen 5 years ago
parent
commit
66765611af
  1. 21
      make/bootstrap.mk
  2. 17
      make/linux-kernel.mk
  3. 35
      make/target-rootfs.mk
  4. 2
      skel-root/hd1/etc/init.d/stb_update.data
  5. 4
      skel-root/hd1/etc/init.d/stb_update.sh
  6. BIN
      skel-root/hd1/var/update/zImage
  7. 2
      skel-root/hd2-kronos/etc/init.d/stb_update.data
  8. BIN
      skel-root/hd2-kronos/var/update/vmlinux.ub.gz
  9. 2
      skel-root/hd2/etc/init.d/stb_update.data
  10. 8
      skel-root/hd2/etc/init.d/stb_update.sh
  11. BIN
      skel-root/hd2/var/update/vmlinux.ub.gz

21
make/bootstrap.mk

@ -18,7 +18,7 @@ BOOTSTRAP += target-dir
BOOTSTRAP += libs-static BOOTSTRAP += libs-static
BOOTSTRAP += libs-cross BOOTSTRAP += libs-cross
ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd2)) ifeq ($(BOXTYPE), $(filter $(BOXTYPE), coolstream))
BOOTSTRAP += var-update BOOTSTRAP += var-update
endif endif
@ -34,9 +34,6 @@ bootstrap: $(BOOTSTRAP)
skeleton: | $(TARGET_DIR) skeleton: | $(TARGET_DIR)
$(INSTALL_COPY) --remove-destination $(SKEL-ROOT)/. $(TARGET_DIR)/ $(INSTALL_COPY) --remove-destination $(SKEL-ROOT)/. $(TARGET_DIR)/
ifneq ($(wildcard $(SKEL-ROOT)-$(BOXFAMILY)),)
$(INSTALL_COPY) --remove-destination $(SKEL-ROOT)-$(BOXFAMILY)/. $(TARGET_DIR)/
endif
find $(TARGET_DIR) -type f -print0 | xargs --no-run-if-empty -0 \ find $(TARGET_DIR) -type f -print0 | xargs --no-run-if-empty -0 \
sed -i 's|%(BOXMODEL)|$(BOXMODEL)|' sed -i 's|%(BOXMODEL)|$(BOXMODEL)|'
sed -i 's|%(BOOT_PARTITION)|$(BOOT_PARTITION)|' $(TARGET_DIR)/etc/mdev.conf sed -i 's|%(BOOT_PARTITION)|$(BOOT_PARTITION)|' $(TARGET_DIR)/etc/mdev.conf
@ -121,17 +118,25 @@ endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
ifeq ($(BOXTYPE), $(filter $(BOXTYPE), coolstream))
var-update: $(TARGET_DIR)/var/update var-update: $(TARGET_DIR)/var/update
$(TARGET_DIR)/var/update: | $(TARGET_DIR) $(TARGET_DIR)/var/update: | $(TARGET_DIR)
mkdir -p $(@) mkdir -p $(@)
ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd2)) ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd1))
$(INSTALL_COPY) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/uldr.bin $(@) $(INSTALL_DATA) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/zImage $(@)
else ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd2))
$(INSTALL_DATA) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/vmlinux.ub.gz $(@)
$(INSTALL_DATA) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/uldr.bin $(@)
ifeq ($(BOXMODEL), kronos_v2) ifeq ($(BOXMODEL), kronos_v2)
$(INSTALL_COPY) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/u-boot.bin.kronos_v2 $(@)/u-boot.bin $(INSTALL_DATA) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/u-boot.bin.kronos_v2 $(@)/u-boot.bin
else else
$(INSTALL_COPY) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/u-boot.bin $(@) $(INSTALL_DATA) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/u-boot.bin $(@)
endif endif
endif
$(INSTALL_DATA) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/stb_update.data $(@)
endif endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------

17
make/linux-kernel.mk

@ -331,21 +331,17 @@ endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# install coolstream kernels to skel-root # install coolstream kernels into ni-drivers-bin repository
ifneq ($(wildcard $(SKEL-ROOT)-$(BOXFAMILY)),)
KERNEL_DESTDIR = $(SKEL-ROOT)-$(BOXFAMILY)/var/update
else
KERNEL_DESTDIR = $(SKEL-ROOT)/var/update
endif
kernel-install-coolstream: kernel-install-coolstream-$(BOXSERIES) kernel-install-coolstream: kernel-install-coolstream-$(BOXSERIES)
kernel-install-coolstream-hd1: kernel-coolstream-hd1 kernel-install-coolstream-hd1: kernel-coolstream-hd1
$(INSTALL_DATA) $(IMAGE_DIR)/kernel-$(BOXTYPE_SC)-$(BOXMODEL)-zImage.img $(KERNEL_DESTDIR)/zImage $(INSTALL_DATA) $(IMAGE_DIR)/kernel-$(BOXTYPE_SC)-$(BOXMODEL)-zImage.img \
$(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/zImage
kernel-install-coolstream-hd2: kernel-coolstream-hd2 kernel-install-coolstream-hd2: kernel-coolstream-hd2
$(INSTALL_DATA) $(IMAGE_DIR)/kernel-$(BOXTYPE_SC)-$(BOXMODEL)-vmlinux.ub.gz $(KERNEL_DESTDIR)/vmlinux.ub.gz $(INSTALL_DATA) $(IMAGE_DIR)/kernel-$(BOXTYPE_SC)-$(BOXMODEL)-vmlinux.ub.gz \
$(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/vmlinux.ub.gz
kernel-install-coolstream-all: kernel-install-coolstream-all:
make clean BOXFAMILY=nevis make clean BOXFAMILY=nevis
@ -370,6 +366,9 @@ kernel-install-coolstream-all:
make get-update-info-hd2 BOXFAMILY=kronos make get-update-info-hd2 BOXFAMILY=kronos
# #
make clean > /dev/null 2>&1 make clean > /dev/null 2>&1
#
@echo -e "$(TERM_YELLOW)Align stb_update.data in $(SOURCE_DIR)/$(NI-DRIVERS-BIN)$(TERM_NORMAL)"
@echo -e "$(TERM_YELLOW)and commit your changes in $(SOURCE_DIR)/$(NI-DRIVERS-BIN)$(TERM_NORMAL)"
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------

35
make/target-rootfs.mk

@ -151,37 +151,40 @@ endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
ifeq ($(BOXTYPE), $(filter $(BOXTYPE), coolstream))
get-update-info: get-update-info-$(BOXSERIES) get-update-info: get-update-info-$(BOXSERIES)
get-update-info-hd2: get-update-info-hd2:
$(call draw_line); $(call draw_line);
@echo "Get update info for model $(shell echo $(BOXMODEL) | sed 's/.*/\u&/')" @echo "Get update info for boxmodel $(BOXMODEL)"
@echo @echo
@$(CD) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR); \ @$(CD) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR); \
test -e ./u-boot.bin && ( \ if [ -e vmlinux.ub.gz ]; then \
dd status=none 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 -q | grep -a "Linux version"; \
fi; \
if [ -e u-boot.bin ]; then \
strings u-boot.bin | grep -m1 "U-Boot "; \ strings u-boot.bin | grep -m1 "U-Boot "; \
); \ fi; \
test -e ./uldr.bin && ( \ if [ -e uldr.bin ]; then \
strings uldr.bin | grep -m1 "Microloader "; \ strings uldr.bin | grep -m1 "Microloader "; \
); \ fi
$(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"; \
);
$(call draw_line); $(call draw_line);
get-update-info-hd1: get-update-info-hd1:
$(call draw_line); $(call draw_line);
@echo "Get update info for model $(shell echo $(BOXMODEL) | sed 's/.*/\u&/')" @echo "Get update info for boxmodel $(BOXMODEL)"
@echo @echo
@$(CD) $(TARGET_DIR)/var/update; \ @$(CD) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR); \
test -e ./zImage && ( \ if [ -e zImage ]; then \
dd if=./zImage bs=1 skip=$$(LC_ALL=C grep -a -b -o $$'\x1f\x8b\x08\x00\x00\x00\x00\x00' ./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"; \ | cut -d ':' -f 1) | zcat -q | grep -a "Linux version"; \
); fi
$(call draw_line); $(call draw_line);
endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
PHONY += target-finish PHONY += target-finish

2
skel-root/hd1/etc/init.d/stb_update.data

@ -1,2 +0,0 @@
# get this info with "make get-update-info"
V_KERNEL="Sat Jun 24 19:32:15 CEST 2017"

4
skel-root/hd1/etc/init.d/stb_update.sh

@ -4,8 +4,8 @@
DO_REBOOT=0 DO_REBOOT=0
if [ -e /etc/init.d/stb_update.data ]; then if [ -e /var/update/stb_update.data ]; then
. /etc/init.d/stb_update.data 2> /dev/null . /var/update/stb_update.data 2> /dev/null
fi fi
if [ -e /var/etc/.stb_update ]; then if [ -e /var/etc/.stb_update ]; then

BIN
skel-root/hd1/var/update/zImage

Binary file not shown.

2
skel-root/hd2-kronos/etc/init.d/stb_update.data

@ -1,2 +0,0 @@
# get this info with "make get-update-info"
V_KERNEL="Sun Nov 5 18:47:49 CET 2017"

BIN
skel-root/hd2-kronos/var/update/vmlinux.ub.gz

Binary file not shown.

2
skel-root/hd2/etc/init.d/stb_update.data

@ -1,2 +0,0 @@
# get this info with "make get-update-info"
V_KERNEL="Sun Nov 5 18:47:11 CET 2017"

8
skel-root/hd2/etc/init.d/stb_update.sh

@ -4,16 +4,16 @@
DO_REBOOT=0 DO_REBOOT=0
if [ -e /etc/init.d/stb_update.data ]; then if [ -e /var/update/stb_update.data ]; then
. /etc/init.d/stb_update.data 2> /dev/null . /var/update/stb_update.data 2> /dev/null
fi fi
if [ -e /var/etc/.stb_update ]; then if [ -e /var/etc/.stb_update ]; then
rm /var/etc/.stb_update rm /var/etc/.stb_update
# force an update with a bogus date # force an update with a bogus date
V_KERNEL="Sun Jan 1 00:00:00 CET 2042" V_KERNEL="Sun Jan 1 00:00:00 CET 2042"
V_UBOOT="Sun Jan 01 2042 - 00:00:00" #V_UBOOT="Sun Jan 01 2042 - 00:00:00"
V_ULDR="Sun Jan 01 2042 00:00:00" #V_ULDR="Sun Jan 01 2042 00:00:00"
fi fi
if [ -f /var/update/vmlinux.ub.gz ]; then if [ -f /var/update/vmlinux.ub.gz ]; then

BIN
skel-root/hd2/var/update/vmlinux.ub.gz

Binary file not shown.
Loading…
Cancel
Save