Skip to content

Simple kernel for learning operating systems. 用于学习操作系统的简单内核

License

Notifications You must be signed in to change notification settings

sodall/SimpleKernel

 
 

Repository files navigation

Build Status last-commit languages MIT License LICENSE 996.icu HitCount

English | 中文

SimpleKernel

关键词

  • Grub2
  • UXIN-like
  • 多任务
  • ELF
  • IDE disk
  • EXT2 文件系统
  • POSIX API
  • libc
  • 一些 shell命令

简介

SimpleKernel,一个用来练手的简单内核。提供了各个阶段完成度不同的内核,你可以从自己喜欢的地方开始。

使用的语言:

  • x86 汇编

  • C

  • C++

  • Shell

  • make

  • x86

开发环境

  • Ubuntu Linux

    • Bochs 编译安装

    • i386-elf 交叉编译工具链 编译安装(./tools/)

  • Mac

    • Bochs

        brew install bochs
      
    • i386-elf 交叉编译工具链

        brew install i386-elf-binutils
        brew install i386-elf-gcc
        cd SimpleKernel/ && brew install tools/i386-elf-grub.rb
      

注: Mac 10.14.1,bochs 2.6.9,i386-elf-binutils 2.31.1,i386-elf-gcc 8.2.0 测试通过。

如何运行

git clone https://github.com/MRNIU/SimpleKernel.git
cd SimpleKernel/
sh setup.sh

在出现的 bochs 命令行中 输入 c 即可运行。

运行截图

屏幕快照 2019-03-18 上午11.16.19

更多 bochs 使用方式请参考 bochs 的相关资料。

目录结构

Makefile

测试

目前只有很简陋的 CI。

自动化集成

合并到 master 分支时需要通过 Travis CI 测试。编译没有错误即可。

代码风格

镜像文件

simplekernel.img 是 1.44 软盘,我们的内核就在这里。

TODO

  • 修复 bug
  • 鼠标输入处理
  • debug 函数
  • 添加编码规范测试
  • 并发
  • 文件系统
  • 设备驱动
  • 虚拟内存管理

贡献者

MRNIU

您也可以在贡献者名单中参看所有参与该项目的开发者。

贡献

请阅读 CONTRIBUTING.md。

感谢

此项目参考了很多优秀的项目和资料

osdev

GRUB 在 Mac 上的安装

multiboot

《程序员的自我修养--链接、装载与库》(俞甲子 石凡 潘爱民)

JamesM's kernel development tutorials

xOS

hurlex

howerj/os

cfenollosa/os-tutorial

omarrx024/xos

PurpleBooth/project-title

0xAX weblong

How-to-Make-a-Computer-Operating-System

coding-style

DNKernel

c-algorithms

版权信息

此项目使用 MIT 许可证

About

Simple kernel for learning operating systems. 用于学习操作系统的简单内核

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 70.4%
  • Makefile 15.1%
  • C++ 6.5%
  • Assembly 4.4%
  • Shell 3.6%