Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #814 from stealthybox/kernel-upgrade-localcache
Browse files Browse the repository at this point in the history
Cache versioned shallow clones for kernel config patching
  • Loading branch information
darkowlzz authored Mar 29, 2021
2 parents 073580f + d9c388a commit b3214a5
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions images/kernel/upgrade-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ if [[ ${FROM} != ${TO} ]]; then
cp ${FROM} ${TO}
fi

CACHE="$(pwd)/../../bin/cache"
mkdir -p "${CACHE}/linux/"
docker run --rm -i ${DOCKER_TTY} \
-u "$(id -u):$(id -g)" \
${ARCH_PARAMETER} \
-v $(pwd)/${TO}:/tmp/.config \
${KERNEL_BUILDER_IMAGE} /bin/bash -c "\
git clone --depth 1 --branch v${VERSION} ${LINUX_REPO_URL} linux && \
cd linux &&
make clean && make mrproper && cp /tmp/.config . && \
make EXTRAVERSION="" LOCALVERSION= olddefconfig && \
-v "$(pwd)/${TO}":/tmp/.config \
-v "${CACHE}/linux/":/linux/ \
-w /linux \
${KERNEL_BUILDER_IMAGE} /bin/bash -c "
set -xe
test -d ./${VERSION} || git clone --depth 1 --branch v${VERSION} ${LINUX_REPO_URL} ./${VERSION}
cd ./${VERSION}
make clean && make mrproper && cp /tmp/.config .
make EXTRAVERSION="" LOCALVERSION= olddefconfig
cp .config /tmp/.config"

0 comments on commit b3214a5

Please # to comment.