The BookOS operating system is an operating system based on the xbook2 kernel, which can run in virtual machines such as qemu, bochs, virtual box, and vmware. It can also run on a physical machine (requires a driver supported by the system)

(xbook2 kernel address: https://gitee.com/hzc1998/BookOS)

Book OS System Features

  • Libraries: xlibc standard C library, pthread, netsocket, SDL2, SDL2_image, SDL2_ttf, cario, cjson, dotfont, freetype, gato, jpeg, libwebp, pixman, uview, xtk, zlib, etc.
  • Command line programs: bash, cal, cat, cp, cpuintfo, date, echo, ls, lua, mem, mkdir, osver, ps, rename, rm, rmdir, sh, etc.
  • Graphical interface programs: infones game emulator, invader game, lite text editor.

warehouse directory













Table of contentsdescribe
developDisk image used in development, ROM file system content, etc.
docOperating system related documentation
scriptsxbuild scripts and other configuration files used
kernelBoot and executable for the xbook2 kernel
toolsTools needed for kernel development
bincommand line executable
sbinPrograms used by the system
libsUserland library
appnormal application

Development environment preparation (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 environment construction

1. Download the kit I extracted:BuildTools, After downloading, configure the decompression directory environment variable to the system environment variable Path. (Note that if you already have a mingw or cygwin environment on your computer, please put the environment variable of this toolkit in the front position, otherwise the programs in the toolkit will not be executed) In addition, due to the support of grub, So you need to configure the grub tool environment separately, which is also in BuildTools. So the directory where you need to configure environment variables is as follows:


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

2. Download the latest version of qemu:Qemu After downloading and installing, configure the installation directory environment variable to the system environment variable Path, or download the version I extracted:Qemu-i386after downloading, configure the decompression directory environment variable to the system environment variable Path.

3. If you want to accelerate with a virtual machine, download the qemu acceleration extension under WindowsHAXM v7.6.5: Download and install it.

Building a Linux environment


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 environment build


# 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

When compiling, you can directly run after build (you can add -jn parameter for multi-threaded compilation, n is the number of threads.):


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

Commands available at compile time:


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

contact details

#BookOS #Homepage #Documentation #Downloads #Operating #System #Based #xbook2 #Kernel #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *