package/docker-engine: needs some kernel options
authorFrancois Perrad <fperrad@gmail.com>
Sun, 21 Jun 2020 07:59:56 +0000 (09:59 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 27 Jul 2020 15:27:09 +0000 (17:27 +0200)
according to https://wiki.gentoo.org/wiki/Docker#Kernel /
docker-engine/contrib/check-config.sh.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[Peter: synchronize with contrib/check-config.sh, only enforce DM options if
 device mapper driver is enabled]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/docker-engine/docker-engine.mk

index 2f622014ba436b23c8f5b36cb4b81bf412907feb..6bb382f5a7d4ae61c806091e93802bf0697095ac 100644 (file)
@@ -79,4 +79,59 @@ define DOCKER_ENGINE_USERS
        - - docker -1 * - - - Docker Application Container Framework
 endef
 
+ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
+define DOCKER_ENGINE_DRIVER_BTRFS_LINUX_CONFIG_FIXUPS
+       $(call KCONFIG_ENABLE_OPT,CONFIG_BTRFS_FS)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_BTRFS_FS_POSIX_ACL)
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y)
+define DOCKER_ENGINE_DRIVER_DM_LINUX_CONFIG_FIXUPS
+       $(call KCONFIG_ENABLE_OPT,CONFIG_MD)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_DM)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_MD_THIN_PROVISIONING)
+endef
+endif
+
+# based on contrib/check-config.sh
+define DOCKER_ENGINE_LINUX_CONFIG_FIXUPS
+       $(call KCONFIG_ENABLE_OPT,CONFIG_POSIX_MQUEUE)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_MEMCG)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_SCHED)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_FREEZER)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_CPUSETS)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_DEVICE)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_CPUACCT)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NAMESPACES)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_UTS_NS)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_IPC_NS)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_PID_NS)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NET_NS)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE_NETFILTER)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_ADDRTYPE)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_CONNTRACK)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_IPVS)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_NAT)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_TARGET_MASQUERADE)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_NET_CORE)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_DUMMY)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_MACVLAN)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_IPVLAN)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_VXLAN)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_VETH)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS)
+       $(call KCONFIG_ENABLE_OPT,CONFIG_KEYS)
+       $(DOCKER_ENGINE_DRIVER_BTRFS_LINUX_CONFIG_FIXUPS)
+       $(DOCKER_ENGINE_DRIVER_DM_LINUX_CONFIG_FIXUPS)
+endef
+
 $(eval $(golang-package))