Bug 217689 - 6.4.4 breaks module-free builds of Debian kernel packages
Summary: 6.4.4 breaks module-free builds of Debian kernel packages
Status: RESOLVED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Modules (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: other_modules
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-20 14:46 UTC by Brian Lindholm
Modified: 2023-07-23 14:33 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Fix to main Makefile to prevent disabled CONFIG_MODULES from being treated as an error (399 bytes, patch)
2023-07-20 14:46 UTC, Brian Lindholm
Details | Diff

Description Brian Lindholm 2023-07-20 14:46:15 UTC
Created attachment 304672 [details]
Fix to main Makefile to prevent disabled CONFIG_MODULES from being treated as an error

I'm on AMD64 with Debian testing (trixie), where I build my own kernels (with CONFIG_MODULES unset) using "make bindeb-pkg". The build proceeds through 99% of the process, but fails here:

Kernel: arch/x86/boot/bzImage is ready  (#2)
make -f ./Makefile ARCH=x86     KERNELRELEASE=6.4.4-i5 intdeb-pkg
sh ./scripts/package/builddeb
***
*** The present kernel configuration has modules disabled.
*** To use the module feature, please run "make menuconfig" etc.
*** to enable CONFIG_MODULES.
***
make[5]: *** [Makefile:1969: modules_install] Error 1
make[4]: *** [scripts/Makefile.package:150: intdeb-pkg] Error 2
make[3]: *** [Makefile:1657: intdeb-pkg] Error 2
make[2]: *** [debian/rules:16: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:139: bindeb-pkg] Error 2
make: *** [Makefile:1657: bindeb-pkg] Error 2

6.3.13 contained the same error, but I "fixed" that by moving to 6.4.3.  But alas, 6.4.4 now has the same issue.

I worked around the issue by changing "exit 1" to "exit 0" in the main Makefile (at "modules module_install", per the attached patch), but I don't know if this is a true fix or something that simply happens to work for my particular configuration.
Comment 1 Brian Lindholm 2023-07-20 22:24:39 UTC
The following two commits are likely relevant:

commit a8c2d8d32421877cca439245f77bfbbf7cef21c6
Author: Masahiro Yamada <masahiroy@kernel.org>
kbuild: deb-pkg: remove the CONFIG_MODULES check in buildeb
[ Upstream commit 1240dabe8d58b4eff09e7edf1560da0360f997aa ]

commit 6061ac50f1e0436fd8329dc9ce6762862924a014
Author: Josh Triplett <josh@joshtriplett.org>
kbuild: builddeb: always make modules_install, to install modules.builtin*
[ Upstream commit 4243afdb932677a03770753be8c54b3190a512e8 ]
Comment 2 Bagas Sanjaya 2023-07-21 03:08:59 UTC
(In reply to Brian Lindholm from comment #1)
> The following two commits are likely relevant:
> 
> commit a8c2d8d32421877cca439245f77bfbbf7cef21c6
> Author: Masahiro Yamada <masahiroy@kernel.org>
> kbuild: deb-pkg: remove the CONFIG_MODULES check in buildeb
> [ Upstream commit 1240dabe8d58b4eff09e7edf1560da0360f997aa ]
> 
> commit 6061ac50f1e0436fd8329dc9ce6762862924a014
> Author: Josh Triplett <josh@joshtriplett.org>
> kbuild: builddeb: always make modules_install, to install modules.builtin*
> [ Upstream commit 4243afdb932677a03770753be8c54b3190a512e8 ]

Does bindeb-pkg works with both commits reverted?
Comment 3 Brian Lindholm 2023-07-21 13:57:07 UTC
(In reply to Bagas Sanjaya from comment #2)
> Does bindeb-pkg works with both commits reverted?

Yes.  Just tried it.  It builds a full set of Debian packages without issue.
Comment 4 Brian Lindholm 2023-07-23 03:46:53 UTC
According to LKML message https://lkml.org/lkml/2023/7/20/1552, upstream commit 8ae071fc216a25f4f797f33c56857f4dd6b4408e fixes the issue.  When the commit is applied to 6.4.4, "make bindeb-pkg" works correctly.  This commit has been scheduled for 6.4.5.  I will close out the case when 6.4.5 is released.
Comment 5 Brian Lindholm 2023-07-23 14:33:10 UTC
6.4.5 is released and builds Debian modules with CONFIG_MODULES=n properly.  Issue has been resolved.

Note You need to log in before you can comment on or make changes to this bug.