From c09af909c5066ec0f97802378ccd820f5df5067e Mon Sep 17 00:00:00 2001 From: LoGin Date: Sat, 7 Dec 2024 16:37:15 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E6=9C=AA=E8=83=BD=E6=AD=A3=E7=A1=AE=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=B7=A5=E5=85=B7=E9=93=BE=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#1071)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: longjin --- .github/workflows/makefile.yml | 16 ++++++++-------- tools/BUILD_CONTAINER_VERSION | 2 +- tools/bootstrap.sh | 21 +++++++++++---------- tools/change_rust_src.sh | 3 ++- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index f9113a128..88ad306ab 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -11,14 +11,14 @@ jobs: name: Format check ${{ matrix.arch }} runs-on: ubuntu-latest continue-on-error: true - container: dragonos/dragonos-dev:v1.7 + container: dragonos/dragonos-dev:v1.8 strategy: matrix: arch: [x86_64, riscv64] steps: - - run: echo "Running in dragonos/dragonos-dev:v1.7" + - run: echo "Running in dragonos/dragonos-dev:v1.8" - uses: actions/checkout@v3 - name: Format check @@ -35,14 +35,14 @@ jobs: name: Kernel static test ${{ matrix.arch }} runs-on: ubuntu-latest continue-on-error: true - container: dragonos/dragonos-dev:v1.7 + container: dragonos/dragonos-dev:v1.8 strategy: matrix: arch: [x86_64, riscv64] steps: - - run: echo "Running in dragonos/dragonos-dev:v1.7" + - run: echo "Running in dragonos/dragonos-dev:v1.8" - uses: actions/checkout@v3 @@ -55,10 +55,10 @@ jobs: build-x86_64: runs-on: ubuntu-latest - container: dragonos/dragonos-dev:v1.7 + container: dragonos/dragonos-dev:v1.8 steps: - - run: echo "Running in dragonos/dragonos-dev:v1.7" + - run: echo "Running in dragonos/dragonos-dev:v1.8" - uses: actions/checkout@v3 - name: build the DragonOS @@ -77,10 +77,10 @@ jobs: build-riscv64: runs-on: ubuntu-latest - container: dragonos/dragonos-dev:v1.7 + container: dragonos/dragonos-dev:v1.8 steps: - - run: echo "Running in dragonos/dragonos-dev:v1.7" + - run: echo "Running in dragonos/dragonos-dev:v1.8" - uses: actions/checkout@v3 with: diff --git a/tools/BUILD_CONTAINER_VERSION b/tools/BUILD_CONTAINER_VERSION index 72970ee2c..8a9f2d79a 100644 --- a/tools/BUILD_CONTAINER_VERSION +++ b/tools/BUILD_CONTAINER_VERSION @@ -1 +1 @@ -v1.7 \ No newline at end of file +v1.8 \ No newline at end of file diff --git a/tools/bootstrap.sh b/tools/bootstrap.sh index b859c3ae9..ff6a5d96a 100644 --- a/tools/bootstrap.sh +++ b/tools/bootstrap.sh @@ -24,6 +24,7 @@ DEFAULT_INSTALL="false" export RUSTUP_DIST_SERVER=${RUSTUP_DIST_SERVER:-https://rsproxy.cn} export RUSTUP_UPDATE_ROOT=${RUSTUP_UPDATE_ROOT:-https://rsproxy.cn/rustup} export RUST_VERSION="${RUST_VERSION:-nightly-2024-11-05}" +export RUST_VERSION_OLD="${RUST_VERSION:-nightly-2024-07-23}" banner() { @@ -65,7 +66,7 @@ install_ubuntu_debian_pkg() lsb-release \ llvm-dev libclang-dev clang gcc-multilib \ gcc build-essential fdisk dosfstools dnsmasq bridge-utils iptables libssl-dev pkg-config \ - sphinx make git + python3-sphinx make git # 必须分开安装,否则会出现错误 sudo "$1" install -y \ gcc-riscv64-unknown-elf gcc-riscv64-linux-gnu gdb-multiarch @@ -233,21 +234,21 @@ rustInstall() { echo "正在安装DragonOS所需的rust组件...首次安装需要一些时间来更新索引,请耐心等待..." cargo install cargo-binutils cargo install bpf-linker - rustup toolchain install nightly-2024-11-05-x86_64-unknown-linux-gnu rustup toolchain install $RUST_VERSION-x86_64-unknown-linux-gnu + rustup toolchain install $RUST_VERSION_OLD-x86_64-unknown-linux-gnu rustup component add rust-src --toolchain $RUST_VERSION-x86_64-unknown-linux-gnu - rustup component add rust-src --toolchain nightly-2024-11-05-x86_64-unknown-linux-gnu + rustup component add rust-src --toolchain $RUST_VERSION_OLD-x86_64-unknown-linux-gnu rustup target add x86_64-unknown-none --toolchain $RUST_VERSION-x86_64-unknown-linux-gnu - rustup target add x86_64-unknown-none --toolchain nightly-2024-11-05-x86_64-unknown-linux-gnu - rustup target add x86_64-unknown-linux-musl --toolchain nightly-2024-11-05-x86_64-unknown-linux-gnu + rustup target add x86_64-unknown-none --toolchain $RUST_VERSION_OLD-x86_64-unknown-linux-gnu rustup target add x86_64-unknown-linux-musl --toolchain $RUST_VERSION-x86_64-unknown-linux-gnu + rustup target add x86_64-unknown-linux-musl --toolchain $RUST_VERSION_OLD-x86_64-unknown-linux-gnu rustup toolchain install $RUST_VERSION-riscv64gc-unknown-linux-gnu --force-non-host - rustup toolchain install nightly-2024-11-05-riscv64gc-unknown-linux-gnu --force-non-host + rustup toolchain install $RUST_VERSION_OLD-riscv64gc-unknown-linux-gnu --force-non-host rustup target add riscv64gc-unknown-none-elf --toolchain $RUST_VERSION-riscv64gc-unknown-linux-gnu rustup target add riscv64imac-unknown-none-elf --toolchain $RUST_VERSION-riscv64gc-unknown-linux-gnu - rustup target add riscv64gc-unknown-none-elf --toolchain nightly-2024-11-05-riscv64gc-unknown-linux-gnu - rustup target add riscv64imac-unknown-none-elf --toolchain nightly-2024-11-05-riscv64gc-unknown-linux-gnu + rustup target add riscv64gc-unknown-none-elf --toolchain $RUST_VERSION_OLD-riscv64gc-unknown-linux-gnu + rustup target add riscv64imac-unknown-none-elf --toolchain $RUST_VERSION_OLD-riscv64gc-unknown-linux-gnu rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu rustup component add rust-src @@ -338,9 +339,9 @@ cargo install dadk || exit 1 bashpath=$(cd `dirname $0`; pwd) # 编译安装musl交叉编译工具链 -bash ${bashpath}/install_musl_gcc.sh || (echo "musl交叉编译工具链安装失败" && exit 1) +$SHELL ${bashpath}/install_musl_gcc.sh || (echo "musl交叉编译工具链安装失败" && exit 1) # 编译安装grub -bash ${bashpath}/grub_auto_install.sh || (echo "grub安装失败" && exit 1) +$SHELL ${bashpath}/grub_auto_install.sh || (echo "grub安装失败" && exit 1) # 解决kvm权限问题 USR=$USER diff --git a/tools/change_rust_src.sh b/tools/change_rust_src.sh index 5d3ac7f23..6f5225413 100644 --- a/tools/change_rust_src.sh +++ b/tools/change_rust_src.sh @@ -2,7 +2,8 @@ echo "正在为rust换源" sparse="false" -CONFIG_FILE=~/.cargo/config.toml +CARGO_HOME=${CARGO_HOME:-~/.cargo} +CONFIG_FILE=$CARGO_HOME/config.toml # 创建父目录 if [ ! -d ~/.cargo ]; then mkdir -p ~/.cargo