作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2023, Vol. 49 ›› Issue (12): 25-34, 45. doi: 10.19678/j.issn.1000-3428.0067108

• 计算机系统前沿技术 • 上一篇    下一篇

支持MIPS架构的轻量型开源鸿蒙系统移植

王一泠1,2, 吴琦1, 安军社1,2   

  1. 1. 中国科学院国家空间科学中心 复杂航天系统电子信息技术重点实验室, 北京 100190
    2. 中国科学院大学 计算机科学与技术学院, 北京 100049
  • 收稿日期:2023-03-04 出版日期:2023-12-15 发布日期:2023-12-14
  • 作者简介:

    王一泠(1998—),女,硕士研究生,主研方向为实时操作系统、嵌入式应用技术

    吴琦,高级工程师、博士

    安军社,研究员、博士

  • 基金资助:
    国家重点研发计划(2022YFF0503900)

Porting of Lightweight OpenHarmony System Supporting MIPS Architecture

Yiling WANG1,2, Qi WU1, Junshe AN1,2   

  1. 1. Key Laboratory of Electronic Information Technology for Complex Aerospace Systems, National Space Science Center, Chinese Academy of Sciences, Beijing 100190, China
    2. School of Computer Science and Technology, University of Chinese Academy of Sciences, Beijing 100049, China
  • Received:2023-03-04 Online:2023-12-15 Published:2023-12-14

摘要:

空间数据系统咨询委员会高级在轨系统标准定义的空间数据系统分布式架构是提高星载系统整体可靠性的一种有效方案。国内通常采用基于MIPS架构的龙芯系列处理器作为该架构典型应用节点的航天器控制终端,但由于缺失自主可控的轻量型操作系统,限制了该架构在航天领域的部署与应用。为了构建自主可控的航天信息系统技术体系,实现在龙芯控制终端上移植适配国产轻量型开源鸿蒙操作系统的目标,通过分析开源鸿蒙操作系统LiteOS-M轻量实时内核与MIPS架构,聚焦硬件抽象层(HAL)和内核硬件相关部分,设计并实现一种包括引导系统启动加载、HAL架构适配、串口驱动、内核裁剪、工具链搭建的移植方案。为了验证移植后系统的基础功能与实时性能指标,在基于MIPS架构的龙芯星载控制终端LS1J与LS1C硬件平台上设计测试用例并开展实验。实验结果表明,轻量型开源鸿蒙操作系统成功适配MIPS架构,能够稳定可靠地运行在龙芯控制终端上,系统任务上下文切换时延为0.229 μs,中断响应时延为4.73 μs,满足实时性系统指标。

关键词: 移植, 开源鸿蒙系统, MIPS架构, 龙芯处理器, 控制终端, 分布式架构

Abstract:

The distributed architecture of the spatial data system defined by the Consultative Committee for Space Data Systems(CCSDS) advanced in-orbit system standard is an effective solution to improve the overall reliability of the on-board system. In China, the spacecraft control terminals, as typical application nodes of the architecture, typically use Loongson series processors based on Microprocessor without Interlocked Pipelined Stages(MIPS) architecture. However, because of the lack of an autonomous and controllable lightweight operating system, the deployment and application of this architecture in China's aerospace field are limited. The aim of this study is to build an autonomous and controllable aerospace information system technology architecture and achieve the porting and adapting to the domestic OpenHarmony lightweight operating system on the Loongson control terminals. By analyzing the LiteOS-M lightweight real-time kernel of OpenHarmony and MIPS architecture and focusing on the Hardware Abstraction Layer(HAL) and kernel hardware related parts, a porting scheme comprising boot loading, HAL architecture adaptation, serial driver, kernel clipping, and tool chain construction is designed and implemented. Experimental test cases are designed based on the MIPS architecture Loongson spaceborne control terminal LS1J and LS1C hardware platforms to verify the basic functions and real-time performance indicators of the migrated system. The experimental results show that the lightweight real-time system of OpenHarmony successfully adapts to the MIPS architecture and can run stably and reliably on the Loongson control terminal. The system task context switching delay is 0.229 μs, and the interrupt response delay is 4.73 μs, which satisfy the requirements for real-time system indicators.

Key words: porting, OpenHarmony system, MIPS architecture, Loongson processor, control terminal, distributed architecture