Skip to contentSkip to conversation

package/batman-adv: fix compile with BR2_PACKAGE_BATMAN_ADV_BATMAN_V disabled

PATCH New Peter Seiderer 3 participants 11 messages Mar 16, 2021 – Mar 23, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/batman-adv: fix compile with BR2_PACKAGE_BATMAN_ADV_BATMAN_V disabled

Taking a deeper look at the configure script gen-compat-autoconf.sh reveals that the batman feature options must be explicitly set to 'y' or 'n' to work as expected.

Fixes:

ERROR: modpost: "batadv_v_mesh_free" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!
ERROR: modpost: "batadv_v_mesh_init" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!
ERROR: modpost: "batadv_v_hardif_init" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!
ERROR: modpost: "batadv_v_init" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!

---
Notes:
- the previous patch was tested against an RPi4 linux kernel already enabling the build-in batman-adv module inlcusive batman-v, the defconfig given by Christian (enhanced by BR2_LINUX_KERNEL/BR2_LINUX_KERNEL_LATEST_VERSION/ BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFI) uses one with build-in batman-adv disabled

---
 package/batman-adv/batman-adv.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/batman-adv/batman-adv.mk +3 -3
index bfa573643d..2de92d6543 100644
@@ -24,9 +24,9 @@ BATMAN_ADV_MODULE_MAKE_OPTS = \
 	CONFIG_BATMAN_ADV_BLA=y \
 	CONFIG_BATMAN_ADV_DAT=y \
 	CONFIG_BATMAN_ADV_MCAST=y \
-	$(if $(BR2_PACKAGE_BATMAN_ADV_BATMAN_V), CONFIG_BATMAN_ADV_BATMAN_V=y) \
-	$(if $(BR2_PACKAGE_BATMAN_ADV_DEBUG), CONFIG_BATMAN_ADV_DEBUG=y) \
-	$(if $(BR2_PACKAGE_BATMAN_ADV_NC), CONFIG_BATMAN_ADV_NC=y)
+	CONFIG_BATMAN_ADV_BATMAN_V=$(if $(BR2_PACKAGE_BATMAN_ADV_BATMAN_V),y,n) \
+	CONFIG_BATMAN_ADV_DEBUG=$(if $(BR2_PACKAGE_BATMAN_ADV_DEBUG),y,n) \
+	CONFIG_BATMAN_ADV_NC=$(if $(BR2_PACKAGE_BATMAN_ADV_NC),y,n)
 
 BATMAN_ADV_MODULE_SUBDIRS = net/batman-adv
 
Signature · 1 line
2.30.1
#1 lore raw

PATCH 2/3 package/batman-adv: needs linux kernel libcrc32c support

Fixes:

ERROR: modpost: "crc32c" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!

---
 package/batman-adv/batman-adv.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/batman-adv/batman-adv.mk +4 -0
index 2de92d6543..194951a712 100644
@@ -34,5 +34,9 @@ define BATMAN_ADV_CONFIGURE_CMDS
 	$(BATMAN_ADV_MODULE_MAKE_OPTS) $(@D)/gen-compat-autoconf.sh $(@D)/compat-autoconf.h
 endef
 
+define BATMAN_ADV_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_LIBCRC32C)
+endef
+
 $(eval $(kernel-module))
 $(eval $(generic-package))
Signature · 1 line
2.30.1
#2 lore raw

PATCH 2/3 package/batman-adv: needs linux kernel libcrc32c support

Peter, All,

On 2021-03-16 19:14 +0100, Peter Seiderer spake thusly:

Quoted 5 lines

Fixes:

ERROR: modpost: "crc32c" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 21 lines
---
 package/batman-adv/batman-adv.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/batman-adv/batman-adv.mk +4 -0
index 2de92d6543..194951a712 100644
@@ -34,5 +34,9 @@ define BATMAN_ADV_CONFIGURE_CMDS
 	$(BATMAN_ADV_MODULE_MAKE_OPTS) $(@D)/gen-compat-autoconf.sh $(@D)/compat-autoconf.h
 endef
 
+define BATMAN_ADV_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_LIBCRC32C)
+endef
+
 $(eval $(kernel-module))
 $(eval $(generic-package))
Signature · 1 line
2.30.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 2/3 package/batman-adv: needs linux kernel libcrc32c support

In reply to Peter Seiderer
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Seiderer <[email protected]> writes:

Fixes:
ERROR: modpost: "crc32c" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!

Committed to 2020.11.x and 2021.02.x, thanks. I did NOT apply it to 2020.02.x as we don't have the _LINUX_CONFIG_FIXUPS infrastructure there.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 3/3 package/batman-adv: add note about linux mainline kernel module alternative

In reply to Peter Seiderer

