Browse Source

- introduce LINUX_RUN_DEPMOD macro

master
vanhofen 4 years ago
parent
commit
930957ab99
  1. 8
      make/environment-linux.mk
  2. 8
      make/linux-drivers.mk
  3. 21
      make/linux-kernel.mk
  4. 10
      make/target-blobs.mk

8
make/environment-linux.mk

@ -245,4 +245,12 @@ endif
# -----------------------------------------------------------------------------
define LINUX_RUN_DEPMOD
if test -d $(TARGET_modulesdir) && grep -q "CONFIG_MODULES=y" $(KERNEL_OBJ_DIR)/.config; then \
PATH=$(PATH):/sbin:/usr/sbin depmod -a -b $(TARGET_DIR) $(KERNEL_VER); \
fi
endef
# -----------------------------------------------------------------------------
KERNEL_TARBALL = $(BUILD_DIR)/linux-$(KERNEL_VERSION).tar

8
make/linux-drivers.mk

@ -15,7 +15,7 @@ rtl8192eu: kernel-$(BOXTYPE) | $(TARGET_DIR)
$(CHDIR)/$(RTL8192EU_DIR); \
$(MAKE) $(KERNEL_MAKE_VARS); \
$(INSTALL_DATA) 8192eu.ko $(TARGET_modulesdir)/kernel/drivers/net/wireless/
make depmod
$(LINUX_RUN_DEPMOD)
$(REMOVE)/$(RTL8192EU_DIR)
$(TOUCH)
@ -36,7 +36,7 @@ rtl8812au: kernel-$(BOXTYPE) $(DL_DIR)/$(RTL8812AU_SOURCE) | $(TARGET_DIR)
$(APPLY_PATCHES); \
$(MAKE) $(KERNEL_MAKE_VARS); \
$(INSTALL_DATA) 8812au.ko $(TARGET_modulesdir)/kernel/drivers/net/wireless/
make depmod
$(LINUX_RUN_DEPMOD)
$(REMOVE)/$(RTL8812AU_DIR)
$(TOUCH)
@ -57,7 +57,7 @@ rtl8822bu: kernel-$(BOXTYPE) $(DL_DIR)/$(RTL8822BU_SOURCE) | $(TARGET_DIR)
$(APPLY_PATCHES); \
$(MAKE) $(KERNEL_MAKE_VARS); \
$(INSTALL_DATA) 88x2bu.ko $(TARGET_modulesdir)/kernel/drivers/net/wireless/
make depmod
$(LINUX_RUN_DEPMOD)
$(REMOVE)/$(RTL8822BU_DIR)
$(TOUCH)
@ -88,6 +88,6 @@ hd6x-mali-drivers: kernel-$(BOXTYPE) hd6x-libgles-headers $(DL_DIR)/$(HD6x_MALI_
$(APPLY_PATCHES); \
$(MAKE) -C $(KERNEL_OBJ_DIR) $(KERNEL_MAKE_VARS) $(HD6x_MALI_DRIVERS_MAKE_VARS); \
$(MAKE) -C $(KERNEL_OBJ_DIR) $(KERNEL_MAKE_VARS) $(HD6x_MALI_DRIVERS_MAKE_VARS) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
make depmod
$(LINUX_RUN_DEPMOD)
$(REMOVE)/$(HD6x_MALI_DRIVERS_DIR)
$(TOUCH)

21
make/linux-kernel.mk

@ -298,7 +298,10 @@ kernel-modules-coolstream-hd1: kernel-coolstream
$(TARGET_OBJCOPY) --strip-unneeded $(KERNEL_modulesdir)/$$module $(TARGET_modulesdir)/$$module; \
done;
rm -f $(TARGET_modulesdir)/usb-storage.ko # already builtin
make depmod
$(LINUX_RUN_DEPMOD)
mv $(TARGET_modulesdir)/modules.dep $(TARGET_modulesdir)/.modules.dep
rm $(TARGET_modulesdir)/modules.*
mv $(TARGET_modulesdir)/.modules.dep $(TARGET_modulesdir)/modules.dep
$(TOUCH)
kernel-modules-coolstream-hd2: kernel-coolstream
@ -306,7 +309,7 @@ kernel-modules-coolstream-hd2: kernel-coolstream
$(INSTALL_COPY) $(KERNEL_modulesdir)/kernel $(TARGET_modulesdir)
$(INSTALL_DATA) $(KERNEL_modulesdir)/modules.builtin $(TARGET_modulesdir)
$(INSTALL_DATA) $(KERNEL_modulesdir)/modules.order $(TARGET_modulesdir)
make depmod
$(LINUX_RUN_DEPMOD)
make rtl8192eu
$(TOUCH)
@ -315,7 +318,7 @@ kernel-modules-armbox: kernel-armbox
$(INSTALL_COPY) $(KERNEL_modulesdir)/kernel $(TARGET_modulesdir)
$(INSTALL_DATA) $(KERNEL_modulesdir)/modules.builtin $(TARGET_modulesdir)
$(INSTALL_DATA) $(KERNEL_modulesdir)/modules.order $(TARGET_modulesdir)
make depmod
$(LINUX_RUN_DEPMOD)
ifeq ($(BOXSERIES),hd5x hd6x)
make rtl8192eu
make rtl8812au
@ -331,7 +334,7 @@ kernel-modules-mipsbox: kernel-mipsbox
$(INSTALL_COPY) $(KERNEL_modulesdir)/kernel $(TARGET_modulesdir)
$(INSTALL_DATA) $(KERNEL_modulesdir)/modules.builtin $(TARGET_modulesdir)
$(INSTALL_DATA) $(KERNEL_modulesdir)/modules.order $(TARGET_modulesdir)
make depmod
$(LINUX_RUN_DEPMOD)
$(TOUCH)
# -----------------------------------------------------------------------------
@ -342,16 +345,6 @@ vmlinuz-initrd: $(DL_DIR)/$(VMLINUZ_INITRD_SOURCE)
# -----------------------------------------------------------------------------
depmod:
PATH=$(PATH):/sbin:/usr/sbin depmod -b $(TARGET_DIR) $(KERNEL_VERSION)
ifeq ($(BOXSERIES),hd1)
mv $(TARGET_modulesdir)/modules.dep $(TARGET_modulesdir)/.modules.dep
rm $(TARGET_modulesdir)/modules.*
mv $(TARGET_modulesdir)/.modules.dep $(TARGET_modulesdir)/modules.dep
endif
# -----------------------------------------------------------------------------
kernel-headers: $(KERNEL_HEADERS_DIR)
$(KERNEL_HEADERS_DIR): kernel.do_prepare
$(MAKE) -C $(BUILD_DIR)/$(KERNEL_DIR) $(KERNEL_MAKE_VARS) headers_install

10
make/target-blobs.mk

@ -3,7 +3,7 @@
#
# -----------------------------------------------------------------------------
#BLOBS_DEPENDENCIES = kernel # because of depmod
#BLOBS_DEPENDENCIES = kernel # because of $(LINUX_RUN_DEPMOD)
blobs: $(BLOBS_DEPENDENCIES)
$(MAKE) firmware
@ -155,7 +155,7 @@ endif
ifeq ($(BOXMODEL),nevis)
ln -sf $(KERNEL_VERSION) $(TARGET_modulesdir)-$(BOXMODEL)
endif
make depmod
$(LINUX_RUN_DEPMOD)
$(TOUCH)
hd51-drivers \
@ -163,7 +163,7 @@ bre2ze4k-drivers \
h7-drivers: $(DL_DIR)/$(BOXMODEL_DRIVERS_SOURCE) | $(TARGET_DIR)
mkdir -p $(TARGET_modulesdir)/extra
unzip -o $(DL_DIR)/$(BOXMODEL_DRIVERS_SOURCE) -d $(TARGET_modulesdir)/extra
make depmod
$(LINUX_RUN_DEPMOD)
$(TOUCH)
hd60-drivers \
@ -172,7 +172,7 @@ hd61-drivers: $(DL_DIR)/$(BOXMODEL_DRIVERS_SOURCE) | $(TARGET_DIR)
unzip -o $(DL_DIR)/$(BOXMODEL_DRIVERS_SOURCE) -d $(TARGET_modulesdir)/extra
rm -f $(TARGET_modulesdir)/extra/hi_play.ko
mv $(TARGET_modulesdir)/extra/turnoff_power $(TARGET_bindir)
make depmod
$(LINUX_RUN_DEPMOD)
$(TOUCH)
vusolo4k-drivers \
@ -186,7 +186,7 @@ vuduo-drivers \
vuplus-drivers: $(DL_DIR)/$(BOXMODEL_DRIVERS_SOURCE) | $(TARGET_DIR)
mkdir -p $(TARGET_modulesdir)/extra
tar -xf $(DL_DIR)/$(BOXMODEL_DRIVERS_SOURCE) -C $(TARGET_modulesdir)/extra
make depmod
$(LINUX_RUN_DEPMOD)
$(TOUCH)
# -----------------------------------------------------------------------------

Loading…
Cancel
Save