From 20bcb55750b844269e3440e05b92c1b90f485505 Mon Sep 17 00:00:00 2001 From: Yury Popov Date: Wed, 10 May 2017 20:28:50 +0300 Subject: [PATCH] Migrate docs to Gitlab Pages --- README.md | 53 ++++++++++--------------------- docs/acpi.md | 1 + docs/boot.md | 14 +++++++++ docs/build.md | 70 +++++++++++++++++++++++++++++++++++++++++ docs/cpuid.md | 1 + docs/display.md | 1 + docs/efi.md | 1 + docs/index.md | 24 ++++++++++++++ docs/interrupts.md | 1 + docs/library.md | 1 + docs/license.md | 17 ++-------- docs/memory.md | 1 + docs/modules.md | 1 + docs/multiboot.md | 1 + docs/process-manager.md | 1 + docs/run-pc.md | 53 +++++++++++++++++++++++++++++++ docs/run-vm.md | 9 ++++++ docs/smp.md | 1 + docs/syscall.md | 1 + mkdocs.yml | 24 ++++++++++++-- 20 files changed, 224 insertions(+), 52 deletions(-) create mode 100644 docs/acpi.md create mode 100644 docs/boot.md create mode 100644 docs/build.md create mode 100644 docs/cpuid.md create mode 100644 docs/display.md create mode 100644 docs/efi.md create mode 100644 docs/interrupts.md create mode 100644 docs/library.md create mode 100644 docs/memory.md create mode 100644 docs/modules.md create mode 100644 docs/multiboot.md create mode 100644 docs/process-manager.md create mode 100644 docs/run-pc.md create mode 100644 docs/run-vm.md create mode 100644 docs/smp.md create mode 100644 docs/syscall.md diff --git a/README.md b/README.md index 026d1b3..f06fe15 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,24 @@ -*** -> PhoeniX OS [![build status](https://git.phoenix.dj/phoenix/phoenix-os/badges/master/build.svg)](https://git.phoenix.dj/phoenix/phoenix-os/builds)
-> © DJ PhoeniX, 2012-2015
-> https://git.phoenix.dj/phoenix/phoenix-os +> PhoeniX OS [![build status](https://git.phoenix.dj/phoenix/phoenix-os/badges/master/build.svg)](https://git.phoenix.dj/phoenix/phoenix-os/builds) [![download](https://img.shields.io/badge/download-latest-blue.svg)](https://git.phoenix.dj/phoenix/phoenix-os/builds/artifacts/master/download?job=build) [![documentation](https://img.shields.io/badge/documentation-read-brightgreen.svg)](https://os.phoenix.dj/)
+> © PhoeniX, 2012-2017
+> [https://git.phoenix.dj/phoenix/phoenix-os](https://git.phoenix.dj/phoenix/phoenix-os) -*** - -PhoeniX OS is [open-source](https://en.wikipedia.org/wiki/Open-source_software) ([MIT](LICENSE)) [64-bit](https://en.wikipedia.org/wiki/64-bit_computing) [operating system](https://en.wikipedia.org/wiki/Operating_system). +PhoeniX OS is [open-source](https://en.wikipedia.org/wiki/Open-source_software) ([MIT](license.md)) [64-bit](https://en.wikipedia.org/wiki/64-bit_computing) [operating system](https://en.wikipedia.org/wiki/Operating_system). This OS is not based on GNU/Linux, Microsoft® Windows® or Apple Mac OS X, but may support formats of applications, drivers or modules that wrote for their systems. -## Documentation -All documentation of build, run and work with PhoeniX OS placed on [project WIKI](https://git.phoenix.dj/phoenix/phoenix-os/wikis/home). - ### Installation * [Binary releases](https://git.phoenix.dj/phoenix/phoenix-os/builds) from CI server (latest updates) -* [Build guide](https://git.phoenix.dj/phoenix/phoenix-os/wikis/build) -* [Installation on real PC](https://git.phoenix.dj/phoenix/phoenix-os/wikis/run-pc) -* [Installation on virtual machines](https://git.phoenix.dj/phoenix/phoenix-os/wikis/run-vm) +* [Latest build](https://git.phoenix.dj/phoenix/phoenix-os/builds/artifacts/master/download?job=build) download +* [Build guide](https://os.phoenix.dj/build) +* [Installation on real PC](https://os.phoenix.dj/run-pc) +* [Installation on virtual machines](https://os.phoenix.dj/run-vm) ### Subsystem documentation -* [Bootup process](https://git.phoenix.dj/phoenix/phoenix-os/wikis/boot) -* [Memory](https://git.phoenix.dj/phoenix/phoenix-os/wikis/memory) -* [Module system](https://git.phoenix.dj/phoenix/phoenix-os/wikis/modules) -* [Dirvers](https://git.phoenix.dj/phoenix/phoenix-os/wikis/drivers) - -## License -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. +* [Bootup process](https://os.phoenix.dj/boot) +* [ACPI](https://os.phoenix.dj/acpi) +* [CPUID](https://os.phoenix.dj/cpuid) +* [Interrupts](https://os.phoenix.dj/interrupts) +* [Memory](https://os.phoenix.dj/memory) +* [Modules](https://os.phoenix.dj/modules) +* [Process manager](https://os.phoenix.dj/process-manager) +* [SMP](https://os.phoenix.dj/smp) +* [System calls](https://os.phoenix.dj/syscall) diff --git a/docs/acpi.md b/docs/acpi.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/acpi.md @@ -0,0 +1 @@ +TODO diff --git a/docs/boot.md b/docs/boot.md new file mode 100644 index 0000000..afa3d09 --- /dev/null +++ b/docs/boot.md @@ -0,0 +1,14 @@ +## Bootup process +0. Kernel load through any [multiboot](multiboot.md)-compatible bootloader (GRUB / SYSLINUX etc) or via [onboard EFI](efi.md) directly +1. Switch CPU to [long mode](https://en.wikipedia.org/wiki/Long_mode). If CPU is incompatible, prints error message. +2. Jumps to C kernel code + +## Initialization +1. Initialize static variables +2. Clears screen +3. Initialize [display](display.md) +3. Initialize [memory subsystem](memory.md) +4. Initialize [SMP](https://en.wikipedia.org/wiki/Symmetric_multiprocessing) +5. Initialize [interrupts manager](interrupts.md) +6. Initialize [module manager](modules.md) +7. Start [process manager](process-manager.md) \ No newline at end of file diff --git a/docs/build.md b/docs/build.md new file mode 100644 index 0000000..43fed31 --- /dev/null +++ b/docs/build.md @@ -0,0 +1,70 @@ +### Source download +* [GIT](https://en.wikipedia.org/wiki/Git_(software)): `git clone https://git.phoenix.dj/phoenix/phoenix-os/` +* [ZIP file](https://git.phoenix.dj/phoenix/phoenix-os/builds/artifacts/master/download?job=build) from master branch. + +### Build prerequisites +* [CLANG](https://clang.llvm.org/) 5 +* [GNU make](http://www.gnu.org/software/make/) + +### Build on GNU/Linux +```bash +# Install GCC, MAKE, GIT +sudo apt-get install clang-5 lld-5 make git +# Get source code +git clone https://git.phoenix.dj/phoenix/phoenix-os.git +# Build +cd phoenix-os +make all +``` +### Build on Mac OS X + +1. Install Xcode (from App Store), launch (at least once) and install Command Line Tools +2. Open Terminal.app (on Application/Utilities) and execute commands: + +```bash +# Install homebrew (if not installed) +/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +# Install GIT, GIT-LFS, MAKE, CLANG 5 +brew install git git-lfs make llvm@5 +# Get source code +git clone https://git.phoenix.dj/phoenix/phoenix-os.git +# Build +cd phoenix-os +make all +``` + +### Build on Microsoft® Windows® +#### Install Cygwin + +1. Download Cygwin installer that match your OS + * [32-bit](http://cygwin.com/setup-x86.exe) + * [64-bit](http://cygwin.com/setup-x86_64.exe) +2. Launch downloaded file +3. Click "Next" until you reach "Choose A Download Site" page. +4. On "Choose A Download Site" page select preferred mirror to download components. If doubt, select first of available. +5. On "Select Packages" page select at least these components: + * Devel/clang + * Devel/git + * Devel/make +6. On "Resolving Dependencies" verify that "Select required packages" is checked, click "Next". +7. Wait for installation completion. + +#### Fetch source code of PhoeniX OS + +##### Download from Git +1. Launch `Cygwin/bin/bash.exe` +2. If you was not included Cygwin in your PATH environment option, execute `export PATH=/usr/bin:/bin` +3. Change your working directory to drive C: `cd /cygdrive/c/` +4. For go into subfolders: `cd NAME` +5. Execute `git clone https://git.phoenix.dj/phoenix/phoenix-os.git` + +##### Fetch ZIP archive of `master` branch +1. Download and extract [archive](https://git.phoenix.dj/phoenix/phoenix-os/repository/archive.zip) +2. Launch `Cygwin/bin/bash.exe` +3. If you was not included Cygwin in your PATH environment option, execute `export PATH=/usr/bin:/bin` +4. Change your working directory to folder with extracted files + * Example: Go to Drive C: `cd /cygdrive/c/` + * For go into subfolders: `cd NAME` + +#### Build +Execute `make all` in Cygwin terminal (that still open from "Fetch source" step). Wait for execution completion. diff --git a/docs/cpuid.md b/docs/cpuid.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/cpuid.md @@ -0,0 +1 @@ +TODO diff --git a/docs/display.md b/docs/display.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/display.md @@ -0,0 +1 @@ +TODO diff --git a/docs/efi.md b/docs/efi.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/efi.md @@ -0,0 +1 @@ +TODO diff --git a/docs/index.md b/docs/index.md index e69de29..9511cdb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -0,0 +1,24 @@ +> PhoeniX OS [![build status](https://git.phoenix.dj/phoenix/phoenix-os/badges/master/build.svg)](https://git.phoenix.dj/phoenix/phoenix-os/builds) [![download](https://img.shields.io/badge/download-latest-blue.svg)](https://git.phoenix.dj/phoenix/phoenix-os/builds/artifacts/master/download?job=build)
+> © PhoeniX, 2012-2017
+> [https://git.phoenix.dj/phoenix/phoenix-os](https://git.phoenix.dj/phoenix/phoenix-os) + +PhoeniX OS is [open-source](https://en.wikipedia.org/wiki/Open-source_software) ([MIT](license.md)) [64-bit](https://en.wikipedia.org/wiki/64-bit_computing) [operating system](https://en.wikipedia.org/wiki/Operating_system). +This OS is not based on GNU/Linux, Microsoft® Windows® or Apple Mac OS X, but may support formats of applications, drivers or modules that wrote for their systems. + +### Installation +* [Binary releases](https://git.phoenix.dj/phoenix/phoenix-os/builds) from CI server (latest updates) +* [Latest build](https://git.phoenix.dj/phoenix/phoenix-os/builds/artifacts/master/download?job=build) download +* [Build guide](build.md) +* [Installation on real PC](run-pc.md) +* [Installation on virtual machines](run-vm.md) + +### Subsystem documentation +* [Bootup process](boot.md) +* [ACPI](acpi.md) +* [CPUID](cpuid.md) +* [Interrupts](interrupts.md) +* [Memory](memory.md) +* [Modules](modules.md) +* [Process manager](process-manager.md) +* [SMP](smp.md) +* [System calls](syscall.md) diff --git a/docs/interrupts.md b/docs/interrupts.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/interrupts.md @@ -0,0 +1 @@ +TODO diff --git a/docs/library.md b/docs/library.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/library.md @@ -0,0 +1 @@ +TODO diff --git a/docs/license.md b/docs/license.md index c86029c..5e2b03a 100644 --- a/docs/license.md +++ b/docs/license.md @@ -1,19 +1,8 @@ Copyright © 2017 Yury Popov a.k.a. PhoeniX -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 +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 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. +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. diff --git a/docs/memory.md b/docs/memory.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/memory.md @@ -0,0 +1 @@ +TODO diff --git a/docs/modules.md b/docs/modules.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/modules.md @@ -0,0 +1 @@ +TODO diff --git a/docs/multiboot.md b/docs/multiboot.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/multiboot.md @@ -0,0 +1 @@ +TODO diff --git a/docs/process-manager.md b/docs/process-manager.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/process-manager.md @@ -0,0 +1 @@ +TODO diff --git a/docs/run-pc.md b/docs/run-pc.md new file mode 100644 index 0000000..a16c5e9 --- /dev/null +++ b/docs/run-pc.md @@ -0,0 +1,53 @@ +For launch PhoeniX OS on PC you need to: + +* Get binary kernel [from CI](https://git.phoenix.dj/phoenix/phoenix-os/builds/artifacts/master/download?job=build) or [build it from source](build.md) +* Create bootable [CD](#cd) or [USB](#usb) +* Boot your PC using created media + +## CD +For launch from CD you need to create ISO image with bootloader and PhoeniX OS kernel, then build it to blank CD. + +For build ISO image you may use these tools: + +* Linux + * Brasero (gnume / Ubuntu) + * K3b (KDE / KUbubntu) +* [Mac OS X](https://support.apple.com/kb/HT2087?viewlocale=en_US) (documentation at https://support.apple.com/) +* Windows XP + * [CDBurnerXP](https://cdburnerxp.se/?lang=en) ([documentation](https://cdburnerxp.se/help/Data/burn-iso) on official website) +* [Windows 7](http://windows.microsoft.com/en-us/windows7/burn-a-cd-or-dvd-from-an-iso-file) (or later) (documentation at http://windows.microsoft.com/) + + +### Prepare files +Download and extract archive of latest [SYSLINUX binaries](https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.zip) from [Kernel.org](https://kernel.org/). + +Create a folder on hard drive that contains: + +1. `phoenixos` - PhoeniX OS kernel file +2. `isolinux.bin` from SYSLINUX archive (`bios/core/isolinux.bin`) +3. `ldlinux.c32` from SYSLINUX archive (`bios/com32/elflink/ldlinux/ldlinux.c32`) +4. `libcom32.c32` from SYSLINUX archive (`bios/com32/lib/libcom32.c32`) +5. `mboot.c32` from SYSLINUX archive (`bios/com32/mboot/mboot.c32`) +6. `isolinux.cfg` - isolinux [bootloader configuration](http://www.syslinux.org/wiki/index.php?title=Config) (text file) contains `default /mboot.c32 /phoenixos` + +### Linux / Mac OS X +For creation of ISO image used `mkisofs` tool contained in `cdrtools` package. Install it with command: + +* Mac OS X: `brew install cdrtools` ([Homebrew](http://brew.sh/) required) +* Linux (debian/ubuntu): `sudo apt-get install cdrtools` + +Then (in terminal) switch working directory (`cd`) to folder that contains files from step "Prepare files" and run command + + mkisofs -o ../phoenixos.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . + +In result, in parent folder, will be created file `phoenixos.iso` that you should write on CD. + +### Windows +Download and install [`CDR-Tools`](http://cdrtoolswin.sourceforge.net/) ([direct download link](http://sourceforge.net/projects/cdrtoolswin/files/1.0/Binaries/CDR-Tools.exe/download)). + +Place [this file](https://git.phoenix.dj/snippets/3) into folder that contains files from step "Prepare files" and run it. + +In result, in parent folder, will be created file `phoenixos.iso` that you should write on CD. + +## USB +TODO \ No newline at end of file diff --git a/docs/run-vm.md b/docs/run-vm.md new file mode 100644 index 0000000..b27efc1 --- /dev/null +++ b/docs/run-vm.md @@ -0,0 +1,9 @@ +### [VMware](http://www.vmware.com/) ([Fusion](http://www.vmware.com/products/fusion/), [Workstation](http://www.vmware.com/products/workstation/), [Player](http://www.vmware.com/products/player)), [Oracle VirtualBox](http://www.oracle.com/technetwork/server-storage/virtualbox/overview/index.html) +Create ISO image with PhoeniX OS like described on [Run on PC](run-pc.md#cd) page. + +In Virtual Machine configuration select ISO image as bootable CD. + +### [QEMU](http://wiki.qemu.org/Main_Page) +Get binary kernel [from CI](https://git.phoenix.dj/phoenix/phoenix-os/builds/artifacts/master/download?job=build) or [build it from source](build.md) + +Launch QEMU with `-kernel phoenixos` option. diff --git a/docs/smp.md b/docs/smp.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/smp.md @@ -0,0 +1 @@ +TODO diff --git a/docs/syscall.md b/docs/syscall.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/docs/syscall.md @@ -0,0 +1 @@ +TODO diff --git a/mkdocs.yml b/mkdocs.yml index d1bfa10..09e9cc9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -10,5 +10,25 @@ markdown_extensions: permalink: true anchorlink: true pages: - - Overview: index.md - - License: license.md + - Overview: index.md + - License: license.md + - Build: build.md + - Bootup: + - Process: boot.md + - Multiboot: multiboot.md + - EFI: efi.md + - Subsystems: + - ACPI: acpi.md + - CPUID: cpuid.md + - Interrupts: interrupts.md + - Memory: memory.md + - Modules: modules.md + - Process manager: process-manager.md + - SMP: smp.md + - System calls: syscall.md + - Kernel library: + - Display: display.md + - Utilities: library.md + - Install: + - On real PC: run-pc.md + - On virtual machine: run-vm.md