BookOS is participating 2021 OSC China Open Source Project Selection , please vote for it!
BookOS in 2021 OSC China Open Source Project Selection {{projectVoteCount} has been obtained in, please vote for it!
2021 OSC China Open Source Project Selection It is in hot progress. Come and vote for your favorite open source project!
2021 OSC China Open Source Project Selection>>> Midfield Review
BookOS won the 2021 OSC China Open Source Project Selection "The Best Popularity Project" !
Authorization Agreement MIT
development language C/C++
operating system unknown
Software type Open source software
Classification operating system
Open source organizations nothing
region domestic
deliverer Rocky
intended for unknown
Recording time 2022-09-16

Software Introduction

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

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

Book OS system functions

  • 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 program: bash, cal, cat, cp, cpuintfo, date, echo, ls, lua, mem, mkdir, osver, ps, rename, rm, rmdir, sh, etc
  • Image interface program: infones game simulator, ivader game, lite text editor.

Warehouse directory

catalog describe
develop Disk image used in development, ROM file system content, etc
doc Operating system related documents
scripts Xbuild scripts and other configuration files used
kernel Xbook2 kernel boot and executable files
tools Tools needed for kernel development
bin Command line executable
sbin Programs used by the system
libs User status library
app Common applications

Development environment preparation (Windows/Linux):

 Overall idea:
 1. Use git to clone the source code from the warehouse or download the source code directly.
 2. Configure the most basic tool set: gcc, nasm, ld, dd, rm, objdump, objcopy, truncate.
 3. Configure virtual machine: qemu (default), bochs, virtual box, or vmware.
 5. Enter the root directory of BookOS, open the terminal or command line, and enter the command make build to build the environment first, then make run to compile and run.

Windows environment construction

1. Download the toolkit I extracted: BuildTools After downloading, configure the unzipped directory environment variable to the system environment variable Path. (Note that if you already have Mingw or Cygwin environment on your computer, please put the environment variable of the toolkit at the front, otherwise the program in the toolkit will not be executed.) In addition, since grub is supported, you need to configure the tool environment of grub separately, which is also in BuildTools. Therefore, the directory where environment variables need to be configured is as follows:

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

2. Download the latest version of qemu: Qemu   Install after downloading, configure the installation directory environment variable to the system environment variable Path, or download the version I extracted: Qemu-i386 After downloading, configure the unzipped directory environment variable to the system environment variable Path.

3. If you want to use virtual machine acceleration, download the qemu acceleration extension program under Windows HAXM   V7.6.5:, download and install

Linux environment construction

 1. Install gcc, nasm:
 Ubuntu/Kali Linux: sudo apt-get install gcc nasm truncate
 Red hat/Fedora/Centos: sudo yum install gcc nasm truncate
    
 2. Install the qemu virtual machine:
 Ubuntu/Kali Linux: sudo apt-get install qemu-system-x86
 Red hat/Fedora/Centos: sudo yum install qemu-system-x86

 3. Install grub boot related tools:
 Ubuntu/Kali Linux: sudo apt-get install grub mtools genisoimage
 Red hat/Fedora/Centos: sudo yum install grub mtools genisoimage

Mac environment construction

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

Run directly after building at compile time (the - jn parameter can be added for multithreaded compilation, and n is the number of threads.):

 > make build #Build environment (executed after obtaining source code for the first time)
 > make run #Compile and run. By default, use the qemu virtual machine to run

Commands available at compile time:

 > make #Compile source code only
 > make build #Build environment (executed after obtaining source code for the first time)
 > make debuild #Clean up the environment
 > make run #Compile and run. By default, use the qemu virtual machine to run
 > make qemu #Run with qemu virtual machine
 > make clean #Clear the compiled object files and executable files

contact information

Expand to read the full text

code

Gitee index of is
exceed Items for

comment

Click to lead the topic 📣 Post and join the discussion 🔥
No content temporarily
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
No more
No content temporarily
Issued a question and answer
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
No more
No content temporarily
No content temporarily
zero comment
four Collection
 OSCHINA
Log in to view more high-quality content
 Back to top
Top