8 Star 115 Fork 36

小骨头 / BookOS

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
mk2
Loading...
README
MIT

BookOS操作系统

BookOS操作系统是一个基于xbook2内核的操作系统,可运行在qemu,bochs,virtual box,vmware等虚拟机中。也可以在物理机上面运行(需要有系统支持的驱动才行)

xbook2内核地址: https://github.com/hzcx998/xbook2
https://gitee.com/hzc1998/xbook2

目录 描述
develop 开发时用到的磁盘镜像,ROM文件系统内容等
doc 操作系统相关的文档
scripts 用到的xbuild脚本和其它配置文件
kernel xbook2内核的引导和可执行文件
tools 内核开发需要用到的工具
bin 命令行可执行程序
sbin 系统使用的程序
libs 用户态库
app 普通应用程序

开发环境准备(Windows/Linux):

整体思路:
1. 用git从仓库克隆源码或者直接下载源码。
2. 配置最基础的工具集:gcc, nasm, ld, dd, rm, objdump, objcopy, truncate。
3. 配置虚拟机:qemu(默认),bochs,virtual box, vmware任选其一。
5. 进入BookOS的根目录目录,打开终端或者命令行,输入命令make build先构建环境,然后make run编译运行。

Windows环境搭建

1.下载我提取的工具包:BuildTools, 下载后配置解压目录环境变量到系统环境变量Path里面。(注意,如果你的电脑上已经有mingw或者cygwin环境,请把这个工具包的环境变量放到靠前的位置,不然不会执行工具包里面的程序)除此之外,由于支持了grub,所以需要单独的配置grub的工具环境,也是在BuildTools里面的。所以需要配置环境变量的目录如下:

BuildTools
BuildTools/genisoimage
BuildTools/grub-2.04
BuildTools/mkfs
BuildTools/mtools

2.下载qemu最新版:Qemu 下载后安装,配置安装目录环境变量到系统环境变量Path里面,或者下载我提取的版本:Qemu-i386,下载后配置解压目录环境变量到系统环境变量Path里面。

3.如果想要用虚拟机加速,下载windows下面的qemu加速扩展程序HAXM v7.6.5:,下载后安装即可.

Linux环境搭建

1.安装gcc, nasm: 
    Ubuntu/Kali Linux: sudo apt-get install gcc nasm truncate
    Red hat/Fedora/Centos: sudo yum install gcc nasm truncate
    
2.安装qemu虚拟机:
    Ubuntu/Kali Linux: sudo apt-get install qemu-system-x86
    Red hat/Fedora/Centos: sudo yum install qemu-system-x86    

3.安装grub引导相关工具:
    Ubuntu/Kali Linux: sudo apt-get install grub mtools genisoimage
    Red hat/Fedora/Centos: sudo yum install grub mtools genisoimage

Mac环境搭建

# 1.安装 i386-gcc
> brew tap nativeos/i386-elf-toolchain
> brew install i386-elf-binutils i386-elf-gcc
# 2.安装 truncate nasm qemu 
> brew install truncate nasm qemu
# 3.安装 grub 
> brew install grub

编译时build后直接run即可(可加-jn参数多线程编译,n是线程数。):

> make build    # 构建环境(第一次获取源码后执行)
> make run      # 编译并运行,默认使用qemu虚拟机运行

编译时可用的命令:

> make          # 只编译源码
> make build    # 构建环境(第一次获取源码后执行)
> make debuild  # 清理环境
> make run      # 编译并运行,默认使用qemu虚拟机运行
> make qemu     # 使用qemu虚拟机运行
> make clean    # 清除编译产生的对象文件以及可执行文件

联系方式: 开源官网:www.book-os.org
E-mail: book_os@163.com
个人邮箱:2323168280@qq.com
个人QQ: 2323168280
开发交流QQ群:913813452

MIT License Copyright (c) 2020 Jason Hu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

BookOS,一个小型的操作系统,基于xbook2操作系统内核。 expand collapse
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hzc1998/BookOS.git
git@gitee.com:hzc1998/BookOS.git
hzc1998
BookOS
BookOS
master

Search

344bd9b3 5694891 D2dac590 5694891