ITADN
adamperkowski/highlightos
adamperkowski/highlightos · 文件 下载 ZIP
文件最后提交记录最后更新时间
README.md
以下内容由 AI 翻译,如有问题请点此提交 issue 反馈

HighlightOS

x86_64 操作系统(内核)完全使用汇编和 Rust 从零开始构建

README in English README in Polish README in Italian Documentation

GitHub Release GitHub License GitHub repo size GitHub Actions Workflow Status GitHub Actions Workflow Status

目录

在 Linux 上从源码构建

主内核

要求:

Steps:

  1. Make sure rustup is installed:
rustup --version
  1. Create a local clone of the repository:
git clone git@github.com:adamperkowski/highlightos.git && cd highlightos
  1. cd into the kernel/ directory:
cd kernel
  1. Build the bootable binary:
cargo bootimage --release

This command will create the target/target/release directory in which you'll find the bootimage-hlkernel.bin binary file.

HighlightOS ASM

要求:

  • Git 版本控制系统
  • NASM 汇编编译器

Steps:

  1. Create a local clone of the repository:
git clone git@github.com:adamperkowski/highlightos.git && cd highlightos
  1. cd into the asm/ directory:
cd asm
  1. Compile the bootable binary:
nasm -f bin boot.asm -o boot.bin

This command will generate & place the boot.bin file inside of the current directory.

在 Linux 上通过 QEMU 运行

要求:

  • QEMU(完整软件包)
  • HighlightOS 的可启动二进制文件。您可以从 releases 下载,或者 自行构建

步骤:

  1. cd 进入包含该二进制的目录。
  2. 运行以下命令:
qemu-system-x86_64 -drive format=raw,file=<your_binary_filename>.bin

[!IMPORTANT] 将 <your_binary_filename> 替换为您已下载/构建的二进制的实际名称。

在真实硬件上运行

你也可以将二进制镜像刷写到 U 盘上,并在真实机器上启动它。

您可以通过运行以下命令来刷写它:

dd if=<your_binary_filename>.bin of=/dev/sdX && sync

[!IMPORTANT] 请确保将 <your_binary_filename>.bin 替换为您下载/编译的二进制文件名称,并确保将 /dev/sdX 替换为您 USB 的实际分区号。其上的所有数据都将丢失!

[!NOTE] 您可以从 BIOS 启动菜单(通过按 F8F12 访问)中选择启动设备。

请再次确认您的主板支持启动传统介质,因为 HighlightOS 目前尚不兼容 UEFI。

附录

Documentation

开发状态

https://github.com/user-attachments/assets/663e8477-4275-411b-a39a-c12e54096ad8

附加信息

您知道我们有一个 IRC 频道吗?它是 #highlightos,位于 libera.chat

内置命令和功能列表可在此处
如需进一步了解 HighlightOS,请访问wiki

不建议使用仓库代码部分中的预编译二进制文件。

贡献者

衷心感谢所有贡献者:

致谢

部分代码受 blog_os 启发。很棒的项目!

版权

Copyright © 2025 Adam Perkowski

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.