:::{note}
**AI Translation Notice**

This document was automatically translated by `Qwen/Qwen3-8B` model, for reference only.

- Source document: community/ChangeLog/V0.1.x/V0.1.3.md

- Translation time: 2025-05-19 01:41:49

- Translation model: `Qwen/Qwen3-8B`

Please report issues via [Community Channel](https://github.com/DragonOS-Community/DragonOS/issues)

:::

# V0.1.3

:::{note}
Author: Longjin <longjin@RinGoTek.cn>

January 8, 2023
:::

## Contributors

The DragonOS V0.1.3 version was contributed by the following individuals:

- Longjin <longjin@RinGoTek.cn>
- Wu Yujian <wuyujian@DragonOS.org>
- Guan Jinquan <guanjinquan@DragonOS.org>
- Gou Ngai <sujintao@DragonOS.org>

## Sponsors

Thank you to the following individuals for their support. We will continue to strive for excellence!

- David Wen
- [Seele.Clover](https://github.com/seeleclover)
- TerryLeeSCUT 
- Wu
- slientbard

## Update Content - Kernel

- syscall: new: Add getpid system call (#_translated_label__120_en)
- signal: update: Add all signals except SIGKILL to SigQueue (#_translated_label__120_en)
- rtc: refactor: Refactor RTC driver using Rust (#_translated_label__118_en)
- doc: new: Add documentation for signal (#_translated_label__126_en)
- Spinlock: new: Add Rust-written RawSpinlock (#_translated_label__127_en)
- arch: update: Change the path of the arch module in lib.rs, so that other modules can use the code in arch without specifying arch::x86_64 (#_translated_label__128_en)
- mm: bugfix: Fix the bug where ZONE_NORMAL_INDEX was always 0 during initialization of the page allocator (#_translated_label__129_en)
- scheduler: new: Refactor CFS scheduler using Rust (#_translated_label__131_en)
- smp: Remove the HPET interrupt forwarding function that has been deprecated in smp (#_translated_label__131_en)
- process: bugfix: Fix the issue where the init process forgot to set the fs and gs registers. (#_translated_label__132_en)
- vfs: update: Rename the VFS folder to vfs (#_translated_label__133_en)
- lockref: new: Add Rust version of lockref (#_translated_label__135_en)
- cpu: new: Rust wrapper for cpu_relax(), using the pause instruction to let the CPU rest for a while, reducing idle power consumption. (#_translated_label__135_en)
- Refactor softirq mechanism using Rust (#_translated_label__138_en)

## Update Content - User Environment

- libc: bugfix: Always register sigkill when registering signal handlers (#_translated_label__120_en)
- libc: new: Add raise, kill, abort (#_translated_label__120_en)
- libc: new: Add an arch folder, and add crt0, crti, crtn files under it (#_translated_label__134_en)
- libc: new: Add `fflush()`, `fprintf()`, `stdin`, `stdout`, `stderr`, `ferror()`, `fopen()`, `fclose()`, `putchar()`, `puts()` (#_translated_label__136_en)
- libc: new: Simply add `fopen()` for handling the mode parameter. Please note that it does not fully comply with POSIX, and is inconsistent with Linux. It will be improved when using Rust in the future. (#_translated_label__141_en)
- Porting: new: Add porting and build scripts for gmp, mpfr, and mpc (#_translated_label__136_en)
- Porting: new: Add cross-compilation build scripts for gcc and binutils, as well as patches for gcc-11.3.0 and binutils-2.38 (in the DragonOS-community repository) (#_translated_label__136_en)
- compile: update: Update the include path for the compiler, so that includes do not need the `<libc/src/include/>` prefix (#_translated_label__124_en)

## Update Content - Others

- bugfix: Fix the bug where Docker installation would exit abnormally (#_translated_label__116_en)
- new: Add a new GCC bare-metal compiler targeting x86_64-elf, and use it to compile DragonOS (#_translated_label__111_en)
- update: Update the Docker build image to version `dragonos/dragonos-dev:v1.2`, and support building this build image from a Dockerfile (#_translated_label__111_en)
- bugfix: Fix the bug where the MBR disk image did not set the boot flag (#_translated_label__111_en)
- update: Update the GitHub workflow, add cache, and speed up build checks
- bugfix: Fix the error message when downloading grub2.06 (#_translated_label__125_en)

## Update Content - Software Porting

- new: gcc 11.3.0 userland cross-compiler, commit: `64a5b1cbf28e3305560e166c1b6624e99745c720`, repository: [https://github.com/DragonOS-Community/gcc](https://github.com/DragonOS-Community/gcc)
- new: binutils 2.38 cross-compile tools, commit: `a0ae560e0065862a9867b9e1f8364749ef38d99e`, repository: [https://github.com/DragonOS-Community/binutils](https://github.com/DragonOS-Community/binutils)
- new: gmp 6.2.1, commit: `dd9eee5778fb6027fafa4fe850aff21b1a71c18e`, repository: [https://github.com/DragonOS-Community/gmp-6.2.1](https://github.com/DragonOS-Community/gmp-6.2.1)
- new: mpfr 4.1.1, commit: `fa8e30cdc2e838fdd82b60fec31fcfc5e118aad6`, repository: [https://github.com/DragonOS-Community/mpfr](https://github.com/DragonOS-Community/mpfr)
- new: mpc 1.2.1, (can be ported without applying patches), repository: [https://github.com/DragonOS-Community/mpc](https://github.com/DragonOS-Community/mpc)

## Source Code and Release Image Download

&emsp;&emsp;You can obtain the source code through the following methods:

### Get via Git

- You can download the release code and the compiled, runnable disk image from [https://github.com/fslongjin/DragonOS/releases](https://github.com/fslongjin/DragonOS/releases).
- We also have a mirror repository on Gitee for download: [https://gitee.com/DragonOS/DragonOS](https://gitee.com/DragonOS/DragonOS)

### Get via DragonOS Software Mirror Site

&emsp;&emsp;To address the slow and unstable access to GitHub in China, and to make it convenient for developers to download the code of each version of DragonOS, we have specially set up a mirror site. You can access the mirror site through the following address:

&emsp;&emsp;You can obtain the DragonOS source code archive and the compiled, runnable disk image through the mirror site.

- [https://mirrors.DragonOS.org](https://mirrors.DragonOS.org)
- [https://mirrors.DragonOS.org.cn](https://mirrors.DragonOS.org.cn)
- Domestic mirror acceleration: [https://mirrors.ringotek.cn/](https://mirrors.ringotek.cn/)

## Open Source Declaration

:::{note}
To promote the healthy development of the DragonOS project, DragonOS is released under the GPLv2 open source license. Anyone who can obtain the DragonOS source code and corresponding software products (including but not limited to binary copies and documentation) can enjoy the rights granted by us through the GPLv2 protocol, while you also need to comply with the obligations stipulated in the protocol.

This is a rather strict protocol that protects the healthy development of open source software and prevents it from being encroached upon.

For most well-intentioned people, you will not violate our open source license.

We encourage the free dissemination and promotion of DragonOS, but please ensure that all actions do not infringe on the legitimate rights and interests of others or violate the GPLv2 protocol.

Please pay special attention to the fact that violations of the open source license, especially **commercial closed-source usage and any acts of plagiarism or academic misconduct**, will be subject to serious accountability. (This is the easiest scenario to violate our open source license.)

Also, please note that according to the requirements of the GPLv2 protocol, software modified or developed based on DragonOS must also be open-sourced under the GPLv2 protocol and must indicate that it is based on DragonOS. It must also ensure that users of these modified versions can easily obtain the original version of DragonOS.

You must allow the DragonOS developers to obtain the source code of your modified version through the same method from public channels; otherwise, you will violate the GPLv2 protocol.

For detailed information about the protocol, please read the **LICENSE** file in the root directory of the project. Please note that, according to the requirements of the GPLv2 protocol, **only the English original version has legal effect**. Any translated version is for reference only.
:::

### Usage of Open Source Software

&emsp;&emsp;During the development of DragonOS, we have referenced the design of some open source projects, or introduced parts of their code, or been inspired by them. Below is a list of these open source projects. We sincerely thank the contributors of these open source projects!

Format: <Project Name> - <Link> - <Open Source License>

- Linux - https://git.kernel.org/ - GPLv2
- skiftOS - https://github.com/skiftOS/skift - MIT
- FYSOS - https://github.com/fysnet/FYSOS - [FYSOS' License](https://github.com/fysnet/FYSOS/blob/9a8968e3d6600de34539c028c843f4c06d134039/license.txt)
- LemonOS - https://github.com/LemonOSProject/LemonOS.git - BSD 2-Clause License
- LZ4 - https://github.com/lz4/lz4 - BSD 2-Clause license
- SerenityOS - https://github.com/SerenityOS/serenity.git - BSD 2-Clause license
- MINE - "A Design and Implementation of a 64-bit Operating System" by Tian Yu; People's Posts and Telecommunications Press
- chcore - "Modern Operating Systems: Design and Implementation" by Chen Haibo, Xia Yubin; Machinery Industry Press
- SimpleKernel - https://github.com/Simple-XX/SimpleKernel - MIT
- rcore-fs - https://github.com/rcore-os/rcore-fs.git - MIT

## All Commit Records of the Current Version

```text
commit a8b621c8d1fe77251b8e4eafe258dc0ee7366dd5
Author: login <longjin@ringotek.cn>
Date:   Sun Jan 8 15:47:44 2023 +0800

    修正由于libc中具有crti.S和crtn.S，造成的与x86_64-elf-gcc不兼容的问题 (#144)

commit 9358ff0f6f7daa18d6fab4497de025736b3d6725
Author: login <longjin@ringotek.cn>
Date:   Sun Jan 8 15:06:52 2023 +0800

    Add v0.1.3 changelog (#143)
    
    * new: 0.1.3发行日志
    
    * 新增输出指定时间范围内的贡献者名单的脚本
    
    * 更新bootloader文档
    
    * update: 简介文档
    
    * new: 镜像站文档
    
    * update: 功能特性文档

commit fd91905f022b3ceaa59e666d1ff42d91fb8d40ef
Author: login <longjin@ringotek.cn>
Date:   Sun Jan 8 11:38:59 2023 +0800

    解决编译gcc、binutils的脚本中，变量名称错误的问题 (#142)

commit 62e4613978193aaf5d949a331df0398f2d085a30
Author: Gou Ngai <94795048+AlbertSanoe@users.noreply.github.com>
Date:   Sat Jan 7 23:15:37 2023 +0800

    使用rust重构softirq机制；解决Rtc驱动的编译警告问题 (#138)
    
    * 使用rust重构softirq机制
    * 解决Rtc驱动的编译警告问题
    
    Co-authored-by: longjin <longjin@RinGoTek.cn>

commit e9fdc57bf878f1bc5cc5743dfaeeaef743439291
Author: login <longjin@ringotek.cn>
Date:   Sat Jan 7 22:36:49 2023 +0800

    简单添加了fopen对mode参数的处理。请注意，它没有完全遵循posix，也与Linux的不一致，将来使用Rust的时候完善它。 (#141)

commit 2224c93ea968bc74621f7e124b4aca04875b3e6a
Author: guanjinquan <1666320330@qq.com>
Date:   Fri Jan 6 21:29:23 2023 +0800

    完善libc，构建了OS-specific工具链，编译了基于gcc-11.3.0的DragonOS userland compiler，移植了mpfr,gmp,mpc库 (#134)
    
    * 修改include路径
    
    * 添加了创建libsysapi.a和/bin/sysroot/usr/include/+lib/的代码
    
    * 修补.gitignore
    
    * 删除多余项
    
    * 优化脚本可读性
    
    * 新增crt0 crti crtn
    
    * 编译binutils所需的东西
    
    * fflush()和fprintf()的简单实现
    
    * 应用程序启动前，调用初始化libc的函数
    
    * 自动创建sysroot
    
    * 添加了stderr的初始化
    
    * 修改了stderr的初始化
    
    * 内核添加对stdio的简略处理
    
    * 格式化代码
    
    * 修正打开stdio文件描述符的问题
    
    * bugfix: 修复fprintf忘记释放buf的问题
    
    * 修复shell错误地把入口设置为main而不是_start的问题
    
    * 新增__cxa_atexit  (gcc要求libc提供这个）
    
    * 增加putchar puts
    
    * 更新写入磁盘镜像的脚本，默认无参数时，使用legacy方式安装
    
    * 更新编译脚本
    
    * stdio增加eof的定义
    
    * 新增extern cplusplus
    
    * mpfr gmp mpc 构建脚本
    
    * 更新libsysapi.a为libc.a
    
    * 加上ferror fopen fclose
    
    * 更新移植的软件的构建脚本
    
    * 更改build_gcc_toolchain.sh中的-save参数名为-save-cache
    
    Co-authored-by: longjin <longjin@RinGoTek.cn>

commit 61de2cdc3f29cdc6c441f128119e01e003e6f3ca
Author: login <longjin@ringotek.cn>
Date:   Tue Jan 3 23:09:25 2023 +0800

    新增rust版本的lockref (#135)
    
    * new:Rust封装cpu_relax(),通过pause指令，让cpu休息一会儿。降低空转功耗
    
    * new: Rust版本的lockref
    
    * Rust的RawSpinlock新增is_locked()和set_value()方法。
    
    * lockref文档

commit 2726f101b4cc787bbd36a69afffb0112f3a6567f
Author: login <longjin@ringotek.cn>
Date:   Tue Jan 3 21:01:56 2023 +0800

    删除无用的cfs.h (#136)

commit 587086d3f299f7394559d547c828191be20cfc11
Author: login <longjin@ringotek.cn>
Date:   Sun Jan 1 16:53:57 2023 +0800

    1、在文件系统目录下增加mod.rs 2、将VFS的路径改为vfs(#133)
    
    2、将VFS的路径改为vfs

commit 843e442971a47693f37a5f8d3452c383f7325359
Author: login <longjin@ringotek.cn>
Date:   Sat Dec 31 18:43:05 2022 +0800

    修复init进程忘记设定fs gs寄存器的问题。 (#132)

commit 74bde36e014ff501241bf40dd83653db47a2c8e4
Author: guanjinquan <1666320330@qq.com>
Date:   Sat Dec 31 17:35:39 2022 +0800

    Patch porting gcc v2 (#124)
    
    * 更改编译器的Include路径，使得include时不需要加`<libc/src/include/>`前缀
    
    * 修改include路径
    
    Co-authored-by: longjin <longjin@RinGoTek.cn>

commit d4f3de93a23e4bd4f000a3663768d47d094bf188
Author: login <longjin@ringotek.cn>
Date:   Sat Dec 31 17:26:12 2022 +0800

    使用Rust重构CFS调度器 (#131)
    
    * 新建调度器的文件
    
    * 把softirq vector移动到c文件中（原来在.h)
    
    * 将进程切换方式改为“中断返回时切换”
    
    * new:使用rust重构CFS
    
    * 删除已经在smp中废弃的HPET中断转发函数
    
    * 代码格式化
    
    * 删除多余的dunce依赖

commit 156949680c83f2d7e3b21ed68b11698b88eaf396
Author: login <longjin@ringotek.cn>
Date:   Sat Dec 31 13:47:49 2022 +0800

    bugfix:修复当使用sched()运行调度器，在切换进程的时候，由于不在中断上下文内，导致当前进程的上下文丢失的问题。 (#130)
    
    bugfix:修复当使用sched()运行调度器，在切换进程的时候，由于不在中断上下文内，导致当前进程的上下文丢失的问题。
    bugfix:修复切换进程的宏的汇编代码的损坏部分，未声明rax寄存器，从而导致的编译器未定义行为问题。

commit 882f0b7e7498dbff8de527b2b9159b7f6e6359c9
Author: YJwu2023 <119829947+YJwu2023@users.noreply.github.com>
Date:   Wed Dec 28 19:35:17 2022 +0800

    修复内存bug与grub安装脚本的错误 (#129)
    
    * 修复内存bug与grub安装脚本的错误
    
    * 修改小bug

commit adc1846b06fb862caed049f435fc0061488a6ff9
Author: login <longjin@ringotek.cn>
Date:   Mon Dec 26 13:13:12 2022 +0800

    内核：在lib.rs中，将arch模块的路径进行更改，使得其他模块使用arch的代码时，不需要指定arch::x86_64 (#128)

commit ac643d420b22f9d454ecefccd51ed34a9664586b
Author: login <longjin@ringotek.cn>
Date:   Sun Dec 25 23:53:35 2022 +0800

    new:新增rust写的RawSpinlock (#127)

commit 998390210549b47e6bdcc3fdab49eff4086ad18b
Author: login <longjin@ringotek.cn>
Date:   Sat Dec 24 23:30:26 2022 +0800

    新增signal文档 (#126)
    
    * 新增signal文档

commit a7f5ca7b67160557abf84a1169dd60093220aeb0
Author: YJwu2023 <119829947+YJwu2023@users.noreply.github.com>
Date:   Sat Dec 24 23:29:36 2022 +0800

    修复下载grub2.06时的提示错误 (#125)
    
    * 修复grub下载显示提示显示错误

commit 82762007da41148e1ed1df465211eb5c8ba2c15e
Author: login <longjin@ringotek.cn>
Date:   Fri Dec 23 18:11:47 2022 +0800

    Update makefile.yml

commit b975025ec8854ca232152f4ee44cc2226891a34c
Author: login <longjin@ringotek.cn>
Date:   Fri Dec 23 11:45:19 2022 +0800

    Update makefile.yml

commit ad2bb74d949bfcb2935e43ac7b261d7ecce23389
Author: login <longjin@ringotek.cn>
Date:   Fri Dec 23 11:21:22 2022 +0800

    Update makefile.yml

commit 6b7776d189ab5f19fbab20d6c5c9ed3ab20c7ab6
Author: login <longjin@ringotek.cn>
Date:   Fri Dec 23 10:59:15 2022 +0800

    修正smp的makefile中没有替换AS的问题

commit beb12a188b6c6bc4196796ac2ae1ecd7d8ed8223
Author: login <longjin@ringotek.cn>
Date:   Fri Dec 23 10:57:39 2022 +0800

    Update makefile.yml

commit d65c527730e5c8a75f6dad0f996c093040699ee3
Author: login <longjin@ringotek.cn>
Date:   Thu Dec 22 22:58:28 2022 +0800

    Update makefile.yml (#121)

commit 5ed4cd460200cb19aae8c3c67dfd77e1e9f0e105
Author: guanjinquan <75822481+guanjinquan@users.noreply.github.com>
Date:   Thu Dec 22 21:09:12 2022 +0800

    Patch gcc toolchain (#111)
    
    * 添加了GCC_cross_compile——tool_chain
    
    * - 解决环境变量路径拼接时，多了`/`的问题
    - apt安装时增加-y,不需用户确认
    
    * 解决添加环境变量的命令有误的问题
    
    * 修正编译错误时，还会执行下一步的问题
    
    * new: 编译完成后清理临时文件
    
    * 更新makefile
    
    * 调整：把grub安装在 $HOME/opt/dragonos-grub下
    
    * new: 新增dockerfile
    
    * 将镜像源换成中科大的（原因是清华的总是ban掉用于构建镜像的服务器的ip）
    
    * 修改为基于debian bullseye构建
    
    * 取消指定版本
    
    * 修复MBR磁盘镜像未设置启动标志的bug
    
    * 取消在docker中安装grub
    
    * 安装grub的过程改到客户机上进行
    
    * bootstrap.sh 添加--no-docker
    
    * 使用新版的docker编译镜像
    
    * 修补, 添加了一些关于gcc的check
    
    Co-authored-by: longjin <longjin@RinGoTek.cn>

commit ba0d93d8b26034abc54bcaf3f0ff04863bbd076e
Author: Gou Ngai <94795048+AlbertSanoe@users.noreply.github.com>
Date:   Mon Dec 19 15:04:37 2022 +0800

    refactor rtc module in rust (#118)
    
    * 用rust重构rtc模块
    
    * refactor the rtc module by rust
    
    * rtc-updated
    
    * rtc-updated-4
    
    * rtc

commit c588d6f77f4b38939701b946228218ea81a7c8dc
Author: login <longjin@ringotek.cn>
Date:   Mon Dec 19 15:03:44 2022 +0800

    Patch add abort func (#120)
    
    * 对于除了sigkill以外的信号，也加入队列
    
    * bugfix:libc中，注册信号处理函数时，总是注册sigkill的问题
    
    * 增加getpid系统调用
    
    * 增加了raise、kill、abort

commit 47f0d12a1f1a1aa11be8e751ecdbf76f0cb596d9
Author: YJwu2023 <119829947+YJwu2023@users.noreply.github.com>
Date:   Mon Dec 19 14:53:51 2022 +0800

    修复docker安装时异常退出的bug (#119)
    
    * 修复docker安装时异常退出的bug
    
    * 修复grub编译脚本的小bug

commit 978043e47d1143ca2d5cf22b20793f032e8eb5a5
Author: login <longjin@ringotek.cn>
Date:   Sun Dec 18 15:09:15 2022 +0800

    修复当系统中不存在dosfstools时，无法正确格式化磁盘镜像的问题 (#117)
    
    * 修复当系统中不存在dosfstools时，无法正确格式化磁盘镜像的问题

commit f9127772dc372a2e607388fdd6818d3f9c4c6d28
Author: YJwu2023 <119829947+YJwu2023@users.noreply.github.com>
Date:   Sat Dec 17 23:43:23 2022 +0800

    修复docker安装时异常退出的bug (#116)

```
