# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: architecture/avr32/package/*/top-level-kmod.patch # Copyright (C) 2023 - 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-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))