Commit 7066a6f
authored
[xtask] refactor into unified logic. (#39)
* Refactor Axvisor project structure and remove unused files
- Deleted `menuconfig.rs`, `tbuld.rs`, and `vmconfig.rs` as they were no longer needed.
- Updated `cargo.rs` to support RISC-V architecture in QEMU commands.
- Enhanced `ctx.rs` to manage repository root paths more effectively.
- Modified `devspace.rs` to ensure submodules and patches are handled relative to the repository root.
- Adjusted image management in `image/mod.rs` to accept repository root paths.
- Refactored `mod.rs` to centralize path resolution for various configurations.
- Improved test cases to ensure they operate correctly with the new structure.
* 更新 `windows-sys` 依赖版本至 0.61.2,添加 `tracing` 相关依赖并在多个模块中实现日志记录功能
* Refactor QEMU integration and enhance image download functionality
- Removed redundant methods in QemuRunner and streamlined the run process.
- Updated Context struct to use Tool instead of AppContext for better abstraction.
- Improved error handling and logging in image download functions.
- Added progress indicators for downloading and decompressing root filesystem images.
- Refactored build arguments handling in axvisor and starry modules to simplify configuration.
- Introduced a new qemu_override module to manage QEMU runtime configurations.
- Enhanced the build process to ensure required artifacts are downloaded with progress feedback.
- Removed obsolete ArceosConfigOverride and related code to clean up the configuration management.
* Refactor xtask: Remove unused modules and streamline main functionality
- Deleted unused modules: `qemu_override.rs`, `build.rs`, `config.rs`, `mod.rs`, and `run.rs` from the `starry` and `xtask` directories.
- Simplified the `main.rs` file to directly call `axbuild::run()` for improved clarity and reduced complexity.
- Removed redundant code related to target handling and test execution for `StarryOS` and `ArceOS`.
- Consolidated error handling and logging for better maintainability.
* 更新 BuildConfig 结构体,修改日志级别字段为非可选类型,并在默认实现中初始化环境变量
* 更新依赖项,重构构建配置,增强日志记录功能并添加进程扩展
* 修复错误处理:将 `anyhow::anyhow!` 替换为 `anyhow!` 以简化错误消息生成
* 增强 ArceOS 构建功能:添加 U-Boot 支持,重构相关逻辑并清理依赖项
* 重构内存分配器:重命名 hv 特性为 buddy-slab
* 增强 BuildConfig 结构体:添加新构造函数以支持动态配置,修改 ArgsBuild 结构体以使用 no_dyn 选项
* 增强 ArceOS 构建功能:添加 BuildConfigLookupKey 结构体,重构相关逻辑以支持新的构建配置路径解析;更新 .gitignore 文件以排除 .arceos_* 文件
* Refactor Arceos build configuration and command handling
- Updated the `BuildConfig` structure to `ArceosBuildInfo` with new fields and methods.
- Modified the `build.rs` file to accommodate the new structure and improve feature resolution.
- Changed the command-line argument handling in `mod.rs` to use `BuildCliArgs`.
- Enhanced the `AppContext` to prepare requests with improved snapshot handling.
- Added tests for new functionality, including loading and storing build snapshots.
- Updated `.gitignore` to refine ignored patterns for build artifacts.
* Refactor ArceOS and StarryOS CLI argument handling and build process
- Renamed `no_dyn` argument to `plat_dyn` in ArceOS and updated related structures and tests.
- Introduced new `StarryCliArgs` structure for StarryOS command handling.
- Added new StarryOS build module with functions to resolve build info paths and load cargo configurations.
- Implemented command handling for StarryOS in the main application, including build, QEMU, and U-Boot commands.
- Enhanced tests for StarryOS to ensure correct argument parsing and build info handling.
- Updated serialization and deserialization logic for new structures in both ArceOS and StarryOS.
* 增强 ArceOS 和 StarryOS 的 QEMU 运行支持:更新参数以接受额外的命令行参数和正则表达式,重构相关逻辑以适应新的构建需求
* 增强 StarryOS 的 rootfs 支持:添加 rootfs 模块,下载并解压 rootfs 镜像,更新相关命令和参数以支持新的构建流程
* 增强 ArceOS 支持:为 x86_64 目标添加默认 to_bin 配置,并更新相关逻辑以支持新的构建需求
* 增强 ArceOS 支持:修改默认日志级别为 Warn,并添加测试命令以支持标准测试
* 增强 QEMU 测试支持:添加 ArceOS 和 StarryOS 的 QEMU 测试逻辑,更新测试配置文件以支持多种架构
* 为所有 StarryOS QEMU 配置文件添加超时设置
* 增强 Axvisor 支持:添加图像管理功能,更新配置和存储逻辑以支持新功能
* 更新 QEMU 配置文件:将磁盘映像路径修改为相对路径以支持工作区结构
* 增强测试支持:添加条件编译标记以优化测试模块,清理导入并修复代码风格
* 更新 ostool 版本至 0.10.0,重构 ArceosBuildInfo 和 StarryBuildInfo 中的配置方法以提高代码一致性
* 增强 ArceosBuildInfo 结构,添加 max_cpu_num 字段并实现相关验证逻辑;优化代码风格,清理导入;更新多个文件以支持新功能
* 增强 ArceOS 测试支持:为 task/affinity、irq、parallel、priority、sleep、wait_queue、yield 添加多架构构建配置
* 更新 AGENTS.md,添加关于使用 cargo xtask 的建议;更新 qemu-loongarch64.toml,修复 nographic 参数位置
* 统一测试成功输出消息为 'All tests passed!' 并更新相关配置文件
* 更新 arm-gic-driver 版本至 0.16.5,并修正相关校验和
* Refactor image handling in Axvisor
- Updated the setup_qemu.sh script to replace `cargo xtask image download` with `cargo axvisor image pull` for consistency in image downloading.
- Introduced a fallback registry URL in the image configuration to enhance registry resolution.
- Added a new `pull` command to the Axvisor CLI for downloading images, including options for output directory and extraction control.
- Implemented image specification parsing to handle image names and versions more effectively.
- Enhanced the image registry to support fetching from a fallback source if the default registry is unavailable.
- Refactored the storage module to include image pulling functionality, ensuring proper checksum verification and extraction of downloaded images.
- Created a dedicated download module to handle HTTP requests and progress tracking for downloads.
- Updated tests to cover new functionality, including pulling images and handling registry fallbacks.
* 增强 Axvisor 支持:添加构建和运行命令,更新文档,修复配置路径
* 更新 Axvisor 配置文件,使用新的构建配置文件名,修正相关文档和代码中的路径
* 增强 Axvisor 支持:添加默认板级配置生成逻辑,更新文档,修复相关测试
* 增强 Axvisor 支持:添加 QEMU 测试逻辑,更新文档,修复相关路径
* 增强 Axvisor 支持:更新 QEMU 配置逻辑,添加默认参数处理,修复相关测试
* 增强 Axvisor 支持:添加平台特性归一化逻辑,更新相关测试
* 增强 Axvisor 支持:更新依赖项版本,修复配置路径,添加 Nimbos x86_64 支持
* 增强 Axvisor 支持:移除无效的 x86_64 目标配置,添加 axvisor x86_64 测试逻辑
* 增强 Axvisor 支持:替换 CargoQemuAppendArgs 为 CargoQemuOverrideArgs,更新相关测试逻辑1 parent f3c6fd3 commit 7066a6f
25 files changed
Lines changed: 32 additions & 3018 deletions
File tree
- configs
- board
- vms
- doc
- scripts
- xtask/src
- image
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
142 | 127 | | |
143 | 128 | | |
144 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
5 | 2 | | |
6 | | - | |
7 | 3 | | |
8 | 4 | | |
9 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
5 | 2 | | |
6 | | - | |
7 | 3 | | |
8 | 4 | | |
9 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
5 | 2 | | |
6 | 3 | | |
7 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
5 | 2 | | |
6 | | - | |
7 | 3 | | |
8 | 4 | | |
9 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| |||
0 commit comments