Re: [LEDE-DEV] Kernel symbol dependencies and KCONFIG usage for kernel packages
On Sat, Jul 02, 2016 at 03:48:36PM +0200, Hauke Mehrtens wrote: > > However, I have some trouble understanding what KCONFIG does. Wireguard > > needs a few kernel options, so I thought that KCONFIG was the place to > > declare such dependencies: > > > > > > https://github.com/zorun/packages-1/blob/wireguard/net/wireguard/Makefile#L90 > > > KCONFIG:=CONFIG_NET_UDP_TUNNEL CONFIG_IPV6 \ > > CONFIG_NETFILTER_XT_MATCH_HASHLIMIT > > Instead of activating the kernel symbols you should add a dependency to > the packages which are building these models: > > DEPENDS:=+kmod-udptunnel4 +kmod-udptunnel6 +kmod-ipt-hashlimit Well, actually, this is already there, on the next line :) https://github.com/zorun/packages-1/blob/wireguard/net/wireguard/Makefile#L91 So, I can remove the KCONFIG line altogether? I thought the kernel symbols activated some necessary machinery in the kernel, in addition to producing the .ko module. I think I found the cause of the issue: the packages kmod-udptunnel4.ipk and kmod-udptunnel6.ipk are generated, but are empty (no .ko file). When I activate the kernel symbol in kernel_menuconfig, these packages do provide the .ko files as expected. I have attached the empty packages to this email, just in case. Thanks, Baptiste kmod-udptunnel4_4.4.14-1_mips_34kc.ipk Description: application/vnd.shana.informed.package kmod-udptunnel6_4.4.14-1_mips_34kc.ipk Description: application/vnd.shana.informed.package signature.asc Description: PGP signature ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Kernel symbol dependencies and KCONFIG usage for kernel packages
On 07/02/2016 03:20 PM, Baptiste Jonglez wrote: > Hi, > > I am packaging a new kernel module (wireguard), the package is currently here > [1]. > > However, I have some trouble understanding what KCONFIG does. Wireguard > needs a few kernel options, so I thought that KCONFIG was the place to > declare such dependencies: > > > https://github.com/zorun/packages-1/blob/wireguard/net/wireguard/Makefile#L90 > KCONFIG:=CONFIG_NET_UDP_TUNNEL CONFIG_IPV6 \ > CONFIG_NETFILTER_XT_MATCH_HASHLIMIT Instead of activating the kernel symbols you should add a dependency to the packages which are building these models: DEPENDS:=+kmod-udptunnel4 +kmod-udptunnel6 +kmod-ipt-hashlimit > However, it does not seem to enable these options. The module compiles > fine, it installs fine [2], but then it fails to load at runtime: > > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.015838] wireguard: Unknown > symbol udp_sock_create4 (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.022021] wireguard: Unknown > symbol udp_tunnel6_xmit_skb (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.028767] wireguard: Unknown > symbol udp_tunnel_sock_release (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.035570] wireguard: Unknown > symbol setup_udp_tunnel_sock (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.042136] wireguard: Unknown > symbol udp_sock_create6 (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.048297] wireguard: Unknown > symbol udp_tunnel_xmit_skb (err 0) > > It works when selecting the needed options manually in kernel_menuconfig, > but it's a huge pain. You should avoid make kernel_menuconfig > Is there a way to get the needed kernel options automatically? Maybe this > only happens for packages that are part of the core Lede distribution? > > Thanks, > Baptiste > > [1] https://github.com/zorun/packages-1/blob/wireguard/net/wireguard/Makefile > [2] http://paste.aliens-lyon.fr/CBI signature.asc Description: OpenPGP digital signature ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Kernel symbol dependencies and KCONFIG usage for kernel packages
On 02/07/2016 15:20, Baptiste Jonglez wrote: > Hi, > > I am packaging a new kernel module (wireguard), the package is currently here > [1]. > > However, I have some trouble understanding what KCONFIG does. Wireguard > needs a few kernel options, so I thought that KCONFIG was the place to > declare such dependencies: > > > https://github.com/zorun/packages-1/blob/wireguard/net/wireguard/Makefile#L90 > > However, it does not seem to enable these options. The module compiles > fine, it installs fine [2], but then it fails to load at runtime: > > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.015838] wireguard: Unknown > symbol udp_sock_create4 (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.022021] wireguard: Unknown > symbol udp_tunnel6_xmit_skb (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.028767] wireguard: Unknown > symbol udp_tunnel_sock_release (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.035570] wireguard: Unknown > symbol setup_udp_tunnel_sock (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.042136] wireguard: Unknown > symbol udp_sock_create6 (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.048297] wireguard: Unknown > symbol udp_tunnel_xmit_skb (err 0) > > It works when selecting the needed options manually in kernel_menuconfig, > but it's a huge pain. > > Is there a way to get the needed kernel options automatically? Maybe this > only happens for packages that are part of the core Lede distribution? > > Thanks, > Baptiste > > [1] https://github.com/zorun/packages-1/blob/wireguard/net/wireguard/Makefile > [2] http://paste.aliens-lyon.fr/CBI > > > > ___ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev > > Hi, wireguard depends on other moduls so you will need to package them aswell. CONFIG_NET_UDP_TUNNEL will create ip6_udp_tunnel.ko which for example has udp_tunnel6_xmit_skb inside it. once all of these are packaged you can make wireguard depend on them. John ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Kernel symbol dependencies and KCONFIG usage for kernel packages
On 02/07/2016 15:20, Baptiste Jonglez wrote: > Hi, > > I am packaging a new kernel module (wireguard), the package is currently here > [1]. > > However, I have some trouble understanding what KCONFIG does. Wireguard > needs a few kernel options, so I thought that KCONFIG was the place to > declare such dependencies: > > > https://github.com/zorun/packages-1/blob/wireguard/net/wireguard/Makefile#L90 > > However, it does not seem to enable these options. The module compiles > fine, it installs fine [2], but then it fails to load at runtime: > > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.015838] wireguard: Unknown > symbol udp_sock_create4 (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.022021] wireguard: Unknown > symbol udp_tunnel6_xmit_skb (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.028767] wireguard: Unknown > symbol udp_tunnel_sock_release (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.035570] wireguard: Unknown > symbol setup_udp_tunnel_sock (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.042136] wireguard: Unknown > symbol udp_sock_create6 (err 0) > Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.048297] wireguard: Unknown > symbol udp_tunnel_xmit_skb (err 0) > > It works when selecting the needed options manually in kernel_menuconfig, > but it's a huge pain. > > Is there a way to get the needed kernel options automatically? Maybe this > only happens for packages that are part of the core Lede distribution? > > Thanks, > Baptiste > > [1] https://github.com/zorun/packages-1/blob/wireguard/net/wireguard/Makefile > [2] http://paste.aliens-lyon.fr/CBI > > Hi, wireguard depends on other moduls so you will need to package them aswell. CONFIG_NET_UDP_TUNNEL will create ip6_udp_tunnel.ko which for example has udp_tunnel6_xmit_skb inside it. once all of these are packaged you can make wireguard depend on them. John > > ___ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev > ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] Kernel symbol dependencies and KCONFIG usage for kernel packages
Hi, I am packaging a new kernel module (wireguard), the package is currently here [1]. However, I have some trouble understanding what KCONFIG does. Wireguard needs a few kernel options, so I thought that KCONFIG was the place to declare such dependencies: https://github.com/zorun/packages-1/blob/wireguard/net/wireguard/Makefile#L90 However, it does not seem to enable these options. The module compiles fine, it installs fine [2], but then it fails to load at runtime: Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.015838] wireguard: Unknown symbol udp_sock_create4 (err 0) Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.022021] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0) Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.028767] wireguard: Unknown symbol udp_tunnel_sock_release (err 0) Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.035570] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0) Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.042136] wireguard: Unknown symbol udp_sock_create6 (err 0) Sat Jul 2 10:04:50 2016 kern.warn kernel: [ 95.048297] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0) It works when selecting the needed options manually in kernel_menuconfig, but it's a huge pain. Is there a way to get the needed kernel options automatically? Maybe this only happens for packages that are part of the core Lede distribution? Thanks, Baptiste [1] https://github.com/zorun/packages-1/blob/wireguard/net/wireguard/Makefile [2] http://paste.aliens-lyon.fr/CBI signature.asc Description: PGP signature ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev