mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 02:16:58 +00:00
Update 1.03
New feature(s): - Markdown reader (Automatically opens when opening .MD files, right click a .MD file to edit. Bug fixes: -N/A
This commit is contained in:
159
src/kernel/cmd.c
159
src/kernel/cmd.c
@@ -624,86 +624,95 @@ static void create_test_files(void) {
|
||||
FAT32_FileHandle *fh = fat32_open("README.md", "w");
|
||||
if (fh) {
|
||||
const char *content =
|
||||
"BREW OS 1.01 ALPHA\n"
|
||||
"==================\n\n"
|
||||
"BREWKERNEL IS NOW BREWOS!\n\n"
|
||||
"Brewkernel will from now on be deprecated as its core became too messy.\n"
|
||||
"I have built a less bloated kernel and wrote a DE above it, which is why\n"
|
||||
"it is now an OS instead of a kernel.\n\n"
|
||||
"# Brew OS 1.01 Alpha\n\n"
|
||||
"## Brewkernel is now BrewOS!\n"
|
||||
"Brewkernel will from now on be deprecated as it's core became too messy. I have built a less bloated kernel and wrote a DE above it, which is why it is now an OS instead of a kernel (in my opinion).\n\n"
|
||||
"Brew Kernel is a simple x86_64 hobbyist operating system.\n"
|
||||
"It features a DE (and WM), a FAT32 filesystem, customizable UI and much much more!\n"
|
||||
"ramdisk-like filesystem.\n\n"
|
||||
"FEATURES\n"
|
||||
"--------\n"
|
||||
"* Brew WM (Window Manager)\n"
|
||||
"* FAT32 Filesystem\n"
|
||||
"* 64-bit long mode support\n"
|
||||
"* Multiboot2 compliant\n"
|
||||
"* Text editor and file explorer\n"
|
||||
"* IDT (Interrupt Descriptor Table)\n"
|
||||
"* Ability to run on actual x86_64 hardware\n"
|
||||
"* Command-line interface (CLI)\n\n"
|
||||
"PREREQUISITES\n"
|
||||
"-------------\n"
|
||||
"It features a DE (and WM), a FAT32 filesystem, customizable UI and much much more!\n\n"
|
||||
"## Features\n"
|
||||
"- Brew WM\n"
|
||||
"- Fat 32 FS\n"
|
||||
"- 64-bit long mode support\n"
|
||||
"- Multiboot2 compliant\n"
|
||||
"- Text editor\n"
|
||||
"- IDT\n"
|
||||
"- Ability to run on actual x86_64 hardware\n"
|
||||
"- CLI\n\n"
|
||||
"## Prerequisites\n\n"
|
||||
"To build BrewOS, you'll need the following tools installed:\n\n"
|
||||
"* x86_64 ELF Toolchain (x86_64-elf-gcc, x86_64-elf-ld)\n"
|
||||
"* NASM (Netwide Assembler)\n"
|
||||
"* xorriso (for creating bootable ISO images)\n"
|
||||
"* QEMU (optional, for testing in emulator)\n\n"
|
||||
"On macOS, install via Homebrew:\n"
|
||||
" brew install x86_64-elf-binutils x86_64-elf-gcc nasm xorriso qemu\n\n"
|
||||
"BUILDING\n"
|
||||
"--------\n"
|
||||
"Simply run 'make' from the project root:\n\n"
|
||||
" make\n\n"
|
||||
"- **x86_64 ELF Toolchain**: `x86_64-elf-gcc`, `x86_64-elf-ld`\n"
|
||||
"- **NASM**: Netwide Assembler for compiling assembly code\n"
|
||||
"- **xorriso**: For creating bootable ISO images\n"
|
||||
"- **QEMU** (optional): For testing the kernel in an emulator\n\n"
|
||||
"On macOS, you can install these using Homebrew:\n"
|
||||
"```sh\n"
|
||||
"brew install x86_64-elf-binutils x86_64-elf-gcc nasm xorriso qemu\n"
|
||||
"```\n\n"
|
||||
"## Building\n\n"
|
||||
"Simply run `make` from the project root:\n\n"
|
||||
"```sh\n"
|
||||
"make\n"
|
||||
"```\n\n"
|
||||
"This will:\n"
|
||||
"1. Download Limine v7.0.0 bootloader files (if not present)\n"
|
||||
"2. Compile all kernel C sources and assembly files\n"
|
||||
"3. Link the kernel ELF binary\n"
|
||||
"4. Generate a bootable ISO image (brewos.iso)\n\n"
|
||||
"Build output:\n"
|
||||
"* Compiled object files: build/\n"
|
||||
"* ISO root filesystem: iso_root/\n"
|
||||
"* Final ISO image: brewos.iso\n\n"
|
||||
"RUNNING\n"
|
||||
"-------\n"
|
||||
"QEMU EMULATION:\n"
|
||||
"Run in QEMU with:\n"
|
||||
" make run\n\n"
|
||||
"1. Compile all kernel C sources and assembly files\n"
|
||||
"2. Link the kernel ELF binary\n"
|
||||
"3. Generate a bootable ISO image (`brewos.iso`)\n\n"
|
||||
"The build output is organized as follows:\n"
|
||||
"- Compiled object files: `build/`\n"
|
||||
"- ISO root filesystem: `iso_root/`\n"
|
||||
"- Final ISO image: `brewos.iso`\n\n"
|
||||
"## Running\n\n"
|
||||
"### QEMU Emulation\n\n"
|
||||
"Run the kernel in QEMU:\n\n"
|
||||
"```sh\n"
|
||||
"make run\n"
|
||||
"```\n\n"
|
||||
"Or manually:\n"
|
||||
" qemu-system-x86_64 -m 2G -serial stdio -cdrom brewos.iso -boot d\n\n"
|
||||
"RUNNING ON REAL HARDWARE:\n"
|
||||
"WARNING: This is at YOUR OWN RISK. This software comes with ZERO warranty\n"
|
||||
"and may break your system.\n\n"
|
||||
"1. Create bootable USB using Balena Etcher to flash brewos.iso\n"
|
||||
"2. Enable legacy (BIOS) boot in your system BIOS/UEFI settings\n"
|
||||
"3. Disable Secure Boot if needed\n"
|
||||
"4. Insert USB drive and select it in boot menu during startup\n\n"
|
||||
"Tested Hardware:\n"
|
||||
"* HP EliteDesk 705 G4 DM (AMD Ryzen 5 PRO 2400G, Radeon Vega)\n"
|
||||
"* Lenovo ThinkPad A475 20KL002VMH (AMD Pro A12-8830B, Radeon R7)\n\n"
|
||||
"PROJECT STRUCTURE\n"
|
||||
"-----------------\n"
|
||||
"* src/kernel/ - Main kernel implementation\n"
|
||||
" - boot.asm - Boot assembly code\n"
|
||||
" - main.c - Kernel entry point\n"
|
||||
" - *.c / *.h - Core kernel modules\n"
|
||||
" - cli_apps/ - Command-line applications\n"
|
||||
" - wallpaper.ppm - Default desktop wallpaper\n"
|
||||
"* build/ - Compiled object files (generated during build)\n"
|
||||
"* iso_root/ - ISO filesystem layout (generated during build)\n"
|
||||
"* limine/ - Limine bootloader files (downloaded automatically)\n"
|
||||
"* linker.ld - Linker script for x86_64 ELF\n"
|
||||
"* limine.cfg - Limine bootloader configuration\n"
|
||||
"* Makefile - Build configuration and targets\n\n"
|
||||
"LICENSE\n"
|
||||
"-------\n"
|
||||
"```sh\n"
|
||||
"qemu-system-x86_64 -m 2G -serial stdio -cdrom brewos.iso -boot d\n"
|
||||
"```\n\n"
|
||||
"### Running on Real Hardware\n\n"
|
||||
"*Warning: This is at YOUR OWN RISK. This software comes with ZERO warranty and may break your system.*\n\n"
|
||||
"1. **Create bootable USB**: Use [Balena Etcher](https://www.balena.io/etcher/) to flash `brewos.iso` to a USB drive\n\n"
|
||||
"2. **Prepare the system**:\n"
|
||||
" - Enable legacy (BIOS) boot in your system BIOS/UEFI settings\n"
|
||||
" - Disable Secure Boot if needed\n\n"
|
||||
"3. **Boot**: Insert the USB drive and select it in the boot menu during startup\n\n"
|
||||
"4. **Tested Hardware**:\n"
|
||||
" - HP EliteDesk 705 G4 DM (AMD Ryzen 5 PRO 2400G, Radeon Vega)\n"
|
||||
" - Lenovo ThinkPad A475 20KL002VMH (AMD Pro A12-8830B, Radeon R7)\n\n"
|
||||
"## Project Structure\n\n"
|
||||
"- `src/kernel/` - Main kernel implementation\n"
|
||||
" - `boot.asm` - Boot assembly code\n"
|
||||
" - `main.c` - Kernel entry point\n"
|
||||
" - `*.c / *.h` - Core kernel modules (graphics, interrupts, filesystem, etc.)\n"
|
||||
" - `cli_apps/` - Command-line applications\n"
|
||||
" - `wallpaper.ppm` - Default desktop wallpaper\n"
|
||||
"- `build/` - Compiled object files (generated during build)\n"
|
||||
"- `iso_root/` - ISO filesystem layout (generated during build)\n"
|
||||
"- `limine/` - Limine bootloader files (downloaded automatically)\n"
|
||||
"- `linker.ld` - Linker script for x86_64 ELF\n"
|
||||
"- `limine.cfg` - Limine bootloader configuration\n"
|
||||
"- `Makefile` - Build configuration and targets\n\n"
|
||||
"## License\n\n"
|
||||
"Copyright (C) 2024-2026 boreddevnl\n\n"
|
||||
"This program is free software: you can redistribute it and/or modify\n"
|
||||
"it under the terms of the GNU General Public License as published by\n"
|
||||
"the Free Software Foundation, either version 3 of the License, or\n"
|
||||
"(at your option) any later version.\n\n"
|
||||
"For full license details, see the LICENSE file in the repository.\n";
|
||||
"This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\n"
|
||||
"NOTICE\n"
|
||||
"------\n\n"
|
||||
"This product includes software developed by Chris (\"boreddevnl\") as part of the BrewKernel project.\n\n"
|
||||
"Copyright (C) 2024–2026 Chris / boreddevnl (previously boreddevhq)\n\n"
|
||||
"All source files in this repository contain copyright and license\n"
|
||||
"headers that must be preserved in redistributions and derivative works.\n\n"
|
||||
"If you distribute or modify this project (in whole or in part),\n"
|
||||
"you MUST:\n\n"
|
||||
" - Retain all copyright and license headers at the top of each file.\n"
|
||||
" - Include this NOTICE file along with any redistributions or\n"
|
||||
" derivative works.\n"
|
||||
" - Provide clear attribution to the original author in documentation\n"
|
||||
" or credits where appropriate.\n\n"
|
||||
"The above attribution requirements are informational and intended to\n"
|
||||
"ensure proper credit is given. They do not alter or supersede the\n"
|
||||
"terms of the GNU General Public License (GPL), which governs this work.\n";
|
||||
fat32_write(fh, (void *)content, cmd_strlen(content));
|
||||
fat32_close(fh);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user