Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a93bdf6f authored by Ethan Chen's avatar Ethan Chen Committed by Luca Stefani
Browse files

build: Allow build-image-kernel-modules to be called from shell

* $(hide) is a make construct, if $(call build-image-kernel-modules ...)
  is run by shelling out within make, this breaks.
* Assume the caller of this function will always hide for it.

Change-Id: I5b56cf9ba76a1f69bcd96966883876381e61983a
parent 4e9fc9c1
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1250,15 +1250,15 @@ endef
# $(4): staging dir
# Depmod requires a well-formed kernel version so 0.0 is used as a placeholder.
define build-image-kernel-modules
    $(hide) rm -rf $(2)/lib/modules
    $(hide) mkdir -p $(2)/lib/modules
    $(hide) cp $(1) $(2)/lib/modules/
    $(hide) rm -rf $(4)
    $(hide) mkdir -p $(4)/lib/modules/0.0/$(3)lib/modules
    $(hide) cp $(1) $(4)/lib/modules/0.0/$(3)lib/modules
    $(hide) $(DEPMOD) -b $(4) 0.0
    $(hide) sed -e 's/\(.*modules.*\):/\/\1:/g' -e 's/ \([^ ]*modules[^ ]*\)/ \/\1/g' $(4)/lib/modules/0.0/modules.dep > $(2)/lib/modules/modules.dep
    $(hide) cp $(4)/lib/modules/0.0/modules.alias $(2)/lib/modules
    rm -rf $(2)/lib/modules
    mkdir -p $(2)/lib/modules
    cp $(1) $(2)/lib/modules/
    rm -rf $(4)
    mkdir -p $(4)/lib/modules/0.0/$(3)lib/modules
    cp $(1) $(4)/lib/modules/0.0/$(3)lib/modules
    $(DEPMOD) -b $(4) 0.0
    sed -e 's/\(.*modules.*\):/\/\1:/g' -e 's/ \([^ ]*modules[^ ]*\)/ \/\1/g' $(4)/lib/modules/0.0/modules.dep > $(2)/lib/modules/modules.dep
    cp $(4)/lib/modules/0.0/modules.alias $(2)/lib/modules
endef

# -----------------------------------------------------------------