When a custom rootfs is being used, there is no point
in running various installation operations (such as depmod)
on the host file system.

Signed-off-by: Eliad Peller <[email protected]>
---
I assume here KLIB is only used when some cross-compilation is
used, so local installation probably won't follow.
I'm not sure this is correct, though...
is there a better way to detect such scenario (without
false positives)?

 backport/Makefile      | 4 +++-
 backport/Makefile.real | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/backport/Makefile b/backport/Makefile
index ca69f41..3165c0e 100644
--- a/backport/Makefile
+++ b/backport/Makefile
@@ -11,16 +11,18 @@ BACKPORT_PWD := $(shell pwd)
 KMODDIR ?= updates
 ifneq ($(origin KLIB), undefined)
 KMODPATH_ARG := "INSTALL_MOD_PATH=$(KLIB)"
+ROOTFS_DIR := $(KLIB)
 else
 KLIB := /lib/modules/$(shell uname -r)/
 KMODPATH_ARG :=
+ROOTFS_DIR :=
 endif
 KLIB_BUILD ?= $(KLIB)/build/
 KERNEL_CONFIG := $(KLIB_BUILD)/.config
 KERNEL_MAKEFILE := $(KLIB_BUILD)/Makefile
 CONFIG_MD5 := $(shell md5sum $(KERNEL_CONFIG) 2>/dev/null | sed 's/\s.*//')
 
-export KLIB KLIB_BUILD BACKPORT_PWD KMODDIR KMODPATH_ARG
+export KLIB KLIB_BUILD BACKPORT_PWD KMODDIR KMODPATH_ARG ROOTFS_DIR
 
 # disable built-in rules for this file
 .SUFFIXES:
diff --git a/backport/Makefile.real b/backport/Makefile.real
index c09663c..9756c32 100644
--- a/backport/Makefile.real
+++ b/backport/Makefile.real
@@ -87,12 +87,14 @@ install: modules
        @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_PWD)                     \
                INSTALL_MOD_DIR=$(KMODDIR) $(KMODPATH_ARG)              \
                modules_install
+ifeq ($(ROOTFS_DIR),)
        @./scripts/blacklist.sh $(KLIB)/ $(KLIB)/$(KMODDIR)
        @./scripts/compress_modules.sh $(KLIB)/$(KMODDIR)
        @./scripts/check_depmod.sh
        @./scripts/backport_firmware_install.sh
        @/sbin/depmod -a
        @./scripts/update-initramfs.sh $(KLIB)
+endif
        @echo
        @echo Your backported driver modules should be installed now.
        @echo Reboot.
-- 
1.8.3.rc1.35.g9b79519

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to