From e55f53e47217c0ce700fe6ad21aa37c999a40b30 Mon Sep 17 00:00:00 2001 From: baiqiaosen Date: Tue, 14 Jan 2025 03:15:13 +0000 Subject: [PATCH] fix support jailhouse --- Cargo.toml | 33 ++++++++++++--------------------- build_img.sh | 2 +- prework.sh | 21 +++++++++++++++++++++ 3 files changed, 34 insertions(+), 22 deletions(-) create mode 100755 prework.sh diff --git a/Cargo.toml b/Cargo.toml index 19445bc..abe1dbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,34 +1,25 @@ -[patch."https://github.com/Starry-OS//kernel_guard.git".kernel_guard] +[patch."https://github.com/Starry-OS/axdriver.git".axdriver] branch = "jailhouse" -git = "https://github.com/Starry-OS/kernel_guard.git" +git = "https://github.com/Josen-B/axdriver.git" -[patch."https://github.com/Starry-OS//axtask.git".axtask] +[patch."https://github.com/Starry-OS/axfeat.git".axfeat] branch = "jailhouse" -git = "https://github.com/Starry-OS/axtask.git" +git = "https://github.com/Josen-B/axfeat.git" -[patch."https://github.com/Starry-OS//axfs.git".axfs] +[patch."https://github.com/Starry-OS/axprocess.git".axprocess] branch = "jailhouse" -git = "https://github.com/Starry-OS/axfs.git" +git = "https://github.com/Josen-B/axprocess.git" -[patch."https://github.com/Starry-OS//axhal.git".axhal] +[patch."https://github.com/Starry-OS/axruntime.git".axruntime] branch = "jailhouse" -git = "https://github.com/Josen-B/axhal.git" +git = "https://github.com/Josen-B/axruntime.git" -[patch."https://github.com/Starry-OS//axfeat.git".axfeat] +[patch."https://github.com/Starry-OS/axstarry.git".axstarry] branch = "jailhouse" -git = "https://github.com/Starry-OS/axfeat.git" +git = "https://github.com/Josen-B/axstarry.git" -[patch."https://github.com/Starry-OS//axprocess.git".axprocess] -branch = "jailhouse" -git = "https://github.com/Starry-OS/axprocess.git" - -[patch."https://github.com/Starry-OS//axruntime.git".axruntime] -branch = "jailhouse" -git = "https://github.com/Starry-OS/axruntime.git" - -[patch."https://github.com/Starry-OS//taskctx.git".taskctx] -branch = "jailhouse" -git = "https://github.com/Starry-OS/taskctx.git" +[patch."https://github.com/Starry-OS/linux_syscall_api.git".linux_syscall_api] +git = "https://github.com/Josen-B/linux_syscall_api.git" [profile.dev] lto = true diff --git a/build_img.sh b/build_img.sh index daf21eb..54be225 100755 --- a/build_img.sh +++ b/build_img.sh @@ -8,7 +8,7 @@ # default setting arch=x86_64 fs=fat32 -size=30 +size=10 FILE= display_help() diff --git a/prework.sh b/prework.sh new file mode 100755 index 0000000..e8aad16 --- /dev/null +++ b/prework.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# 检查是否存在 crates 路径,如果不存在则创建 +if [ ! -d "./crates" ]; then + echo "crates 正在创建..." + mkdir crates + kbuild patch add taskctx; + cd crates/taskctx; + git reset --hard 3c3ad2fb4defce02bc6186b836471ad28ab9c349; + cd ../.. +else + echo "crates 路径已存在。" +fi + +make clean; +# 使用 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