(格式:UTF-8)
用铁锈写的操作系统
甲基烯是由生锈组成的操作系统。
除了仅在组装中使用的区域,例如启动初始化和I/O说明,所有这些都用生锈书写。
该计划的起源是当我参加学生参加2017年国家安全训练营“ X:创建自己的语言和操作系统”时。
有关安全营的信息,请参阅安全营:IPA独立行政机构信息技术促进机构。我们甚至在安全训练营实施了中断。 (参考:安全训练营2017年参与注释| PG_MANA的其他笔记)
甲基烯类名称取自甲基。我们希望通过组合各种零件来组合模块来创建一个应用程序,就像有机化合物一样,我们将“ Nix”添加到该组中,以创建一个似乎是一个好的助记符的甲基群。
版权2018 PG_MANA
根据Apache许可证(版本2.0(“许可”)获得许可;除了符合许可外,您不得使用此文件。您可以在
https://www.apache.org/licenses/license-2.0
除非适用法律要求或以书面形式同意,否则根据许可证分配的软件是按照“原样”分发的,没有任何明示或暗示的任何形式的保证或条件。请参阅许可证,以获取执行许可条款和限制的特定语言。
需要软件
git clone https://github.com/PG-MANA/Methylenix.git
cd Methylenix
make iso
# created bin/img/boot.iso可以在https://repo.taprix.org/pg_mana/methylenix/images/x86_64上找到预制图像。
git clone https://github.com/PG-MANA/Methylenix.git
cd Methylenix
make TARGET_ARCH=aarch64
# created bin/EFI/BOOT/可以在https://repo.taprix.org/pg_mana/methylenix/images/aarch64/上找到预制图像。
需要QEMU-SYSTEM-X86_64。
qemu-system-x86_64 -cpu qemu64,+fsgsbase --cdrom bin/img/boot.iso
# or (OVMF)
qemu-system-x86_64 --cdrom bin/img/boot.iso -cpu qemu64,+fsgsbase -smp 2 -m 512M -bios /usr/bin/OVMF/OVMF.fd
# or (to emulate host cpu)
qemu-system-x86_64 --cdrom bin/img/boot.iso -cpu host -smp 2 -m 512M -bios /usr/bin/OVMF/OVMF.fd --enable-kvm
# NIC and NVMe Emulation
qemu-system-x86_64 -drive if=pflash,format=raw,readonly=on,file=/path/to/OVMF_CODE.fd -drive if=pflash,format=raw,file=/path/to/QEMU_VARS.fd -m 1G -cdrom bin/img/boot.iso -smp 4 --enable-kvm -cpu host -netdev user,id=net0,hostfwd=tcp::7777-:8080 -device e1000e,netdev=net0,mac=52:54:00:12:34:56 -drive file=/path/to/img.qcow2,if=none,id=nvm -device nvme,serial=12345678,drive=nvm --boot order=dQEMU-SYSTEM-AARCH64和AARCH64需要OVMF。
# Modify "/usr/bin/OVMF/OVMF_AARCH64.fd" to your suitable path
qemu-system-aarch64 -m 1G -cpu a64fx -machine virt,gic-version=3 -smp 2 -nographic -bios /usr/bin/OVMF/OVMF_AARCH64.fd -drive file=fat:rw:bin/,format=raw,media=diskcargo doc --open 对于基础知识,请点击https://doc.rust-lang.org/1.1.0/style/style/style/naming/readme.html。代码成型使用Rustfmt。
(也许他本人没有保护)
https://twitter.com/pg_mana_
https://pg-mana.net
https://methylenix.org(目前,我只是重定向到github。什么时候可以做?)