Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit e0b668b

Browse files
committed
Merge tag 'kbuild-fixes-v6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Remove the executable bit from installed DTB files - Escape $ in subshell execution in the debian-orig target - Fix RPM builds with CONFIG_MODULES=n - Fix xconfig with the O= option - Fix scripts_gdb with the O= option * tag 'kbuild-fixes-v6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: scripts/gdb: bring the "abspath" back kbuild: Use $(obj)/%.cc to fix host C++ module builds kbuild: rpm-pkg: fix build error with CONFIG_MODULES=n kbuild: Fix build target deb-pkg: ln: failed to create hard link kbuild: doc: Update default INSTALL_MOD_DIR from extra to updates kbuild: Install dtb files as 0644 in Makefile.dtbinst
2 parents 7693272 + a11aaf6 commit e0b668b

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

Documentation/kbuild/modules.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ executed to make module versioning work.
128128

129129
modules_install
130130
Install the external module(s). The default location is
131-
/lib/modules/<kernel_release>/extra/, but a prefix may
131+
/lib/modules/<kernel_release>/updates/, but a prefix may
132132
be added with INSTALL_MOD_PATH (discussed in section 5).
133133

134134
clean
@@ -417,7 +417,7 @@ directory:
417417

418418
And external modules are installed in:
419419

420-
/lib/modules/$(KERNELRELEASE)/extra/
420+
/lib/modules/$(KERNELRELEASE)/updates/
421421

422422
5.1 INSTALL_MOD_PATH
423423
--------------------
@@ -438,10 +438,10 @@ And external modules are installed in:
438438
-------------------
439439

440440
External modules are by default installed to a directory under
441-
/lib/modules/$(KERNELRELEASE)/extra/, but you may wish to
441+
/lib/modules/$(KERNELRELEASE)/updates/, but you may wish to
442442
locate modules for a specific functionality in a separate
443443
directory. For this purpose, use INSTALL_MOD_DIR to specify an
444-
alternative name to "extra."::
444+
alternative name to "updates."::
445445

446446
$ make INSTALL_MOD_DIR=gandalf -C $KDIR \
447447
M=$PWD modules_install

scripts/Makefile.dtbinst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ include $(srctree)/scripts/Kbuild.include
1717
dst := $(INSTALL_DTBS_PATH)
1818

1919
quiet_cmd_dtb_install = INSTALL $@
20-
cmd_dtb_install = install -D $< $@
20+
cmd_dtb_install = install -D -m 0644 $< $@
2121

2222
$(dst)/%: $(obj)/%
2323
$(call cmd,dtb_install)

scripts/Makefile.host

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ $(call multi_depend, $(host-cxxmulti), , -objs -cxxobjs)
146146
# Create .o file from a single .cc (C++) file
147147
quiet_cmd_host-cxxobjs = HOSTCXX $@
148148
cmd_host-cxxobjs = $(HOSTCXX) $(hostcxx_flags) -c -o $@ $<
149-
$(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE
149+
$(host-cxxobjs): $(obj)/%.o: $(obj)/%.cc FORCE
150150
$(call if_changed_dep,host-cxxobjs)
151151

152152
# Create executable from a single Rust crate (which may consist of

scripts/Makefile.package

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ debian-orig: private version = $(shell dpkg-parsechangelog -S Version | sed 's/-
103103
debian-orig: private orig-name = $(source)_$(version).orig.tar$(debian-orig-suffix)
104104
debian-orig: mkdebian-opts = --need-source
105105
debian-orig: linux.tar$(debian-orig-suffix) debian
106-
$(Q)if [ "$(df --output=target .. 2>/dev/null)" = "$(df --output=target $< 2>/dev/null)" ]; then \
106+
$(Q)if [ "$$(df --output=target .. 2>/dev/null)" = "$$(df --output=target $< 2>/dev/null)" ]; then \
107107
ln -f $< ../$(orig-name); \
108108
else \
109109
cp $< ../$(orig-name); \

scripts/gdb/linux/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ifdef building_out_of_srctree
55
symlinks := $(patsubst $(src)/%,%,$(wildcard $(src)/*.py))
66

77
quiet_cmd_symlink = SYMLINK $@
8-
cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(src)/%,$@) $@
8+
cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(src))/%,$@) $@
99

1010
always-y += $(symlinks)
1111
$(addprefix $(obj)/, $(symlinks)): FORCE

scripts/package/kernel.spec

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ patch -p1 < %{SOURCE2}
5757
%install
5858
mkdir -p %{buildroot}/lib/modules/%{KERNELRELEASE}
5959
cp $(%{make} %{makeflags} -s image_name) %{buildroot}/lib/modules/%{KERNELRELEASE}/vmlinuz
60-
%{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} modules_install
60+
# DEPMOD=true makes depmod no-op. We do not package depmod-generated files.
61+
%{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} DEPMOD=true modules_install
6162
%{make} %{makeflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
6263
cp System.map %{buildroot}/lib/modules/%{KERNELRELEASE}
6364
cp .config %{buildroot}/lib/modules/%{KERNELRELEASE}/config
@@ -70,10 +71,7 @@ ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEA
7071
%endif
7172

7273
{
73-
for x in System.map config kernel modules.builtin \
74-
modules.builtin.modinfo modules.order vmlinuz; do
75-
echo "/lib/modules/%{KERNELRELEASE}/${x}"
76-
done
74+
echo "/lib/modules/%{KERNELRELEASE}"
7775

7876
for x in alias alias.bin builtin.alias.bin builtin.bin dep dep.bin \
7977
devname softdep symbols symbols.bin; do

0 commit comments

Comments
 (0)