Skip to content

Add preliminary RISC-V platform support, remove hals, update dependencies#377

Open
aarkegz wants to merge 26 commits intomasterfrom
aar-master
Open

Add preliminary RISC-V platform support, remove hals, update dependencies#377
aarkegz wants to merge 26 commits intomasterfrom
aar-master

Conversation

@aarkegz
Copy link
Contributor

@aarkegz aarkegz commented Mar 6, 2026

liulog and others added 16 commits January 6, 2026 15:54
Major changes:
- Update dependencies to use official arceos-hypervisor repositories (next branch)
  - axdevice, axvmconfig, riscv_vcpu, riscv_vplic, arm_vgic
  - Replace range-alloc with range-alloc-arceos
  - Update axvisor_api and axvisor_api_proc to crates.io versions

- Refactor RISC-V interrupt injection mechanism
  - Replace axvisor_api::api_mod_impl with crate_interface
  - Define InjectIrqIf trait in platform layer
  - Implement trait in kernel layer for better separation of concerns

- Platform-specific improvements
  - Adjust DTB load address for linux-riscv64 (0x9200_0000 -> 0x9300_0000)
  - Remove ept-level-4 feature from qemu-riscv64 config
  - Add success regex pattern "Hello, world!" for CI tests

- Code quality improvements
  - Fix formatting and remove trailing whitespace
  - Reorganize imports for consistency
  - Update image SHA256 checksums

- Build system updates
  - Add axplat-riscv64-qemu-virt dependency to kernel
  - Update xtask formatting and structure
Merged riscv_qemu branch into aar-next to combine RISC-V support.

Conflicts resolved:
- .cargo/config.toml: Keep riscv_qemu's riscv64 target config
- Cargo.toml: Combined both branches' changes, added axplat-riscv64-qemu-virt
- configs/board/qemu-riscv64.toml: Merged features and settings
- kernel/src/hal/arch/riscv64/mod.rs: Kept riscv_qemu's interrupt injection
- scripts/ostool/qemu-riscv64.toml: Merged QEMU args
- xtask/src/image.rs: Kept riscv_qemu version
- xtask/src/main.rs: Removed duplicate empty lines
- Cargo.lock: Kept aar-master version

New features:
- RISC-V64 QEMU virt platform support
- SMP support for RISC-V (4 CPUs)
- Platform-specific configurations
@aarkegz aarkegz requested a review from hky1999 March 6, 2026 07:37
aarkegz and others added 8 commits March 6, 2026 15:43
feat: add target OS configuration for no_std environment
fix: improve error handling for schema file writing
* chore: update Cargo.lock and qemu-aarch64.toml for dependency adjustments

* feat: Add QEMU runner and configuration for ArceOS

- Implemented QEMU runner in `qemu.rs` to facilitate running ArceOS applications in QEMU.
- Added board configuration files for AArch64, RISC-V, and x86_64 architectures.
- Introduced `xtask` commands for building and running ArceOS applications.
- Enhanced configuration loading to support command line arguments and board-specific settings.
- Implemented default configuration setup for specified boards.
- Updated dependencies in `Cargo.toml` for enhanced functionality.
- Added tests for QEMU runner and configuration loading.

* feat: add wait queue test suite for ArceOS

* style: apply cargo fmt

* refactor(axbuild): reuse ostool build and qemu runners

* fix: simplify xtask alias in Cargo configuration

* style: fix comment indentation in build.rs template

* Refactor board configuration loading and QEMU runner integration

- Updated `load_board_config` to use the new config module's board loader for backward compatibility.
- Refactored `QemuRunner` to accept `manifest_dir` instead of `image_path` and `arceos_dir`, simplifying the constructor and related methods.
- Removed redundant code and improved error handling in `run_defconfig` by leveraging `apply_defconfig`.
- Enhanced configuration loading logic to prioritize command line arguments and board configurations.
- Updated tests to reflect changes in the QEMU runner and configuration loading.
- Cleaned up unused functions and imports in the configuration module.
- Bumped `ostool` version in `Cargo.lock` to 0.8.13.

* feat: add support for ArceOS targets and improve configuration management

* feat: enhance ArceOS configuration with SMP support and QEMU integration

* fix: update .gitignore to include axconfig wildcard and modify NUM_TASKS constant in main.rs

* fix: prevent negative initialization value in TimeIf implementation

* fix std test flakiness in scope-local and smoltcp doctest

* feat: Introduce AxContext and AxBuild for improved configuration management

- Added AxContext struct to encapsulate application context including configuration, manifest directory, and QEMU configuration path.
- Implemented AxBuild struct to facilitate building and running applications with QEMU.
- Refactored existing code to utilize AxContext and AxBuild, enhancing modularity and readability.
- Removed deprecated board configuration files for QEMU (aarch64, riscv64, x86_64) as they are no longer needed.
- Updated build and run commands to leverage new AxBuild structure, simplifying the command flow.
- Adjusted tests and configuration overrides to align with the new context management approach.

* fix: update Cargo.toml to include axerrno patch and clean up unused code in ostool

* fix: update ostool to improve platform handling and cargo argument construction

* refactor: improve test cases for config loading and cleanup functionality

* fix: update axbuild dependency path and remove unnecessary features

* refactor: rename log level conversion method and improve formatting in config handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants