You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Custom x86_64 OS built upon the Linux kernel. Boots from a USB.
3
+
Custom x86_64 OS built upon the Linux kernel. The OS consists of Tlenix user programs and a custom Linux kernel. Boots from a USB.
4
4
5
5
Written in pure Rust without the standard library or any dependencies on a C standard library.
6
6
7
7
# Programs
8
8
9
-
`initramfs_init`: Init program for `initramfs`. Sets up important things like devices and the filesystem. Starts `init` when finished.
9
+
`initramfs_init`: Init program for the `initramfs`. Sets up important things like devices and the filesystem. Starts `init` when finished.
10
10
11
-
`init`: Responsible for booting up the system. Starts up `mash`.
11
+
`init`: Responsible for booting up the system.
12
12
13
13
`mash`: **Ma**x's **Sh**ell. An extremely primitive command-line-interface shell.
14
14
15
-
`ls`: List the entries within a directory.
15
+
`cat`: Concatenates files and prints them to the standard output.
16
+
17
+
`clear`: Clear the terminal screen.
18
+
19
+
`hello`: Example Tlenix program. Generates a greeting.
20
+
21
+
`ls`: Lists the entries within a directory.
22
+
23
+
`printenv`: Prints the current environment variables along with their values.
16
24
17
25
# Setup Guide
18
26
19
27
Here's how to get Tlenix running on a USB of your own.
20
28
21
-
## Watch Out!
29
+
## 0. Watch Out!
22
30
23
31
Stuff like drive partitioning can screw up your system if you don't know what you're doing! If you aren't confident, I recommend using a virtual machine as the host when setting up the USB.
24
32
25
33
Additionally, make sure nothing important is stored on your USB you're using to boot this, because it _will_ be irrevocably wiped.
26
34
27
35
This project is in its early stages and is _not thoroughly tested_... Follow these instructions at your own risk.
28
36
29
-
## Build a Fresh Kernel
37
+
## 1. Get the Tlenix Source
38
+
39
+
Go to a convenient place on your computer and clone the Tlenix source:
40
+
41
+
```bash
42
+
git clone https://github.com/maxgmr/tlenix.git
43
+
```
44
+
45
+
## 2. Build a Fresh Kernel
30
46
31
47
### Get the Linux Kernel Source
32
48
49
+
Go to a different convenient place on your computer and clone the Linux kernel source:
@@ -73,53 +91,13 @@ make -j$(nproc) CC="gcc-13" KCFLAGS="-std=gnu11" 2>&1 | tee log
73
91
74
92
Your finished kernel is located at `arch/x86_64/boot/bzImage` within the Linux source code directory.
75
93
76
-
## Build the Tlenix Binaries
77
-
78
-
Switch to the Tlenix source code directory.
94
+
### Copy Finished Kernel to Tlenix Source Directory
79
95
80
96
```bash
81
-
cargo build --all --release
97
+
cp arch/x86_64/boot/bzImage <tlenix dir>/bzImage
82
98
```
83
99
84
-
Your completed binaries will be under the `target/x86_64-unknown-linux-none/release` directory.
85
-
86
-
## Create the `initramfs`
87
-
88
-
We need to create a root filesystem which is used during the boot process. It loads necessary drivers and modules, then passes on control, switching to the actual persistent root filesystem on the USB.
Inside the Tlenix source directory, the `config/` directory contains some options for customizing your Tlenix installation.
213
158
214
-
```bash
215
-
sudoedit /mnt/tlenix-usb/boot/grub/grub.cfg
216
-
```
159
+
### Changing the Terminal Font
217
160
218
-
You can choose your own font. In the place of `TER16x32` in the config above, you can choose from any of the following:
161
+
You can choose your own terminal font. To do so, open up `config/grub.cfg` in your preferred text editor. Instead of the default `TER16x32` font, you can set `fbcon=font:` to any of the following:
219
162
220
163
-`MINI_4x6`
221
164
-`6x8`
@@ -227,44 +170,27 @@ You can choose your own font. In the place of `TER16x32` in the config above, yo
227
170
-`SUN8x16`
228
171
-`10x18`
229
172
-`SUN12x22`
230
-
-`TER16x32`
231
173
232
-
## Set Up the Root Filesystem
233
-
234
-
This is the filesystem which you actually use when running Tlenix.
With your USB plugged in to your computer, restart your machine. If you boot _back_ into your computer's normal operating system, you'll have to go into your computer's BIOS menu and try the following things one at a time, restarting and retrying after each step:
262
191
263
-
```bash
264
-
sudo qemu-system-x86_64 \
265
-
-kernel /mnt/tlenix-usb/boot/bzImage \
266
-
-initrd /mnt/tlenix-usb/boot/root.cpio.gz \
267
-
-drive file=/dev/sdX,format=raw \
268
-
-append "root=/dev/sdX2 console=ttyS0" \
269
-
-nographic
270
-
```
192
+
1. Make sure your USB drive is at the top of the boot priority. This is the most common reason why you aren't automatically booting into Tlenix!
0 commit comments