Skip to contentSkip to conversation

kconfig: add 'option modules' to allow tristate options to become m

PATCH In review Masahiro Yamada 2 participants 4 messages May 18, 2020 – May 20, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 kconfig: add 'option modules' to allow tristate options to become m

Since commit 18895514dc5e ("kconfig: update to v3.18-rc6"), tristate symbols cannot become 'm'.

In old days of Linux, CONFIG_MODULES was the special hard-coded in Kconfig.

The current Kconfig does not know which option is it. You need to specify 'option modules' to teach Kconfig that it is the module support switch.

Add 'option modules' to revive the module builds.

Fixes 18895514dc5e ("kconfig: update to v3.18-rc6")

---

The module feature has been broken for 8 years,
and nobody has pointed it out...

 common/Kconfig | 1 +
 1 file changed, 1 insertion(+)
common/Kconfig +1 -0
index 460ac487c..7a99d20bf 100644
@@ -316,6 +316,7 @@ config MODULES
 	depends on HAS_MODULES
 	depends on EXPERIMENTAL
 	bool "module support"
+	option modules
 	help
 	  This option enables support for loadable modules via insmod. Module
 	  support is quite experimental at the moment. There is no convenient
Signature · 7 lines
2.25.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 2/2 kbuild: build modules by 'make'

In Linux, 'make' and 'make all' work equivalently; it builds both vmlinux and modules.

In barebox, strangely, 'make all' builds both barebox and modules, but 'make' builds only barebox because KBUILD_MODULES is unset.

The check for 'ifeq ($(MAKECMDGOALS),)' is missing since the day-one.

Fixes b02e0966412c ("add additional linking stage for modules")

---

 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Makefile +4 -0
index d477494d6..9f30fafdd 100644
@@ -533,6 +533,10 @@ ifneq ($(filter all _all modules,$(MAKECMDGOALS)),)
   KBUILD_MODULES := 1
 endif
 
+ifeq ($(MAKECMDGOALS),)
+  KBUILD_MODULES := 1
+endif
+
 export KBUILD_MODULES KBUILD_BUILTIN
 
 ifdef need-config
Signature · 7 lines
2.25.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw
In reply to Masahiro Yamada
Quoted 6 lines · Masahiro Yamada

Since commit 18895514dc5e ("kconfig: update to v3.18-rc6"), tristate symbols cannot become 'm'.

In old days of Linux, CONFIG_MODULES was the special hard-coded in Kconfig.

Please reword this paragraph as follows:

In old days of Linux, CONFIG_MODULES was the special option hard-coded in Kconfig.

Quoted 32 lines

The current Kconfig does not know which option is it. You need to specify 'option modules' to teach Kconfig that it is the module support switch.

Add 'option modules' to revive the module builds.

Fixes 18895514dc5e ("kconfig: update to v3.18-rc6")

---

The module feature has been broken for 8 years,
and nobody has pointed it out...

 common/Kconfig | 1 +
 1 file changed, 1 insertion(+)
common/Kconfig +1 -1
index 460ac487c..7a99d20bf 100644
@@ -316,6 +316,7 @@ config MODULES
        depends on HAS_MODULES
        depends on EXPERIMENTAL
        bool "module support"
+       option modules
        help
          This option enables support for loadable modules via insmod. Module
          support is quite experimental at the moment. There is no convenient
--

2.25.1

Signature · 7 lines
Best Regards
Masahiro Yamada

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw
Quoted 9 lines · Masahiro Yamada
Quoted 6 lines · Masahiro Yamada

Since commit 18895514dc5e ("kconfig: update to v3.18-rc6"), tristate symbols cannot become 'm'.

In old days of Linux, CONFIG_MODULES was the special hard-coded in Kconfig.

Quoted 5 lines

Please reword this paragraph as follows:

In old days of Linux, CONFIG_MODULES was the special option hard-coded in Kconfig.

Reworded and applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox