Skip to content
Snippets Groups Projects
Commit 2203dfe5 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

WIP: Add a more detailed explore page

parent 6c3ca029
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,14 @@
-------------------------------------------------------------------------------
- [Exploring Redox](./explore/explore.md)
- [Boot Process](./explore/boot_process.md)
- [Shell](./explore/shell.md)
- [Utilities](./explore/utilities.md)
- [GUI](./explore/gui.md)
-------------------------------------------------------------------------------
- [The design](./design/design.md)
- [URLs, schemes and resources](./design/urls_schemes_resources.md)
- [URLs](./design/url/urls.md)
......
# Boot Process
## Bootloader
The first code to be executed is the boot sector in `kernel/asm/bootloader.asm`. This loads the bootloader from the first partition. In Redox, the bootloader finds the kernel and loads it in full at address 0x100000. It also initializes the memory map and the VESA display mode, as these rely on BIOS functions that cannot be accessed easily once control is switched to the kernel.
## Kernel
The kernel is entered through the interrupt table, with interrupt 0xFF. This interrupt is only available in the bootloader. By utilizing this method, all kernel entry can be contained to a single function, the `kernel` function, that serves as the entry point in the `kernel.bin` executable file.
At this stage, the kernel copies the memory map out of low memory, sets up an initial page mapping, allocates the environment object, defined in `kernel/env/mod.rs`, and begins initializing the drivers and schemes that are embedded in the kernel. This process will print out kernel information such as the following:
```
Redox 32 bits
* text=101000:151000 rodata=151000:1A4000
* data=1A4000:1A5000 bss=1A5000:1A6000
+ PS/2
+ Keyboard
- Reset FA, AA
- Set defaults FA
- Enable streaming FA
+ PS/2 Mouse
- Reset FA, AA
- Set defaults FA
- Enable streaming FA
+ IDE on 0, 0, 0, 0, C120, IRQ: 0
+ Primary on: C120, 1F0, 3F4, IRQ E
+ Master: Status: 58 Serial: QM00001 Firmware: 2.0.0 Model: QEMUHARDDISK 48-bit LBA Size: 128 MB
+ Slave: Status: 0
+ Secondary on: C128, 170, 374, IRQ F
+ Master: Status: 41 Error: 2
+ Slave: Status: 0
```
After initializing the in-kernel structures, drivers, and schemes, the first userspace process spawned by the kernel is the `init` process, more specifically the `initfs:/bin/init` process.
## Init
Redox has a multi-staged init process, designed to allow for the loading of disk drivers in a modular and configurable fashion. This is commonly referred to as an init ramdisk.
### Ramdisk Init
The ramdisk init has the job of loading the drivers required to access the root filesystem and then transfer control to the userspace init. This is a filesystem that is linked with the kernel and loaded by the bootloader as part of the kernel image. You can see the code associated with the `init` process in `crates/init/main.rs`.
The ramdisk init loads, by default, the file `/etc/init.rc`, which may be found in `initfs/etc/init.rc`. This file currently has the contents:
```
echo ############################
echo ## Redox OS is booting ##
echo ############################
echo
# Load the filesystem driver
initfs:/bin/redoxfsd disk:/0
# Start the filesystem init
cd file:/
init
```
As such, it is very easy to modify Redox to load a different filesystem as the root, or to move processes and drivers in and out of the ramdisk.
### Filesystem Init
As seen above, the ramdisk init has the job of loading and starting the filesystem init. By default, this will mean that a new init process will be spawned that loads a new configuration file, now in the root filesystem at `filesystem/etc/init.rc`. This file currently has the contents:
```
echo ############################
echo ## Redox OS has booted ##
echo ## Press enter to login ##
echo ############################
echo
# Login process, handles debug console
login
```
Modifying this file allows for booting directly to the GUI. For example, we could replace `login` with `orbital`.
## Login
After the init processes have set up drivers and daemons, it is possible for the user to log in to the system. A simple login program is currently used, it's source may be found in `crates/login/main.rs`
The login program accepts a username, currently any username may be used, prints the `/etc/motd` file, and then executes `sh`. The motd file can be configured to print any message, it is at `filesystem/etc/motd` and currently has the contents:
```
############################
## Welcome to Redox OS ##
## For GUI: Run orbital ##
############################
```
At this point, the user will now be able to access the [Shell](./explore/shell.html)
# Explore
This chapter will be dedicated to exploring every aspect of a running Redox system, in gruesome detail.
We will start with the boot system, continuing to the shell and command-line utilities, moving on the the GUI, all while explaining where things happen, and how to change them.
Redox is meant to be an *insanely* customizable system, allowing a user to tear it down to a very small command-line distro, or build it up to a full desktop environment with ease.
- [Boot Process](./explore/boot_process.html)
- [Shell](./explore/shell.html)
- [Utilities](./explore/utilities.html)
- [GUI](./explore/gui.html)
# GUI
The desktop environment in Redox, referred to as Orbital, is provided by a set of programs that run in userspace:
## Programs
The following are command-line utilities that provide GUI services
### orbital
The orbital display and window manager sets up the orbital: scheme, manages the display, and handles requests for window creation, redraws, and event polling
### launcher
The launcher multi-purpose program that scans the applications in the `/apps/` directory and provides the following services:
#### Called Without Arguments
A taskbar that displays icons for each application
#### Called With Arguments
An application chooser that opens a file in a matching program
- If one application is found that matches, it will be opened automatically
- If more than one application is found, a chooser will be shown
## Applications
The following are GUI utilities that can be found in the `/apps/` directory.
## Calculator
A calculator that provides similar functionality to the `calc` program
## Editor
A simple editor that is similar to notepad
## File Browser
A file browser that displays icons, names, sizes, and details for files. It uses the `launcher` command to open files when they are clicked
## Image Viewer
A simple image viewer
## Pixelcannon
A 3d renderer that can be used for benchmarking the Orbital desktop.
## Sodium
A vi-like editor that provides syntax highlighting
## Terminal Emulator
An ANSI terminal emulator that launches `sh` by default.
# Shell
# Utilities
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment