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

Cache versioned shallow clones for kernel config patching #814

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"