Since version 2.6.38 batman-adv is integreated into the linux mainline kernel ([1], [2]) so add a note about it in the Config.in help text.

[1] https://kernelnewbies.org/Linux_2_6_38
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6c8fea29769d998d94fcec9b9f14d4b52b349d3

---
 package/batman-adv/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/batman-adv/Config.in +2 -0
index 9d3d7967b9..eae94fd130 100644
@@ -6,6 +6,8 @@ config BR2_PACKAGE_BATMAN_ADV
 	depends on BR2_LINUX_KERNEL
 	help
 	  batman-adv mesh networking kernel module
+	  Note: batman-adv is part of the linux mainline
+	  kernel since version 2.6.38
 
 	  https://www.open-mesh.org/projects/batman-adv/
 
Signature · 1 line
2.30.1
#5 lore raw

PATCH 3/3 package/batman-adv: add note about linux mainline kernel module alternative

Peter, All,

On 2021-03-16 19:14 +0100, Peter Seiderer spake thusly:

Quoted 2 lines

Since version 2.6.38 batman-adv is integreated into the linux mainline kernel ([1], [2]) so add a note about it in the Config.in help text.

We do not wupport building kernels before 3.0 (and even that is 10 years old now, so I'm not sure how solid it would be).

As such, does it make sense to have the out-of-tree B.A.T.M.A.N Adv kernel module at all?

Note also that the versionwe have is 2019.3, two years old, and the in-tree version for recent kernels is probably in better shape than what we carry.

Shouldn't we drop this package, now?

Quoted 4 lines

[1] https://kernelnewbies.org/Linux_2_6_38
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6c8fea29769d998d94fcec9b9f14d4b52b349d3

In the meantime: applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 20 lines
---
 package/batman-adv/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/batman-adv/Config.in +2 -0
index 9d3d7967b9..eae94fd130 100644
@@ -6,6 +6,8 @@ config BR2_PACKAGE_BATMAN_ADV
 	depends on BR2_LINUX_KERNEL
 	help
 	  batman-adv mesh networking kernel module
+	  Note: batman-adv is part of the linux mainline
+	  kernel since version 2.6.38
 
 	  https://www.open-mesh.org/projects/batman-adv/
 
Signature · 1 line
2.30.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 3/3 package/batman-adv: add note about linux mainline kernel module alternative

Hello Yann,

Quoted 9 lines · Yann E. MORIN

Peter, All,

On 2021-03-16 19:14 +0100, Peter Seiderer spake thusly:

Quoted 2 lines

Since version 2.6.38 batman-adv is integreated into the linux mainline kernel ([1], [2]) so add a note about it in the Config.in help text.

We do not wupport building kernels before 3.0 (and even that is 10 years old now, so I'm not sure how solid it would be).

Quoted 6 lines

As such, does it make sense to have the out-of-tree B.A.T.M.A.N Adv kernel module at all?

Note also that the versionwe have is 2019.3, two years old, and the in-tree version for recent kernels is probably in better shape than what we carry.

See

	https://patchwork.ozlabs.org/project/buildroot/patch/20210311210804.9616-2-ps.report at gmx.net/

for update to 2021.0

Quoted 2 lines

Shouldn't we drop this package, now?

Would suspect the use case/reason why batman-adv is still provided as out-of-tree module is to enable up-to-date batman with older kernels...as the 2021.0 release announcement mentions compatibility with 4.4 to 5.11 (see [3])...

Regards,
Peter

[3] https://www.open-mesh.org/news/100

Quoted 32 lines
Quoted 5 lines

[1] https://kernelnewbies.org/Linux_2_6_38
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6c8fea29769d998d94fcec9b9f14d4b52b349d3

In the meantime: applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 20 lines
---
 package/batman-adv/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/batman-adv/Config.in +2 -1
index 9d3d7967b9..eae94fd130 100644
@@ -6,6 +6,8 @@ config BR2_PACKAGE_BATMAN_ADV
 	depends on BR2_LINUX_KERNEL
 	help
 	  batman-adv mesh networking kernel module
+	  Note: batman-adv is part of the linux mainline
+	  kernel since version 2.6.38
 
 	  https://www.open-mesh.org/projects/batman-adv/
 
--

2.30.1

#7 lore raw

PATCH 3/3 package/batman-adv: add note about linux mainline kernel module alternative

Peter, All,

On 2021-03-16 21:53 +0100, Peter Seiderer spake thusly:

Quoted 11 lines · Yann E. MORIN
Quoted 7 lines

Peter, All,
On 2021-03-16 19:14 +0100, Peter Seiderer spake thusly:

Quoted 2 lines

Since version 2.6.38 batman-adv is integreated into the linux mainline kernel ([1], [2]) so add a note about it in the Config.in help text.

Note also that the versionwe have is 2019.3, two years old, and the in-tree version for recent kernels is probably in better shape than what we carry.

See

	https://patchwork.ozlabs.org/project/buildroot/patch/20210311210804.9616-2-ps.report at gmx.net/

for update to 2021.0

Hehe... :-)

Quoted 5 lines
Quoted 1 line

Shouldn't we drop this package, now?

Would suspect the use case/reason why batman-adv is still provided as out-of-tree module is to enable up-to-date batman with older kernels...as the 2021.0 release announcement mentions compatibility with 4.4 to 5.11 (see [3])...

OK, that make sense. Thanks.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH 3/3 package/batman-adv: add note about linux mainline kernel module alternative

In reply to Peter Seiderer
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Seiderer <[email protected]> writes:

Since version 2.6.38 batman-adv is integreated into the linux mainline kernel ([1], [2]) so add a note about it in the Config.in help text.

[1] https://kernelnewbies.org/Linux_2_6_38
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6c8fea29769d998d94fcec9b9f14d4b52b349d3

Committed to 2020.02.x, 2020.11.x and 2021.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH 1/3 package/batman-adv: fix compile with BR2_PACKAGE_BATMAN_ADV_BATMAN_V disabled

In reply to Peter Seiderer

Peter, All,

On 2021-03-16 19:14 +0100, Peter Seiderer spake thusly:

Quoted 11 lines

Taking a deeper look at the configure script gen-compat-autoconf.sh reveals that the batman feature options must be explicitly set to 'y' or 'n' to work as expected.

Fixes:

ERROR: modpost: "batadv_v_mesh_free" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!
ERROR: modpost: "batadv_v_mesh_init" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!
ERROR: modpost: "batadv_v_hardif_init" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!
ERROR: modpost: "batadv_v_init" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!

Quoted 6 lines

---
Notes:
- the previous patch was tested against an RPi4 linux kernel already enabling the build-in batman-adv module inlcusive batman-v, the defconfig

I've added this part of the note in the commit log.

Quoted 3 lines

given by Christian (enhanced by BR2_LINUX_KERNEL/BR2_LINUX_KERNEL_LATEST_VERSION/ BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFI) uses one with build-in batman-adv disabled

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 24 lines
---
 package/batman-adv/batman-adv.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/batman-adv/batman-adv.mk +3 -3
index bfa573643d..2de92d6543 100644
@@ -24,9 +24,9 @@ BATMAN_ADV_MODULE_MAKE_OPTS = \
 	CONFIG_BATMAN_ADV_BLA=y \
 	CONFIG_BATMAN_ADV_DAT=y \
 	CONFIG_BATMAN_ADV_MCAST=y \
-	$(if $(BR2_PACKAGE_BATMAN_ADV_BATMAN_V), CONFIG_BATMAN_ADV_BATMAN_V=y) \
-	$(if $(BR2_PACKAGE_BATMAN_ADV_DEBUG), CONFIG_BATMAN_ADV_DEBUG=y) \
-	$(if $(BR2_PACKAGE_BATMAN_ADV_NC), CONFIG_BATMAN_ADV_NC=y)
+	CONFIG_BATMAN_ADV_BATMAN_V=$(if $(BR2_PACKAGE_BATMAN_ADV_BATMAN_V),y,n) \
+	CONFIG_BATMAN_ADV_DEBUG=$(if $(BR2_PACKAGE_BATMAN_ADV_DEBUG),y,n) \
+	CONFIG_BATMAN_ADV_NC=$(if $(BR2_PACKAGE_BATMAN_ADV_NC),y,n)
 
 BATMAN_ADV_MODULE_SUBDIRS = net/batman-adv
 
Signature · 1 line
2.30.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#10 lore raw

PATCH 1/3 package/batman-adv: fix compile with BR2_PACKAGE_BATMAN_ADV_BATMAN_V disabled

In reply to Peter Seiderer
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Seiderer <[email protected]> writes:

Taking a deeper look at the configure script gen-compat-autoconf.sh reveals that the batman feature options must be explicitly set to 'y' or 'n' to work as expected.

Fixes:

ERROR: modpost: "batadv_v_mesh_free" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!
ERROR: modpost: "batadv_v_mesh_init" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!
ERROR: modpost: "batadv_v_hardif_init" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!
ERROR: modpost: "batadv_v_init" [.../build/batman-adv-2021.0/net/batman-adv/batman-adv.ko] undefined!

Quoted 7 lines

---
Notes:
- the previous patch was tested against an RPi4 linux kernel already enabling the build-in batman-adv module inlcusive batman-v, the defconfig given by Christian (enhanced by BR2_LINUX_KERNEL/BR2_LINUX_KERNEL_LATEST_VERSION/ BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFI) uses one with build-in batman-adv disabled

Committed to 2020.02.x, 2020.11.x and 2021.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard