From a910f0f7a08738aa312036dc5d074e96015c313d Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Wed, 15 Feb 2017 23:36:59 +0000 Subject: [PATCH] KERNEL_TAG=4.9.10 make release ; dist/publish.sh Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 29 ++++++++++++++++------------- Makefile | 5 ++++- README.md | 11 ++++++++++- scripts/build-common | 6 ++++++ 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 5f09413..c1c944b 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -1,17 +1,6 @@ FROM ubuntu:16.04 # FROM arm64=aarch64/ubuntu:16.04 arm=armhf/ubuntu:16.04 -ENV DAPPER_ENV ARCH VERSION DEV_BUILD GITHUB_TOKEN -ENV DAPPER_DOCKER_SOCKET true -ENV DAPPER_SOURCE /source -ENV DAPPER_OUTPUT ./dist -#ENV DAPPER_RUN_ARGS --privileged - -###################### -ARG DAPPER_HOST_ARCH=amd64 -ARG HOST_ARCH=${DAPPER_HOST_ARCH} -ARG ARCH=${HOST_ARCH} - RUN apt-get update \ && apt-get install -y build-essential wget libncurses5-dev unzip bc curl python rsync ccache git vim libssl-dev kmod gnupg2 @@ -25,6 +14,19 @@ CMD ["ci"] RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 +###################### +ENV DAPPER_ENV ARCH VERSION DEV_BUILD GITHUB_TOKEN KERNEL_TAG +ENV DAPPER_DOCKER_SOCKET true +ENV DAPPER_SOURCE /source +ENV DAPPER_OUTPUT ./dist +#ENV DAPPER_RUN_ARGS --privileged + +###################### +ARG KERNEL_TAG=${KERNEL_TAG} +ARG DAPPER_HOST_ARCH=amd64 +ARG HOST_ARCH=${DAPPER_HOST_ARCH} +ARG ARCH=${HOST_ARCH} + ENV SHELL /bin/bash ENV HOME ${DAPPER_SOURCE} WORKDIR ${DAPPER_SOURCE} @@ -52,7 +54,8 @@ ENV DOCKER_URL=DOCKER_URL_${ARCH} \ DOCKER_URL_arm=${DOCKER_URL_arm} \ DOCKER_VERSION=${DOCKER_VERSION} \ HOST_ARCH=${HOST_ARCH} \ - OS_REPO=${OS_REPO} + OS_REPO=${OS_REPO} \ + KERNEL_TAG=${KERNEL_TAG} #RUN rm /bin/sh && \ # ln -s /bin/bash /bin/sh @@ -62,7 +65,7 @@ RUN curl -fL ${DOCKER_URL_amd64} > /usr/bin/docker && \ chmod +x /usr/bin/docker ########## Kernel version Configuration ############################# -ENV KERNEL_TAG=4.9.8 +#ENV KERNEL_TAG=4.9.9 ENV KERNEL_VERSION=${KERNEL_TAG}-rancher #ENV KERNEL_SHA1=fa46da077c077467776cdc45a7b50d327a081ab4 ENV KERNEL_URL=https://cdn.kernel.org/pub/linux/kernel/v4.x/ diff --git a/Makefile b/Makefile index 641fb1d..9f8881e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -TARGETS := $(shell ls scripts) +TARGETS := $(shell ls scripts | grep -vE 'clean') .dapper: @echo Downloading dapper @@ -13,6 +13,9 @@ $(TARGETS): .dapper shell-bind: .dapper ./.dapper -m bind -s +clean: + @./scripts/clean + .DEFAULT_GOAL := ci .PHONY: $(TARGETS) diff --git a/README.md b/README.md index e4f300b..aa339c1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,16 @@ # Build kernel release archives for use in building RancherOS -**Fill me in** + +To build the tgz's and the kernel header & extras images, run: + +`KERNEL_TAG=4.9.10 make release` + +and if you're uploading them, set your GITHUB_TOKEN and login to docker hub, then run + +(this requires https://github.com/aktau/github-release to be installed in your path) + +`dist/publish.sh` ## packaging your own kernel builds diff --git a/scripts/build-common b/scripts/build-common index 74064fe..d28591b 100644 --- a/scripts/build-common +++ b/scripts/build-common @@ -1,6 +1,12 @@ #!/bin/bash set -e +if [[ "$KERNEL_TAG" == "" ]]; then + echo "ERROR: Please set the KERNEL_TAG (the mainline KERNEL version is also the git tag) you're building" + echo " e.g., KERNEL_TAG=4.9.10 make release" + exit 1 +fi + : ${ARTIFACTS:=$(pwd)/assets} : ${BUILD:=/usr/src} : ${CONFIG:=$(pwd)/config}