# --- T2-COPYRIGHT-BEGIN --- # t2/architecture/avr32/package/*/top-level-kmod.patch # Copyright (C) 2023 - 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Having all all in-kernel modules in one top-level kernel/ directory is a bit superflous. Let's just install all sub-systems into the top-level directory to shorten all the pathes for readability. --- linux-4.9/Makefile.vanilla 2024-02-06 14:36:55.709224668 +0100 +++ linux-4.9/Makefile 2024-02-06 14:49:42.520285930 +0100 @@ -1272,9 +1272,9 @@ PHONY += _modinst_ _modinst_: - @rm -rf $(MODLIB)/kernel + @rm -rf $(MODLIB) @rm -f $(MODLIB)/source - @mkdir -p $(MODLIB)/kernel + @mkdir -p $(MODLIB) @ln -s `cd $(srctree) && /bin/pwd` $(MODLIB)/source @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ rm -f $(MODLIB)/build ; \ --- linux-4.9/scripts/Makefile.modinst.vanilla 2024-02-06 14:33:39.070208958 +0100 +++ linux-4.9/scripts/Makefile.modinst 2024-02-06 14:33:57.874210460 +0100 @@ -29,7 +29,7 @@ INSTALL_MOD_DIR ?= extra ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D)) -modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D)) +modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),$(@D)) $(modules): $(call cmd,modules_install,$(MODLIB)/$(modinst_dir))