From 31a0e4544cac73f2bbbf414b75fe7224d2edeee8 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 9 Nov 2019 20:56:25 +0100 Subject: [PATCH] - move firmware targets to target-blobs.mk --- make/bootstrap.mk | 15 --------------- make/target-blobs.mk | 26 +++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/make/bootstrap.mk b/make/bootstrap.mk index 77951a73..e0dc123c 100644 --- a/make/bootstrap.mk +++ b/make/bootstrap.mk @@ -15,7 +15,6 @@ BOOTSTRAP += host-preqs # target related BOOTSTRAP += target-dir -BOOTSTRAP += firmware BOOTSTRAP += libs-static BOOTSTRAP += libs-cross @@ -99,18 +98,6 @@ $(HOST_DIR)/bin: $(HOST_DIR) # ----------------------------------------------------------------------------- -firmware: $(TARGET_LIB_DIR)/firmware - -$(TARGET_LIB_DIR)/firmware: | $(TARGET_DIR) - mkdir -p $(@) -ifeq ($(BOXTYPE), coolstream) - $(INSTALL_COPY) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/lib-firmware/. $(@) - $(INSTALL_COPY) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/lib-firmware-dvb/. $(@) -endif - $(INSTALL_COPY) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/lib-firmware-rt/. $(@) - -# ----------------------------------------------------------------------------- - libs-cross: | $(TARGET_DIR) if [ -d $(CROSS_DIR)/$(TARGET)/sys-root/lib/ ]; then \ $(INSTALL_COPY) $(CROSS_DIR)/$(TARGET)/sys-root/lib/*so* $(TARGET_LIB_DIR); \ @@ -150,7 +137,6 @@ endif # ----------------------------------------------------------------------------- # hack to make sure they are always copied -PHONY += $(TARGET_LIB_DIR)/firmware PHONY += $(TARGET_DIR)/var/update # ----------------------------------------------------------------------------- @@ -159,4 +145,3 @@ PHONY += bootstrap PHONY += skeleton PHONY += target-dir PHONY += libs-cross -PHONY += firmware diff --git a/make/target-blobs.mk b/make/target-blobs.mk index 67210adc..279cf81b 100644 --- a/make/target-blobs.mk +++ b/make/target-blobs.mk @@ -6,6 +6,7 @@ #BLOBS_DEPS = kernel # because of depmod blobs: $(BLOBS_DEPS) + make firmware make $(BOXMODEL)-drivers ifeq ($(BOXMODEL), $(filter $(BOXMODEL), hd51 bre2ze4k h7 vusolo4k vuduo4k vuultimo4k vuzero4k vuuno4k vuuno4kse)) make $(BOXMODEL)-libgles @@ -16,6 +17,29 @@ endif # ----------------------------------------------------------------------------- +firmware: firmware-boxmodel firmware-wireless + +firmware-boxmodel: $(SOURCE_DIR)/$(NI-DRIVERS-BIN) | $(TARGET_DIR) + $(call INSTALL_EXIST,$(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/lib-firmware/.,$(TARGET_LIB_DIR)/firmware) + $(call INSTALL_EXIST,$(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/lib-firmware-dvb/.,$(TARGET_LIB_DIR)/firmware) + +ifeq ($(BOXMODEL), nevis) + FIRMWARE-WIRELESS = rt2870.bin + FIRMWARE-WIRELESS += rt3070.bin + FIRMWARE-WIRELESS += rt3071.bin + FIRMWARE-WIRELESS += rtlwifi/rtl8192cufw.bin + FIRMWARE-WIRELESS += rtlwifi/rtl8712u.bin +else + FIRMWARE-WIRELESS = $(shell cd $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/general/firmware-wireless; find * -type f) +endif + +firmware-wireless: $(SOURCE_DIR)/$(NI-DRIVERS-BIN) | $(TARGET_DIR) + for firmware in $(FIRMWARE-WIRELESS); do \ + $(INSTALL_DATA) -D $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/general/firmware-wireless/$$firmware $(TARGET_LIB_DIR)/firmware/$$firmware; \ + done + +# ----------------------------------------------------------------------------- + HD51-DRIVERS_VER = 20180424 HD51-DRIVERS_SOURCE = hd51-drivers-$(KERNEL_VER)-$(HD51-DRIVERS_VER).zip HD51-DRIVERS_URL = http://source.mynonpublic.com/gfutures @@ -72,7 +96,7 @@ apollo-drivers \ shiner-drivers \ kronos-drivers \ kronos_v2-drivers \ -coolstream-drivers: | $(TARGET_DIR) +coolstream-drivers: $(SOURCE_DIR)/$(NI-DRIVERS-BIN) | $(TARGET_DIR) mkdir -p $(TARGET_LIB_DIR) $(INSTALL_COPY) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/lib/. $(TARGET_LIB_DIR) $(INSTALL_COPY) $(SOURCE_DIR)/$(NI-DRIVERS-BIN)/$(DRIVERS-BIN_DIR)/libcoolstream/$(shell echo -n $(NI-FFMPEG_BRANCH) | sed 's,/,-,g')/. $(TARGET_LIB_DIR)