source "package/cpuload/Config.in"
source "package/dcron/Config.in"
source "package/debianutils/Config.in"
+ source "package/docker-containerd/Config.in"
source "package/cgroupfs-mount/Config.in"
source "package/dsp-tools/Config.in"
source "package/efibootmgr/Config.in"
--- /dev/null
+config BR2_PACKAGE_DOCKER_CONTAINERD
+ bool "docker-containerd"
+ depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_USE_MMU # util-linux
+ depends on BR2_USE_WCHAR # util-linux
+ select BR2_PACKAGE_RUNC # runtime dependency
+ select BR2_PACKAGE_UTIL_LINUX # runtime dependency
+ select BR2_PACKAGE_UTIL_LINUX_BINARIES
+ select BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT
+ select BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT
+ select BR2_PACKAGE_UTIL_LINUX_MOUNT
+ help
+ containerd is a daemon to control runC.
+
+ https://github.com/docker/containerd
+
+comment "docker-containerd needs a toolchain w/ threads, wchar"
+ depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+ depends on BR2_USE_MMU
+ depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
--- /dev/null
+################################################################################
+#
+# docker-containerd
+#
+################################################################################
+
+DOCKER_CONTAINERD_VERSION = 1b3a81545ca79456086dc2aa424357be98b962ee
+DOCKER_CONTAINERD_SITE = $(call github,docker,containerd,$(DOCKER_CONTAINERD_VERSION))
+DOCKER_CONTAINERD_LICENSE = Apache-2.0
+DOCKER_CONTAINERD_LICENSE_FILES = LICENSE.code
+
+DOCKER_CONTAINERD_DEPENDENCIES = host-go
+
+DOCKER_CONTAINERD_GOPATH = "$(@D)/vendor"
+DOCKER_CONTAINERD_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
+ CGO_ENABLED=1 \
+ GOBIN="$(@D)/bin" \
+ GOPATH="$(DOCKER_CONTAINERD_GOPATH)"
+
+DOCKER_CONTAINERD_GLDFLAGS = \
+ -X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION) \
+ -extldflags '-static'
+
+define DOCKER_CONTAINERD_CONFIGURE_CMDS
+ mkdir -p $(DOCKER_CONTAINERD_GOPATH)/src/github.com/docker
+ ln -s $(@D) $(DOCKER_CONTAINERD_GOPATH)/src/github.com/docker/containerd
+ mkdir -p $(DOCKER_CONTAINERD_GOPATH)/src/github.com/opencontainers
+ ln -s $(RUNC_SRCDIR) $(DOCKER_CONTAINERD_GOPATH)/src/github.com/opencontainers/runc
+endef
+
+define DOCKER_CONTAINERD_BUILD_CMDS
+ $(foreach d,ctr containerd containerd-shim,\
+ cd $(@D); $(DOCKER_CONTAINERD_MAKE_ENV) $(HOST_DIR)/usr/bin/go build \
+ -v -o $(@D)/bin/$(d) -ldflags "$(DOCKER_CONTAINERD_GLDFLAGS)" ./$(d)$(sep))
+endef
+
+define DOCKER_CONTAINERD_INSTALL_TARGET_CMDS
+ ln -fs runc $(TARGET_DIR)/usr/bin/docker-runc
+ $(INSTALL) -D -m 0755 $(@D)/bin/containerd $(TARGET_DIR)/usr/bin/docker-containerd
+ $(INSTALL) -D -m 0755 $(@D)/bin/containerd-shim $(TARGET_DIR)/usr/bin/containerd-shim
+ ln -fs containerd-shim $(TARGET_DIR)/usr/bin/docker-containerd-shim
+endef
+
+$(eval $(generic-package))