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

Tracking issue: Port RROS kernel onto Linux 6.6 #61

Open shannmu opened 3 weeks ago

shannmu commented 3 weeks ago

v6.6.y-rros-rebase tracing issue

What we have done

Now we have a branch named v6.6.y-rros-rebase, which rebases the v5.13-rros code onto linux 6.6.23.

What i did on this branch:

  1. Use v6.6.y from the linux-stable kernel tree as codebase

  2. Set the code's HEAD to Linux 6.6.23

  3. Apply the v6.6.y-linux-dovetail patch set

  4. Apply the Enable Rust support for AArch64 patchset

  5. Port rros kernel to Linux 6.6.23

    • Add rros kernel code

    • Add placeholder code in dovetail interface

    • Add rust wrapper code used in rros but not in the v6.6.y. For the rust wrapper code whose API used by rros has changed, I also copied the old version of the wrapper code and compiled them conditionally through CONFIG_RROS, including SpinLock, Mutex, WorkQueue, CondVar, Arc, Box, Error, ARef, module::module. All rust wrapper code not in linux-stable is also conditionally compiled with CONFIG_RROS(there may be omissions).

    • Add some features used in rros on Makefile.build

    • Make rust-analyzer parse rros code

    • Conditional compilation helper function

    • Fixed some code issues caused by Linux C code changes

      • Changes of the sb_buff structure and related functions
      • Some functions have been made inline
      • Changes of vm_area_struct

What we should do next

Guidelines about how to port rros kernel onto new r4l wrapper

NOTE: Ensure that each commit code is compilable and that the functionality of the entire PR passes the test

  1. Add a new config for which wrapper you want to port e.g. for SpinLock, add a CONFIG_RROS_SPINLOCK to replace CONFIG_RROS
  2. Remove the CONFIG_RROS_XXX and the unstable wrapper, and make the rros kernel compile
  3. Test rros kernel code by using libevl

Additional Information

I think we can use the code after this issue is closed as the codebase for the https://github.com/BUPT-OS/RROS/issues/48