BUPT-OS / RROS

RROS is a dual-kernel OS for satellites or other scenarios that need both real-time and general-purpose abilities. RROS = RTOS (Rust) + Linux (C).
https://bupt-os.github.io/website/
Other
567 stars 40 forks source link

Port dovetail to loongarch Linux v6.6 #45

Closed zzSunil closed 1 month ago

zzSunil commented 2 months ago

As described in https://github.com/BUPT-OS/RROS/issues/46, this patch port the Dovetail interrupt virtualization layer used by RROS to the LoongArch architecture.

A repository containing the bootloader, QEMU virtual machine starter scripts, and initramfs is provided to run testing for developers.

It also includes a .config file that I use, which disables most kernel module compilations to improve build speed. All IRQ_PIPELINE and DOVETAIL related features and debug options are enabled. Additionally, the LOCKDEP option is enabled to facilitate my previous debugging work.

https://github.com/zzLinus/qemu-la-env

Currently, the IPI interrupt part for architecture-specific support has not been implemented, but this does not affect the correctness of current kernel running in QEMU VM when the "--smp $NCORE" option is not enabled.

Richardhongyu commented 2 months ago

Great work! Before moving on, please commit the PR in English for international cooperation. You can also check the documentation to format your PR properly.

Richardhongyu commented 2 months ago

Meanwhile, open an issue and attach its link in the PR comment. It will help the latter developers better know why this PR is needed.

Richardhongyu commented 2 months ago

You can add a commit to enable the github action in the linux 6.6 branch.

zzSunil commented 1 month ago

Apply patch list from https://lkml.org/lkml/2024/1/8/37.Enable rust for linux support for loongarch, but it needs disable CONFIG_RELOCATABLE for now so clang can compile normally.

When RUST_SUPPORT is enable, LLVM=1 option must be set when build kernel, otherwise some compile argument will trigger error. image

But clang will complain line 613 at arch/loongarch/include/asm/asmmacro.h.So the only way to compile kernel now is to disable RELOCATABLE config option to bypass this code block. image

Kernel can boot normally after tweaking these kernel option.