diff --git a/Dockerfile b/Dockerfile index 6ec4654..48d2cd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,20 @@ FROM debian:stable-slim -ARG LLVM_VERSION=18 +ARG LLVM_VERSION=14 ENV LLVM_VERSION=${LLVM_VERSION} ARG TZ=Etc/GMT-8 ENV TZ=${TZ} RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes \ - curl ca-certificates gpg xz-utils make flex bison libssl-dev libelf-dev bc python3-minimal dwarves tzdata cpio; \ - curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | \ - gpg --dearmor -o /usr/share/keyrings/llvm-apt-archive-keyring.gpg; \ - . /etc/os-release; \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/llvm-apt-archive-keyring.gpg] \ - https://apt.llvm.org/$VERSION_CODENAME llvm-toolchain-$VERSION_CODENAME-$LLVM_VERSION main" | \ - tee /etc/apt/sources.list.d/llvm-apt.list >/dev/null; \ - apt-get update; \ - DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes \ - clang-$LLVM_VERSION lld-$LLVM_VERSION llvm-$LLVM_VERSION; \ + curl ca-certificates gpg xz-utils make flex bison libssl-dev libelf-dev bc python3-minimal dwarves tzdata cpio clang-${LLVM_VERSION} lld-${LLVM_VERSION} llvm-${LLVM_VERSION}; \ + # curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | \ + # gpg --dearmor -o /usr/share/keyrings/llvm-apt-archive-keyring.gpg; \ + # . /etc/os-release; \ + # echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/llvm-apt-archive-keyring.gpg] \ + # https://apt.llvm.org/$VERSION_CODENAME llvm-toolchain-$VERSION_CODENAME-$LLVM_VERSION main" | \ + # tee /etc/apt/sources.list.d/llvm-apt.list >/dev/null; \ + # apt-get update; \ + # DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes \ + # clang-$LLVM_VERSION lld-$LLVM_VERSION llvm-$LLVM_VERSION; \ update-alternatives --install /usr/bin/cc cc /usr/bin/clang-$LLVM_VERSION 100; \ rm -rf /var/lib/apt/lists/* diff --git a/build-kernel.sh b/build-kernel.sh index d8b5be1..7dc0601 100755 --- a/build-kernel.sh +++ b/build-kernel.sh @@ -8,7 +8,7 @@ fi TMPDIR=$(mktemp -d) tar xf kernel.tar.xz --strip-components=1 -C $TMPDIR -curl --silent --remote-name-all https://raw.githubusercontent.com/microsoft/WSL2-Linux-Kernel/linux-msft-wsl-5.15.y/arch/{x86/configs/config-wsl,arm64/configs/config-wsl-arm64} +curl --silent --remote-name-all https://raw.githubusercontent.com/microsoft/WSL2-Linux-Kernel/linux-msft-wsl-6.1.y/arch/{x86/configs/config-wsl,arm64/configs/config-wsl-arm64} build_config() { if [ -f "$1" ]; then @@ -33,7 +33,7 @@ build_amd64_kernel() { sh <(curl -fsSL https://sh.rustup.rs) --quiet -y --default-toolchain $(scripts/min-tool-version.sh rustc) --profile minimal --component rust-src . "$HOME/.cargo/env" cargo install --locked --version $(scripts/min-tool-version.sh bindgen) bindgen-cli - make LLVM=-${LLVM_VERSION} rustavailable + make -j$(nproc) ARCH=x86_64 LLVM=-${LLVM_VERSION} rustavailable fi make -j$(nproc) ARCH=x86_64 LLVM=-${LLVM_VERSION}