0088-linux-make-IPv6-builtin-if-selected-saves-30KB.patch 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 16 Jun 2016 00:51:07 +0200
  3. Subject: linux: make IPv6 builtin if selected (saves >30KB)
  4. Signed-off-by: Steven Barth <steven@midlink.org>
  5. Backport of OpenWrt r46834
  6. kmod-ipv6 is added to the PROVIDES of the kernel package, so we don't have
  7. to adjust all packages depending on kmod-ipv6.
  8. diff --git a/config/Config-build.in b/config/Config-build.in
  9. index 4674d84..cd50290 100644
  10. --- a/config/Config-build.in
  11. +++ b/config/Config-build.in
  12. @@ -83,7 +83,7 @@ menu "Global build settings"
  13. prompt "Enable IPv6 support in packages"
  14. default y
  15. help
  16. - Enable IPv6 support in packages (passes --enable-ipv6 to configure scripts).
  17. + Enables IPv6 support in kernel (builtin) and packages.
  18. config PKG_BUILD_PARALLEL
  19. bool
  20. diff --git a/package/kernel/linux/Makefile b/package/kernel/linux/Makefile
  21. index 45ca9fa..b06c49a 100644
  22. --- a/package/kernel/linux/Makefile
  23. +++ b/package/kernel/linux/Makefile
  24. @@ -49,6 +49,7 @@ define Package/kernel
  25. TITLE:=Virtual kernel package
  26. VERSION:=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)
  27. URL:=http://www.kernel.org/
  28. + PROVIDES:=$(if $(CONFIG_IPV6),kmod-ipv6)
  29. endef
  30. define Package/kernel/install
  31. diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
  32. index cea8e47..8a2760d 100644
  33. --- a/package/kernel/linux/modules/netsupport.mk
  34. +++ b/package/kernel/linux/modules/netsupport.mk
  35. @@ -439,7 +439,7 @@ $(eval $(call KernelPackage,iptunnel4))
  36. define KernelPackage/iptunnel6
  37. SUBMENU:=$(NETWORK_SUPPORT_MENU)
  38. TITLE:=IPv6 tunneling
  39. - DEPENDS:= +kmod-ipv6
  40. + DEPENDS:=@IPV6
  41. KCONFIG:= \
  42. CONFIG_INET6_TUNNEL
  43. FILES:=$(LINUX_DIR)/net/ipv6/tunnel6.ko
  44. @@ -456,15 +456,16 @@ $(eval $(call KernelPackage,iptunnel6))
  45. define KernelPackage/ipv6
  46. SUBMENU:=$(NETWORK_SUPPORT_MENU)
  47. TITLE:=IPv6 support
  48. + DEPENDS:=@IPV6
  49. + HIDDEN:=1
  50. + DEFAULT:=y
  51. KCONFIG:= \
  52. - CONFIG_IPV6 \
  53. + CONFIG_IPV6=y \
  54. CONFIG_IPV6_PRIVACY=y \
  55. CONFIG_IPV6_MULTIPLE_TABLES=y \
  56. CONFIG_IPV6_MROUTE=y \
  57. CONFIG_IPV6_PIMSM_V2=n \
  58. CONFIG_IPV6_SUBTREES=y
  59. - FILES:=$(LINUX_DIR)/net/ipv6/ipv6.ko
  60. - AUTOLOAD:=$(call AutoLoad,20,ipv6)
  61. endef
  62. define KernelPackage/ipv6/description
  63. @@ -476,7 +477,7 @@ $(eval $(call KernelPackage,ipv6))
  64. define KernelPackage/sit
  65. SUBMENU:=$(NETWORK_SUPPORT_MENU)
  66. - DEPENDS:=+kmod-ipv6 +kmod-iptunnel +kmod-iptunnel4
  67. + DEPENDS:=@IPV6 +kmod-iptunnel +kmod-iptunnel4
  68. TITLE:=IPv6-in-IPv4 tunnel
  69. KCONFIG:=CONFIG_IPV6_SIT \
  70. CONFIG_IPV6_SIT_6RD=y
  71. @@ -494,7 +495,7 @@ $(eval $(call KernelPackage,sit))
  72. define KernelPackage/ip6-tunnel
  73. SUBMENU:=$(NETWORK_SUPPORT_MENU)
  74. TITLE:=IP-in-IPv6 tunnelling
  75. - DEPENDS:= +kmod-ipv6 +kmod-iptunnel6
  76. + DEPENDS:=@IPV6 +kmod-iptunnel6
  77. KCONFIG:= CONFIG_IPV6_TUNNEL
  78. FILES:=$(LINUX_DIR)/net/ipv6/ip6_tunnel.ko
  79. AUTOLOAD:=$(call AutoLoad,32,ip6_tunnel)
  80. @@ -510,7 +511,7 @@ $(eval $(call KernelPackage,ip6-tunnel))
  81. define KernelPackage/gre
  82. SUBMENU:=$(NETWORK_SUPPORT_MENU)
  83. TITLE:=GRE support
  84. - DEPENDS:=+PACKAGE_kmod-ipv6:kmod-ipv6 +kmod-iptunnel
  85. + DEPENDS:=+kmod-iptunnel
  86. KCONFIG:=CONFIG_NET_IPGRE CONFIG_NET_IPGRE_DEMUX
  87. FILES:=$(LINUX_DIR)/net/ipv4/ip_gre.ko $(LINUX_DIR)/net/ipv4/gre.ko
  88. AUTOLOAD:=$(call AutoLoad,39,gre ip_gre)
  89. @@ -526,7 +527,7 @@ $(eval $(call KernelPackage,gre))
  90. define KernelPackage/gre6
  91. SUBMENU:=$(NETWORK_SUPPORT_MENU)
  92. TITLE:=GRE support over IPV6
  93. - DEPENDS:=+kmod-ipv6 +kmod-iptunnel +kmod-ip6-tunnel
  94. + DEPENDS:=@IPV6 +kmod-iptunnel +kmod-ip6-tunnel
  95. KCONFIG:=CONFIG_IPV6_GRE
  96. FILES:=$(LINUX_DIR)/net/ipv6/ip6_gre.ko
  97. AUTOLOAD:=$(call AutoLoad,39,ip6_gre)
  98. @@ -862,7 +863,6 @@ define KernelPackage/l2tp
  99. SUBMENU:=$(NETWORK_SUPPORT_MENU)
  100. TITLE:=Layer Two Tunneling Protocol (L2TP)
  101. DEPENDS:= \
  102. - +IPV6:kmod-ipv6 \
  103. +kmod-udptunnel4 \
  104. +IPV6:kmod-udptunnel6
  105. KCONFIG:=CONFIG_L2TP \
  106. @@ -898,7 +898,7 @@ $(eval $(call KernelPackage,l2tp-eth))
  107. define KernelPackage/l2tp-ip
  108. SUBMENU:=$(NETWORK_SUPPORT_MENU)
  109. TITLE:=L2TP IP encapsulation for L2TPv3
  110. - DEPENDS:=+kmod-l2tp +IPV6:kmod-ipv6
  111. + DEPENDS:=+kmod-l2tp
  112. KCONFIG:=CONFIG_L2TP_IP
  113. FILES:= \
  114. $(LINUX_DIR)/net/l2tp/l2tp_ip.ko \
  115. @@ -930,7 +930,7 @@ define KernelPackage/sctp
  116. CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
  117. FILES:= $(LINUX_DIR)/net/sctp/sctp.ko
  118. AUTOLOAD:= $(call AutoLoad,32,sctp)
  119. - DEPENDS:=+kmod-lib-crc32c +kmod-crypto-md5 +kmod-crypto-hmac +IPV6:kmod-ipv6
  120. + DEPENDS:=+kmod-lib-crc32c +kmod-crypto-md5 +kmod-crypto-hmac
  121. endef
  122. define KernelPackage/sctp/description
  123. diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile
  124. index 19a8df9..8fd51fe 100644
  125. --- a/package/network/services/dnsmasq/Makefile
  126. +++ b/package/network/services/dnsmasq/Makefile
  127. @@ -52,7 +52,6 @@ define Package/dnsmasq-full
  128. $(call Package/dnsmasq/Default)
  129. TITLE += (with DNSSEC, DHCPv6, Auth DNS, IPset enabled by default)
  130. DEPENDS:=+PACKAGE_dnsmasq_full_dnssec:libnettle \
  131. - +PACKAGE_dnsmasq_full_dhcpv6:kmod-ipv6 \
  132. +PACKAGE_dnsmasq_full_ipset:kmod-ipt-ipset
  133. VARIANT:=full
  134. endef