From f3614aec4ba5073f1e8542db0039e437ff2e450c Mon Sep 17 00:00:00 2001 From: baiqiaosen Date: Fri, 10 Jan 2025 02:15:39 +0000 Subject: [PATCH] add prework --- Cargo.toml | 12 +----------- prework.sh | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 11 deletions(-) create mode 100755 prework.sh diff --git a/Cargo.toml b/Cargo.toml index 17ca9a1..fa2521f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,4 @@ -[patch."https://github.com/Josen-B//axhal.git".axhal] -branch = "phytium-pi" -git = "https://github.com/Josen-B/axhal.git" - -[patch."https://github.com/Josen-B//axruntime.git".axruntime] -branch = "phytium-pi" -git = "https://github.com/Josen-B/axruntime.git" - -[patch."https://github.com/Josen-B//of.git".of] -branch = "phytium-pi" -git = "https://github.com/Josen-B/of.git" +[patch] [profile.dev] lto = true diff --git a/prework.sh b/prework.sh new file mode 100755 index 0000000..d8503b3 --- /dev/null +++ b/prework.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# 检查是否存在 crates 路径,如果不存在则创建 +if [ ! -d "./crates" ]; then + echo "crates 正在创建..." + mkdir crates +else + echo "crates 路径已存在。" +fi + +kbuild patch add taskctx; +cd crates/taskctx; +git reset --hard 3c3ad2fb4defce02bc6186b836471ad28ab9c349; +cd ../.. +# 使用 sed 替换 channel 的值 +sed -i 's/channel = "nightly-2024-05-02"/channel = "nightly"/' rust-toolchain.toml + +cargo update; + +sed -i 's/channel = "nightly"/channel = "nightly-2024-05-02"/' rust-toolchain.toml +