mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 02:16:58 +00:00
Compare commits
91 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43a9735f81 | ||
|
|
93b59064c7 | ||
|
|
d19075750b | ||
|
|
8ba03fac72 | ||
|
|
071f8339bf | ||
|
|
dbaff43c6f | ||
|
|
624db9ec9c | ||
|
|
512912c821 | ||
|
|
989ef019d4 | ||
|
|
6a41be2437 | ||
|
|
1639b09cb5 | ||
|
|
1b181772a1 | ||
|
|
6d7f9870f3 | ||
|
|
b40d3c050d | ||
|
|
3fbcf3d4fd | ||
|
|
032b154f41 | ||
|
|
bfac4bf65c | ||
|
|
41d1e3960b | ||
|
|
b708ad7e45 | ||
|
|
4b8fdde06d | ||
|
|
690413045d | ||
|
|
e5cfab37dc | ||
|
|
d49d082712 | ||
|
|
9bb62a5ade | ||
|
|
903d4e0510 | ||
|
|
cc752052dc | ||
|
|
4083b8a563 | ||
|
|
3c7d36a50f | ||
|
|
8b3ca448ed | ||
|
|
36219f5828 | ||
|
|
10ca6ef345 | ||
|
|
80fce3d0e9 | ||
|
|
d38e8b97e2 | ||
|
|
48ad5470ee | ||
|
|
659feee6f7 | ||
|
|
01345ba2b6 | ||
|
|
22dd21c580 | ||
|
|
67640ec8db | ||
|
|
c0eaf4c89b | ||
|
|
35f3a5410a | ||
|
|
42bcc1ad7c | ||
|
|
5cf552fd14 | ||
|
|
8bd70faa89 | ||
|
|
8d3c0486ff | ||
|
|
05c1f37a86 | ||
|
|
c5c77ce734 | ||
|
|
a4e0a42042 | ||
|
|
8afb488539 | ||
|
|
cb4edb6264 | ||
|
|
81d60f144c | ||
|
|
4c0d9886aa | ||
|
|
74bdb89ad3 | ||
|
|
fbd0bf880e | ||
|
|
857b11220c | ||
|
|
981d2cb4f4 | ||
|
|
f299ae6f23 | ||
|
|
ed0535b822 | ||
|
|
9ae0b16b71 | ||
|
|
8a6928b5c9 | ||
|
|
304c2e1383 | ||
|
|
8c6d751254 | ||
|
|
f9d84d434e | ||
|
|
a34aaa1070 | ||
|
|
34ceff4290 | ||
|
|
fcc290f3f9 | ||
|
|
2801dbc21f | ||
|
|
786eac0345 | ||
|
|
c2ead0d6a7 | ||
|
|
23ec181f29 | ||
|
|
616ff8084b | ||
|
|
73a34edd0e | ||
|
|
ca997072ce | ||
|
|
cc950974e8 | ||
|
|
6e2f0d8c1a | ||
|
|
106adf1ac8 | ||
|
|
f694c490a6 | ||
|
|
f6e53fa7c6 | ||
|
|
b4cccb0eb3 | ||
|
|
6f68538b86 | ||
|
|
2ca2809904 | ||
|
|
22b99e051d | ||
|
|
60ea9defc0 | ||
|
|
658c5eb0ed | ||
|
|
e3e4432a3a | ||
|
|
df5c117f65 | ||
|
|
1842ea3b67 | ||
|
|
8dcc3ff40c | ||
|
|
5bdbb59200 | ||
|
|
f06940f21f | ||
|
|
d0ab5021c4 | ||
|
|
90f86d63dc |
12
.gitignore
vendored
12
.gitignore
vendored
@@ -18,3 +18,15 @@ limine 2/Makefile
|
||||
limine 2/limine
|
||||
limine 2/limine.dSYM/Contents/Resources/DWARF/limine
|
||||
limine 2/limine.exe
|
||||
boredos.dump
|
||||
qemu-debug.log
|
||||
build/
|
||||
iso_root/
|
||||
limine/
|
||||
src/kernel/userland/bin/
|
||||
boredos.iso
|
||||
disk.img
|
||||
limine
|
||||
.DS_Store
|
||||
src/.DS_Store
|
||||
limine
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,7 +1,7 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright(C) Chris (boreddevnl) 2024-2026
|
||||
Copyright(C) Chris(boreddevnl) 2024-2026
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
|
||||
118
Makefile
118
Makefile
@@ -1,6 +1,9 @@
|
||||
# BrewOS Makefile
|
||||
# BoredOS Makefile
|
||||
# Target Architecture: x86_64
|
||||
# Host: macOS
|
||||
# Copyright (c) 2023-2026 Chris (boreddevnl)
|
||||
# This software is released under the GNU General Public License v3.0. See LICENSE file for details.
|
||||
# This header needs to maintain in any file it is present in, as per the GPL license terms.
|
||||
|
||||
CC = x86_64-elf-gcc
|
||||
LD = x86_64-elf-ld
|
||||
@@ -11,40 +14,40 @@ SRC_DIR = src/kernel
|
||||
BUILD_DIR = build
|
||||
ISO_DIR = iso_root
|
||||
|
||||
KERNEL_ELF = $(BUILD_DIR)/brewos.elf
|
||||
ISO_IMAGE = brewos.iso
|
||||
KERNEL_ELF = $(BUILD_DIR)/boredos.elf
|
||||
ISO_IMAGE = boredos.iso
|
||||
|
||||
C_SOURCES = $(wildcard $(SRC_DIR)/*.c) \
|
||||
$(wildcard $(SRC_DIR)/lwip/core/*.c) \
|
||||
$(wildcard $(SRC_DIR)/lwip/core/ipv4/*.c) \
|
||||
$(SRC_DIR)/lwip/netif/ethernet.c \
|
||||
$(SRC_DIR)/lwip/netif/bridgeif.c
|
||||
|
||||
C_SOURCES = $(wildcard $(SRC_DIR)/*.c)
|
||||
CLI_APP_SOURCES = $(wildcard $(SRC_DIR)/cli_apps/*.c)
|
||||
ASM_SOURCES = $(wildcard $(SRC_DIR)/*.asm)
|
||||
OBJ_FILES = $(patsubst $(SRC_DIR)/%.c, $(BUILD_DIR)/%.o, $(C_SOURCES)) \
|
||||
$(patsubst $(SRC_DIR)/cli_apps/%.c, $(BUILD_DIR)/cli_apps/%.o, $(CLI_APP_SOURCES)) \
|
||||
$(patsubst $(SRC_DIR)/%.asm, $(BUILD_DIR)/%.o, $(ASM_SOURCES))
|
||||
|
||||
CFLAGS = -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding \
|
||||
-fno-stack-protector -fno-stack-check -fno-lto -fPIE \
|
||||
-m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone \
|
||||
-I$(SRC_DIR) -I$(SRC_DIR)/cli_apps
|
||||
-m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone \
|
||||
-I$(SRC_DIR) -I$(SRC_DIR)/lwip
|
||||
|
||||
LDFLAGS = -m elf_x86_64 -nostdlib -static -pie --no-dynamic-linker \
|
||||
-z text -z max-page-size=0x1000 -T linker.ld
|
||||
|
||||
NASMFLAGS = -f elf64
|
||||
|
||||
# Limine Version
|
||||
LIMINE_VERSION = 7.0.0
|
||||
LIMINE_VERSION = 10.8.2
|
||||
LIMINE_URL_BASE = https://github.com/limine-bootloader/limine/raw/v$(LIMINE_VERSION)
|
||||
|
||||
.PHONY: all clean run limine-setup
|
||||
|
||||
all: $(ISO_IMAGE)
|
||||
|
||||
# Ensure build directories exist
|
||||
$(BUILD_DIR):
|
||||
mkdir -p $(BUILD_DIR)
|
||||
mkdir -p $(BUILD_DIR)/cli_apps
|
||||
mkdir -p $(BUILD_DIR)
|
||||
|
||||
# Download Limine Binaries via Git
|
||||
limine-setup:
|
||||
@if [ ! -f limine/limine-bios.sys ]; then \
|
||||
echo "Limine binaries missing or invalid. Cloning v$(LIMINE_VERSION)-binary..."; \
|
||||
@@ -58,65 +61,104 @@ limine-setup:
|
||||
@echo "Building Limine host utility..."; \
|
||||
$(MAKE) -C limine
|
||||
|
||||
# Compile C Sources
|
||||
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c | $(BUILD_DIR) limine-setup
|
||||
mkdir -p $(dir $@)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# Compile CLI Apps C Sources
|
||||
$(BUILD_DIR)/cli_apps/%.o: $(SRC_DIR)/cli_apps/%.c | $(BUILD_DIR) limine-setup
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# Assemble ASM Sources
|
||||
|
||||
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.asm | $(BUILD_DIR)
|
||||
$(NASM) $(NASMFLAGS) $< -o $@
|
||||
|
||||
# Link Kernel
|
||||
$(BUILD_DIR)/test_syscall.o: $(SRC_DIR)/test_syscall.asm | $(BUILD_DIR)
|
||||
$(NASM) $(NASMFLAGS) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/user_test.o: $(SRC_DIR)/user_test.asm | $(BUILD_DIR)
|
||||
$(NASM) $(NASMFLAGS) $< -o $@
|
||||
|
||||
$(BUILD_DIR)/process_asm.o: $(SRC_DIR)/process_asm.asm | $(BUILD_DIR)
|
||||
$(NASM) $(NASMFLAGS) $< -o $@
|
||||
|
||||
$(KERNEL_ELF): $(OBJ_FILES)
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJ_FILES)
|
||||
$(MAKE) -C $(SRC_DIR)/userland
|
||||
|
||||
# Create ISO
|
||||
$(ISO_IMAGE): $(KERNEL_ELF) limine.cfg limine-setup
|
||||
$(ISO_IMAGE): $(KERNEL_ELF) limine.conf limine-setup
|
||||
rm -rf $(ISO_DIR)
|
||||
mkdir -p $(ISO_DIR)
|
||||
mkdir -p $(ISO_DIR)/EFI/BOOT
|
||||
|
||||
# Copy Kernel and Config
|
||||
cp $(KERNEL_ELF) $(ISO_DIR)/
|
||||
cp limine.cfg $(ISO_DIR)/
|
||||
cp limine.conf $(ISO_DIR)/
|
||||
mkdir -p $(ISO_DIR)/bin
|
||||
@for f in $(SRC_DIR)/userland/bin/*.elf; do \
|
||||
if [ -f "$$f" ]; then \
|
||||
basename=$$(basename "$$f"); \
|
||||
cp "$$f" $(ISO_DIR)/bin/; \
|
||||
echo " module_path: boot():/bin/$$basename" >> $(ISO_DIR)/limine.conf; \
|
||||
fi \
|
||||
done
|
||||
|
||||
# Copy README
|
||||
cp README.md $(ISO_DIR)/
|
||||
|
||||
# Copy user file.c if it exists
|
||||
@if [ -f file.c ]; then cp file.c $(ISO_DIR)/; fi
|
||||
@if [ -f README.md ]; then cp README.md $(ISO_DIR)/; fi
|
||||
@if [ -f $(SRC_DIR)/userland/doom/doom1.wad ]; then \
|
||||
mkdir -p $(ISO_DIR)/Library/DOOM; \
|
||||
cp $(SRC_DIR)/userland/doom/doom1.wad $(ISO_DIR)/Library/DOOM/; \
|
||||
echo " module_path: boot():/Library/DOOM/doom1.wad" >> $(ISO_DIR)/limine.conf; \
|
||||
fi
|
||||
|
||||
# Copy Wallpaper (if it exists)
|
||||
@if [ -f src/kernel/wallpaper.ppm ]; then cp src/kernel/wallpaper.ppm $(ISO_DIR)/; fi
|
||||
mkdir -p $(ISO_DIR)/Library/images/Wallpapers
|
||||
@for f in $(SRC_DIR)/images/wallpapers/*; do \
|
||||
if [ -f "$$f" ]; then \
|
||||
basename=$$(basename "$$f"); \
|
||||
cp "$$f" $(ISO_DIR)/Library/images/Wallpapers/; \
|
||||
echo " module_path: boot():/Library/images/Wallpapers/$$basename" >> $(ISO_DIR)/limine.conf; \
|
||||
fi \
|
||||
done
|
||||
@if [ -f splash.jpg ]; then cp splash.jpg $(ISO_DIR)/; fi
|
||||
|
||||
mkdir -p $(ISO_DIR)/Library/images/gif
|
||||
@for f in $(SRC_DIR)/images/gif/*.gif; do \
|
||||
if [ -f "$$f" ]; then \
|
||||
basename=$$(basename "$$f"); \
|
||||
cp "$$f" $(ISO_DIR)/Library/images/gif/; \
|
||||
echo " module_path: boot():/Library/images/gif/$$basename" >> $(ISO_DIR)/limine.conf; \
|
||||
fi \
|
||||
done
|
||||
|
||||
# Copy Limine Bootloader Files (flat structure in binary branch)
|
||||
cp limine/limine-bios.sys $(ISO_DIR)/
|
||||
cp limine/limine-bios-cd.bin $(ISO_DIR)/
|
||||
cp limine/limine-uefi-cd.bin $(ISO_DIR)/
|
||||
|
||||
# Create EFI Boot Files
|
||||
cp limine/BOOTX64.EFI $(ISO_DIR)/EFI/BOOT/
|
||||
cp limine/BOOTIA32.EFI $(ISO_DIR)/EFI/BOOT/
|
||||
|
||||
mkdir -p $(ISO_DIR)/Library/Fonts
|
||||
@for f in $(SRC_DIR)/fonts/*.ttf; do \
|
||||
if [ -f "$$f" ]; then \
|
||||
basename=$$(basename "$$f"); \
|
||||
cp "$$f" $(ISO_DIR)/Library/Fonts/; \
|
||||
echo " module_path: boot():/Library/Fonts/$$basename" >> $(ISO_DIR)/limine.conf; \
|
||||
fi \
|
||||
done
|
||||
|
||||
# Generate ISO
|
||||
$(XORRISO) -as mkisofs -b limine-bios-cd.bin \
|
||||
$(XORRISO) -as mkisofs -R -J -b limine-bios-cd.bin \
|
||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||
--efi-boot limine-uefi-cd.bin \
|
||||
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
||||
$(ISO_DIR) -o $(ISO_IMAGE)
|
||||
|
||||
# Install Limine to ISO (for BIOS boot)
|
||||
./limine/limine bios-install $(ISO_IMAGE)
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR) $(ISO_DIR) $(ISO_IMAGE)
|
||||
$(MAKE) -C $(SRC_DIR)/userland clean
|
||||
|
||||
run: $(ISO_IMAGE)
|
||||
qemu-system-x86_64 -m 2G -serial stdio -cdrom $(ISO_IMAGE) -boot d \
|
||||
qemu-system-x86_64 -m 4G -serial stdio -cdrom $< -boot d \
|
||||
-smp 4 \
|
||||
-audiodev coreaudio,id=audio0 -machine pcspk-audiodev=audio0 \
|
||||
-netdev user,id=net0,hostfwd=udp::12345-:12345 -device e1000,netdev=net0 \
|
||||
-vga std -global VGA.xres=1280 -global VGA.yres=800
|
||||
-netdev user,id=net0,hostfwd=udp::12346-:12345 -device e1000,netdev=net0 \
|
||||
-vga std -global VGA.xres=1920 -global VGA.yres=1080 \
|
||||
-display cocoa,show-cursor=off \
|
||||
-drive file=disk.img,format=raw,file.locking=off \
|
||||
-cpu max
|
||||
22
NOTICE
Normal file
22
NOTICE
Normal file
@@ -0,0 +1,22 @@
|
||||
NOTICE
|
||||
------
|
||||
|
||||
This product includes software developed by Chris ("boreddevnl") as part of the BoredOS (Previously Brewkernel/BrewOS) project.
|
||||
|
||||
Copyright (C) 2024–2026 Chris / boreddevnl (previously boreddevhq)
|
||||
|
||||
All source files in this repository contain copyright and license
|
||||
headers that must be preserved in redistributions and derivative works.
|
||||
|
||||
If you distribute or modify this project (in whole or in part),
|
||||
you MUST:
|
||||
|
||||
- Retain all copyright and license headers at the top of each file.
|
||||
- Include this NOTICE file along with any redistributions or
|
||||
derivative works.
|
||||
- Provide clear attribution to the original author in documentation
|
||||
or credits where appropriate.
|
||||
|
||||
The above attribution requirements are informational and intended to
|
||||
ensure proper credit is given. They do not alter or supersede the
|
||||
terms of the GNU General Public License (GPL), which governs this work.
|
||||
46
README.md
46
README.md
@@ -1,32 +1,39 @@
|
||||
# Brew OS 1.44 Beta
|
||||
BrewOS is now in a Beta stage as i have brought over all apps from brewkernel and have made the DE a lot more usable and stable.
|
||||
# BoredOS
|
||||
|
||||
## Brewkernel is now BrewOS!
|
||||
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).
|
||||
|
||||
|
||||
<img src="asciiart.png" width="200" /> </br>
|
||||
Brew Kernel is a simple x86_64 hobbyist operating system.
|
||||
<div align="center">
|
||||
<img src="boredos.svg" alt="BoredOS Logo" width="450" />
|
||||
</div>
|
||||
BoredOS is a simple x86_64 hobbyist operating system.
|
||||
It features a DE (and WM), a FAT32 filesystem, customizable UI and much much more!
|
||||
|
||||

|
||||
*this screenshot might be outdated*
|
||||
|
||||
## Features
|
||||
- userspace
|
||||
- JPG image support
|
||||
- Disk manager
|
||||
- Drag and drop mouse centered UI
|
||||
- Customizable UI
|
||||
- Basic Networking Stack
|
||||
- Brew WM
|
||||
- Fat 32 FS
|
||||
- Bored WM
|
||||
- FAT32 filesystem
|
||||
- 64-bit long mode support
|
||||
- Multiboot2 compliant
|
||||
- Text editor
|
||||
- Markdown Viewer
|
||||
- Minesweeper
|
||||
- Markdown Viewer
|
||||
- GUI Text editor
|
||||
- Paint application
|
||||
- IDT
|
||||
- Ability to run on actual x86_64 hardware
|
||||
- CLI
|
||||
- (Limited) C Compiler
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To build BrewOS, you'll need the following tools installed:
|
||||
To build BoredOS, you'll need the following tools installed:
|
||||
|
||||
- **x86_64 ELF Toolchain**: `x86_64-elf-gcc`, `x86_64-elf-ld`
|
||||
- **NASM**: Netwide Assembler for compiling assembly code
|
||||
@@ -49,12 +56,12 @@ make
|
||||
This will:
|
||||
1. Compile all kernel C sources and assembly files
|
||||
2. Link the kernel ELF binary
|
||||
3. Generate a bootable ISO image (`brewos.iso`)
|
||||
3. Generate a bootable ISO image (`boredos.iso`)
|
||||
|
||||
The build output is organized as follows:
|
||||
- Compiled object files: `build/`
|
||||
- ISO root filesystem: `iso_root/`
|
||||
- Final ISO image: `brewos.iso`
|
||||
- Final ISO image: `boredos.iso`
|
||||
|
||||
## Running
|
||||
|
||||
@@ -68,14 +75,14 @@ make run
|
||||
|
||||
Or manually:
|
||||
```sh
|
||||
qemu-system-x86_64 -m 2G -serial stdio -cdrom brewos.iso -boot d
|
||||
qemu-system-x86_64 -m 2G -serial stdio -cdrom boredos.iso -boot d
|
||||
```
|
||||
|
||||
### Running on Real Hardware
|
||||
|
||||
*Warning: This is at YOUR OWN RISK. This software comes with ZERO warranty and may break your system.*
|
||||
|
||||
1. **Create bootable USB**: Use [Balena Etcher](https://www.balena.io/etcher/) to flash `brewos.iso` to a USB drive
|
||||
1. **Create bootable USB**: Use [Balena Etcher](https://www.balena.io/etcher/) to flash `boredos.iso` to a USB drive
|
||||
|
||||
2. **Prepare the system**:
|
||||
- Enable legacy (BIOS) boot in your system BIOS/UEFI settings
|
||||
@@ -102,7 +109,7 @@ qemu-system-x86_64 -m 2G -serial stdio -cdrom brewos.iso -boot d
|
||||
- `iso_root/` - ISO filesystem layout (generated during build)
|
||||
- `limine/` - Limine bootloader files (downloaded automatically)
|
||||
- `linker.ld` - Linker script for x86_64 ELF
|
||||
- `limine.cfg` - Limine bootloader configuration
|
||||
- `limine.conf` - Limine bootloader configuration
|
||||
- `Makefile` - Build configuration and targets
|
||||
|
||||
|
||||
@@ -126,6 +133,11 @@ qemu-system-x86_64 -m 2G -serial stdio -cdrom brewos.iso -boot d
|
||||
###
|
||||
|
||||
|
||||
## This project was previously labeled as "BrewKernel"
|
||||
Brewkernel was a text only very simple (and messy) project i started 3 years ago. It was my first work in OSDev and i absolutely loved it. It sadly just got too messy and i myself couldn't understand my own code anymore. About a year ago i started work on BoredOS, and pushed a *"working"* version of it a few days ago as of writing this *(Feb. 10 2026)*
|
||||
Brewkernel has already been deprecated and will not be accepting any pull requests or fix any issues as it is now a public archive.
|
||||
Thanks to everyone who helped me with Brewkernel, even if it were just ideas, and intend to keep working on this for the forseeable future!
|
||||
|
||||
## License
|
||||
|
||||
Copyright (C) 2024-2026 boreddevnl
|
||||
@@ -135,7 +147,7 @@ This program is free software: you can redistribute it and/or modify it under th
|
||||
NOTICE
|
||||
------
|
||||
|
||||
This product includes software developed by Chris ("boreddevnl") as part of the BrewKernel project.
|
||||
This product includes software developed by Chris ("boreddevnl") as part of the BoredOS (Previously Brewkernel/BrewOS) project.
|
||||
|
||||
Copyright (C) 2024–2026 Chris / boreddevnl (previously boreddevhq)
|
||||
|
||||
|
||||
BIN
asciiart.png
BIN
asciiart.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
BIN
boredos.iso
Normal file
BIN
boredos.iso
Normal file
Binary file not shown.
21
boredos.svg
Normal file
21
boredos.svg
Normal file
@@ -0,0 +1,21 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 130" width="100%">
|
||||
<style>
|
||||
text {
|
||||
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
||||
font-size: 16px;
|
||||
white-space: pre;
|
||||
font-weight: bold;
|
||||
}
|
||||
.magenta { fill: #B589D6; }
|
||||
.blue { fill: #569CD6; }
|
||||
.cyan { fill: #4EC9B0; }
|
||||
.text-color { fill: #FFFFFF; }
|
||||
</style>
|
||||
|
||||
<text x="0" y="20" xml:space="preserve"><tspan class="magenta">====================== </tspan><tspan class="text-color">__ ____ ____ </tspan></text>
|
||||
<text x="0" y="40" xml:space="preserve"><tspan class="magenta">===================== </tspan><tspan class="text-color">/ /_ / __ \/ ___\</tspan></text>
|
||||
<text x="0" y="60" xml:space="preserve"><tspan class="blue">==================== </tspan><tspan class="text-color">/ __ \/ / / /\___ \</tspan></text>
|
||||
<text x="0" y="80" xml:space="preserve"><tspan class="blue">=================== </tspan><tspan class="text-color">/ /_/ / /_/ /____/ /</tspan></text>
|
||||
<text x="0" y="100" xml:space="preserve"><tspan class="cyan">================== </tspan><tspan class="text-color">/_.___/\____//_____/ </tspan></text>
|
||||
<text x="0" y="120" xml:space="preserve"><tspan class="cyan">================= </tspan></text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
533
build.log
Normal file
533
build.log
Normal file
@@ -0,0 +1,533 @@
|
||||
mkdir -p build
|
||||
mkdir -p build
|
||||
Building Limine host utility...
|
||||
make[1]: Nothing to be done for `all'.
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/cmd.c -o build/cmd.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/disk_manager.c -o build/disk_manager.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/e1000.c -o build/e1000.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/e1000_netif.c -o build/e1000_netif.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/elf.c -o build/elf.o
|
||||
src/kernel/elf.c:12:13: warning: 'print_hex' defined but not used [-Wunused-function]
|
||||
12 | static void print_hex(uint64_t n) {
|
||||
| ^~~~~~~~~
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/explorer.c -o build/explorer.o
|
||||
src/kernel/explorer.c: In function 'explorer_draw_file_icon':
|
||||
src/kernel/explorer.c:887:73: warning: unused parameter 'color' [-Wunused-parameter]
|
||||
887 | static void explorer_draw_file_icon(int x, int y, bool is_dir, uint32_t color, const char *filename, const char *current_path) {
|
||||
| ~~~~~~~~~^~~~~
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/fat32.c -o build/fat32.o
|
||||
src/kernel/fat32.c: In function 'fat32_normalize_path':
|
||||
src/kernel/fat32.c:151:10: warning: unused variable 'drive' [-Wunused-variable]
|
||||
151 | char drive = parse_drive_from_path(&p);
|
||||
| ^~~~~
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/font_manager.c -o build/font_manager.o
|
||||
In file included from src/kernel/font_manager.c:4:
|
||||
src/kernel/stb_truetype.h: In function 'stbtt_FreeShape':
|
||||
src/kernel/stb_truetype.h:2672:54: warning: unused parameter 'info' [-Wunused-parameter]
|
||||
2672 | STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *v)
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
|
||||
src/kernel/stb_truetype.h: In function 'stbtt__hheap_alloc':
|
||||
src/kernel/stb_truetype.h:2770:70: warning: unused parameter 'userdata' [-Wunused-parameter]
|
||||
2770 | static void *stbtt__hheap_alloc(stbtt__hheap *hh, size_t size, void *userdata)
|
||||
| ~~~~~~^~~~~~~~
|
||||
src/kernel/stb_truetype.h: In function 'stbtt__hheap_cleanup':
|
||||
src/kernel/stb_truetype.h:2797:58: warning: unused parameter 'userdata' [-Wunused-parameter]
|
||||
2797 | static void stbtt__hheap_cleanup(stbtt__hheap *hh, void *userdata)
|
||||
| ~~~~~~^~~~~~~~
|
||||
src/kernel/stb_truetype.h: In function 'stbtt_FlattenCurves':
|
||||
src/kernel/stb_truetype.h:3618:154: warning: unused parameter 'userdata' [-Wunused-parameter]
|
||||
3618 | static stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts, float objspace_flatness, int **contour_lengths, int *num_contours, void *userdata)
|
||||
| ~~~~~~^~~~~~~~
|
||||
src/kernel/stb_truetype.h: In function 'stbtt_FreeBitmap':
|
||||
src/kernel/stb_truetype.h:3708:62: warning: unused parameter 'userdata' [-Wunused-parameter]
|
||||
3708 | STBTT_DEF void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata)
|
||||
| ~~~~~~^~~~~~~~
|
||||
src/kernel/stb_truetype.h: In function 'stbtt_FreeSDF':
|
||||
src/kernel/stb_truetype.h:4767:59: warning: unused parameter 'userdata' [-Wunused-parameter]
|
||||
4767 | STBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata)
|
||||
| ~~~~~~^~~~~~~~
|
||||
src/kernel/font_manager.c: In function 'font_manager_load':
|
||||
src/kernel/font_manager.c:93:9: warning: unused variable 'read' [-Wunused-variable]
|
||||
93 | int read = fat32_read(fh, buffer, fsize);
|
||||
| ^~~~
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/gdt.c -o build/gdt.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/graphics.c -o build/graphics.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/idt.c -o build/idt.o
|
||||
src/kernel/idt.c: In function 'pic_remap':
|
||||
src/kernel/idt.c:110:17: warning: variable 'a2' set but not used [-Wunused-but-set-variable]
|
||||
110 | uint8_t a1, a2;
|
||||
| ^~
|
||||
src/kernel/idt.c:110:13: warning: variable 'a1' set but not used [-Wunused-but-set-variable]
|
||||
110 | uint8_t a1, a2;
|
||||
| ^~
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/kutils.c -o build/kutils.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/licensewr.c -o build/licensewr.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip_port.c -o build/lwip_port.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/main.c -o build/main.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/memory_manager.c -o build/memory_manager.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/nanojpeg.c -o build/nanojpeg.o
|
||||
src/kernel/nanojpeg.c: In function 'njGetVLC':
|
||||
src/kernel/nanojpeg.c:686:24: warning: left shift of negative value [-Wshift-negative-value]
|
||||
686 | value += ((-1) << bits) + 1;
|
||||
| ^~
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/network.c -o build/network.o
|
||||
src/kernel/network.c: In function 'network_dhcp_acquire':
|
||||
src/kernel/network.c:181:9: warning: unused variable 'loops' [-Wunused-variable]
|
||||
181 | int loops = 0;
|
||||
| ^~~~~
|
||||
src/kernel/network.c: In function 'network_init':
|
||||
src/kernel/network.c:97:9: warning: 'ip.bytes[0]' may be used uninitialized [-Wmaybe-uninitialized]
|
||||
97 | k_itoa(ip.bytes[0], buf); serial_write(buf); serial_write(".");
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
src/kernel/network.c:92:24: note: 'ip.bytes[0]' was declared here
|
||||
92 | ipv4_address_t ip;
|
||||
| ^~
|
||||
src/kernel/network.c:98:9: warning: 'ip.bytes[1]' may be used uninitialized [-Wmaybe-uninitialized]
|
||||
98 | k_itoa(ip.bytes[1], buf); serial_write(buf); serial_write(".");
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
src/kernel/network.c:92:24: note: 'ip.bytes[1]' was declared here
|
||||
92 | ipv4_address_t ip;
|
||||
| ^~
|
||||
src/kernel/network.c:99:9: warning: 'ip.bytes[2]' may be used uninitialized [-Wmaybe-uninitialized]
|
||||
99 | k_itoa(ip.bytes[2], buf); serial_write(buf); serial_write(".");
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
src/kernel/network.c:92:24: note: 'ip.bytes[2]' was declared here
|
||||
92 | ipv4_address_t ip;
|
||||
| ^~
|
||||
src/kernel/network.c:100:9: warning: 'ip.bytes[3]' may be used uninitialized [-Wmaybe-uninitialized]
|
||||
100 | k_itoa(ip.bytes[3], buf); serial_write(buf); serial_write("\n");
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
src/kernel/network.c:92:24: note: 'ip.bytes[3]' was declared here
|
||||
92 | ipv4_address_t ip;
|
||||
| ^~
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/nj_kernel.c -o build/nj_kernel.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/paging.c -o build/paging.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/panic.c -o build/panic.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/pci.c -o build/pci.o
|
||||
src/kernel/pci.c: In function 'pci_enumerate_devices':
|
||||
src/kernel/pci.c:52:31: warning: comparison is always true due to limited range of data type [-Wtype-limits]
|
||||
52 | for (uint8_t bus = 0; bus < 256 && count < max_devices; bus++) {
|
||||
| ^
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/platform.c -o build/platform.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/process.c -o build/process.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/ps2.c -o build/ps2.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/rtc.c -o build/rtc.o
|
||||
src/kernel/rtc.c: In function 'rtc_get_datetime':
|
||||
src/kernel/rtc.c:28:13: warning: unused variable 'last_century' [-Wunused-variable]
|
||||
28 | uint8_t last_century;
|
||||
| ^~~~~~~~~~~~
|
||||
src/kernel/rtc.c:21:13: warning: unused variable 'century' [-Wunused-variable]
|
||||
21 | uint8_t century;
|
||||
| ^~~~~~~
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/syscall.c -o build/syscall.o
|
||||
src/kernel/syscall.c: In function 'syscall_handler_inner':
|
||||
src/kernel/syscall.c:399:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
|
||||
399 | float scale = *(float*)&scale_bits;
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
src/kernel/syscall.c:509:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
|
||||
509 | float scale = *(float*)&scale_bits;
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
src/kernel/syscall.c:528:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
|
||||
528 | float scale = *(float*)&scale_bits;
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/vm.c -o build/vm.o
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/wallpaper.c -o build/wallpaper.o
|
||||
src/kernel/wallpaper.c:83:13: warning: 'serial_num' defined but not used [-Wunused-function]
|
||||
83 | static void serial_num(int n) {
|
||||
| ^~~~~~~~~~
|
||||
mkdir -p build/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/wm.c -o build/wm.o
|
||||
src/kernel/wm.c: In function 'wm_handle_click':
|
||||
src/kernel/wm.c:1570:29: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
|
||||
1570 | if (col < 0) col = 0; if (row < 0) row = 0;
|
||||
| ^~
|
||||
src/kernel/wm.c:1570:51: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
|
||||
1570 | if (col < 0) col = 0; if (row < 0) row = 0;
|
||||
| ^~
|
||||
src/kernel/wm.c: In function 'wm_handle_mouse':
|
||||
src/kernel/wm.c:2214:41: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
|
||||
2214 | if (col < 0) col = 0; if (row < 0) row = 0;
|
||||
| ^~
|
||||
src/kernel/wm.c:2214:63: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
|
||||
2214 | if (col < 0) col = 0; if (row < 0) row = 0;
|
||||
| ^~
|
||||
src/kernel/wm.c: At top level:
|
||||
src/kernel/wm.c:1124:13: warning: 'erase_cursor' defined but not used [-Wunused-function]
|
||||
1124 | static void erase_cursor(int x, int y) {
|
||||
| ^~~~~~~~~~~~
|
||||
src/kernel/wm.c:1014:13: warning: 'draw_dock_editor' defined but not used [-Wunused-function]
|
||||
1014 | static void draw_dock_editor(int x, int y) {
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
src/kernel/wm.c:87:13: warning: 'cursor_visible' defined but not used [-Wunused-variable]
|
||||
87 | static bool cursor_visible = true;
|
||||
| ^~~~~~~~~~~~~~
|
||||
src/kernel/wm.c:84:12: warning: 'desktop_refresh_timer' defined but not used [-Wunused-variable]
|
||||
84 | static int desktop_refresh_timer = 0;
|
||||
| ^~~~~~~~~~~~~~~~~~~~~
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/altcp.c -o build/lwip/core/altcp.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/altcp_alloc.c -o build/lwip/core/altcp_alloc.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/altcp_tcp.c -o build/lwip/core/altcp_tcp.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/def.c -o build/lwip/core/def.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/dns.c -o build/lwip/core/dns.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/inet_chksum.c -o build/lwip/core/inet_chksum.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/init.c -o build/lwip/core/init.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/ip.c -o build/lwip/core/ip.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/mem.c -o build/lwip/core/mem.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/memp.c -o build/lwip/core/memp.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/netif.c -o build/lwip/core/netif.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/pbuf.c -o build/lwip/core/pbuf.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/raw.c -o build/lwip/core/raw.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/stats.c -o build/lwip/core/stats.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/sys.c -o build/lwip/core/sys.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/tcp.c -o build/lwip/core/tcp.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/tcp_in.c -o build/lwip/core/tcp_in.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/tcp_out.c -o build/lwip/core/tcp_out.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/timeouts.c -o build/lwip/core/timeouts.o
|
||||
mkdir -p build/lwip/core/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/udp.c -o build/lwip/core/udp.o
|
||||
mkdir -p build/lwip/core/ipv4/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/ipv4/autoip.c -o build/lwip/core/ipv4/autoip.o
|
||||
mkdir -p build/lwip/core/ipv4/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/ipv4/dhcp.c -o build/lwip/core/ipv4/dhcp.o
|
||||
mkdir -p build/lwip/core/ipv4/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/ipv4/etharp.c -o build/lwip/core/ipv4/etharp.o
|
||||
mkdir -p build/lwip/core/ipv4/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/ipv4/icmp.c -o build/lwip/core/ipv4/icmp.o
|
||||
mkdir -p build/lwip/core/ipv4/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/ipv4/igmp.c -o build/lwip/core/ipv4/igmp.o
|
||||
mkdir -p build/lwip/core/ipv4/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/ipv4/ip4.c -o build/lwip/core/ipv4/ip4.o
|
||||
mkdir -p build/lwip/core/ipv4/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/ipv4/ip4_addr.c -o build/lwip/core/ipv4/ip4_addr.o
|
||||
mkdir -p build/lwip/core/ipv4/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/core/ipv4/ip4_frag.c -o build/lwip/core/ipv4/ip4_frag.o
|
||||
mkdir -p build/lwip/netif/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/netif/ethernet.c -o build/lwip/netif/ethernet.o
|
||||
mkdir -p build/lwip/netif/
|
||||
x86_64-elf-gcc -g -O2 -pipe -Wall -Wextra -std=gnu11 -ffreestanding -fno-stack-protector -fno-stack-check -fno-lto -fPIE -m64 -march=x86-64 -msse -msse2 -mstackrealign -mno-red-zone -Isrc/kernel -Isrc/kernel/lwip -c src/kernel/lwip/netif/bridgeif.c -o build/lwip/netif/bridgeif.o
|
||||
nasm -f elf64 src/kernel/boot.asm -o build/boot.o
|
||||
nasm -f elf64 src/kernel/gdt_asm.asm -o build/gdt_asm.o
|
||||
nasm -f elf64 src/kernel/interrupts.asm -o build/interrupts.o
|
||||
nasm -f elf64 src/kernel/process_asm.asm -o build/process_asm.o
|
||||
nasm -f elf64 src/kernel/syscalls.asm -o build/syscalls.o
|
||||
nasm -f elf64 src/kernel/test_syscall.asm -o build/test_syscall.o
|
||||
nasm -f elf64 src/kernel/user_test.asm -o build/user_test.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -pie --no-dynamic-linker -z text -z max-page-size=0x1000 -T linker.ld -o build/boredos.elf build/cmd.o build/disk_manager.o build/e1000.o build/e1000_netif.o build/elf.o build/explorer.o build/fat32.o build/font_manager.o build/gdt.o build/graphics.o build/idt.o build/kutils.o build/licensewr.o build/lwip_port.o build/main.o build/memory_manager.o build/nanojpeg.o build/network.o build/nj_kernel.o build/paging.o build/panic.o build/pci.o build/platform.o build/process.o build/ps2.o build/rtc.o build/syscall.o build/vm.o build/wallpaper.o build/wm.o build/lwip/core/altcp.o build/lwip/core/altcp_alloc.o build/lwip/core/altcp_tcp.o build/lwip/core/def.o build/lwip/core/dns.o build/lwip/core/inet_chksum.o build/lwip/core/init.o build/lwip/core/ip.o build/lwip/core/mem.o build/lwip/core/memp.o build/lwip/core/netif.o build/lwip/core/pbuf.o build/lwip/core/raw.o build/lwip/core/stats.o build/lwip/core/sys.o build/lwip/core/tcp.o build/lwip/core/tcp_in.o build/lwip/core/tcp_out.o build/lwip/core/timeouts.o build/lwip/core/udp.o build/lwip/core/ipv4/autoip.o build/lwip/core/ipv4/dhcp.o build/lwip/core/ipv4/etharp.o build/lwip/core/ipv4/icmp.o build/lwip/core/ipv4/igmp.o build/lwip/core/ipv4/ip4.o build/lwip/core/ipv4/ip4_addr.o build/lwip/core/ipv4/ip4_frag.o build/lwip/netif/ethernet.o build/lwip/netif/bridgeif.o build/boot.o build/gdt_asm.o build/interrupts.o build/process_asm.o build/syscalls.o build/test_syscall.o build/user_test.o
|
||||
x86_64-elf-ld: warning: build/boredos.elf has a LOAD segment with RWX permissions
|
||||
/Library/Developer/CommandLineTools/usr/bin/make -C src/kernel/userland
|
||||
mkdir -p bin
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c libc/libui.c -o bin/libui.o
|
||||
libc/libui.c: In function 'ui_draw_string_scaled':
|
||||
libc/libui.c:64:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
|
||||
64 | uint32_t scale_bits = *(uint32_t*)&scale;
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
libc/libui.c: In function 'ui_get_string_width_scaled':
|
||||
libc/libui.c:70:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
|
||||
70 | uint32_t scale_bits = *(uint32_t*)&scale;
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
libc/libui.c: In function 'ui_get_font_height_scaled':
|
||||
libc/libui.c:75:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
|
||||
75 | uint32_t scale_bits = *(uint32_t*)&scale;
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c libc/stdlib.c -o bin/stdlib.o
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c libc/syscall.c -o bin/syscall.o
|
||||
nasm -f elf64 crt0.asm -o bin/crt0.o
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c about.c -o bin/about.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/about.o -o bin/about.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c beep.c -o bin/beep.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/beep.o -o bin/beep.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c browser.c -o bin/browser.o
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c nanojpeg.c -o bin/nanojpeg.o
|
||||
nanojpeg.c: In function 'njGetVLC':
|
||||
nanojpeg.c:685:24: warning: left shift of negative value [-Wshift-negative-value]
|
||||
685 | value += ((-1) << bits) + 1;
|
||||
| ^~
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/browser.o bin/nanojpeg.o -o bin/browser.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c calculator.c -o bin/calculator.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/calculator.o -o bin/calculator.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c cat.c -o bin/cat.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/cat.o -o bin/cat.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c cc.c -o bin/cc.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/cc.o -o bin/cc.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c clear.c -o bin/clear.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/clear.o -o bin/clear.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c clock.c -o bin/clock.o
|
||||
clock.c: In function 'clock_paint':
|
||||
clock.c:89:36: warning: comparison of integer expressions of different signedness: 'tab_t' and 'int' [-Wsign-compare]
|
||||
89 | uint32_t bg = (current_tab == i) ? COLOR_TAB_ACTIVE : COLOR_DARK_PANEL;
|
||||
| ^~
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/clock.o -o bin/clock.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c cowsay.c -o bin/cowsay.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/cowsay.o -o bin/cowsay.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c cp.c -o bin/cp.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/cp.o -o bin/cp.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c crash.c -o bin/crash.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/crash.o -o bin/crash.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c curl.c -o bin/curl.o
|
||||
curl.c: In function 'main':
|
||||
curl.c:60:9: warning: unused variable 'host_len' [-Wunused-variable]
|
||||
60 | int host_len = i;
|
||||
| ^~~~~~~~
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/curl.o -o bin/curl.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c date.c -o bin/date.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/date.o -o bin/date.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c echo.c -o bin/echo.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/echo.o -o bin/echo.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c hello.c -o bin/hello.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/hello.o -o bin/hello.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c help.c -o bin/help.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/help.o -o bin/help.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c ls.c -o bin/ls.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/ls.o -o bin/ls.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c man.c -o bin/man.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/man.o -o bin/man.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c markdown.c -o bin/markdown.o
|
||||
markdown.c:59:12: warning: 'md_strncpy' defined but not used [-Wunused-function]
|
||||
59 | static int md_strncpy(char *dest, const char *src, int n) {
|
||||
| ^~~~~~~~~~
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/markdown.o -o bin/markdown.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c math.c -o bin/math.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/math.o -o bin/math.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c meminfo.c -o bin/meminfo.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/meminfo.o -o bin/meminfo.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c minesweeper.c -o bin/minesweeper.o
|
||||
minesweeper.c: In function 'minesweeper_handle_click':
|
||||
minesweeper.c:195:50: warning: unused parameter 'win' [-Wunused-parameter]
|
||||
195 | static void minesweeper_handle_click(ui_window_t win, int x, int y, int button) {
|
||||
| ~~~~~~~~~~~~^~~
|
||||
minesweeper.c: At top level:
|
||||
minesweeper.c:17:13: warning: 'debug_print' defined but not used [-Wunused-function]
|
||||
17 | static void debug_print(const char *msg) {
|
||||
| ^~~~~~~~~~~
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/minesweeper.o -o bin/minesweeper.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c mkdir.c -o bin/mkdir.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/mkdir.o -o bin/mkdir.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c mv.c -o bin/mv.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/mv.o -o bin/mv.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c net.c -o bin/net.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/net.o -o bin/net.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c notepad.c -o bin/notepad.o
|
||||
notepad.c: In function 'notepad_key':
|
||||
notepad.c:149:37: warning: unused parameter 'win' [-Wunused-parameter]
|
||||
149 | static void notepad_key(ui_window_t win, int h, char c) {
|
||||
| ~~~~~~~~~~~~^~~
|
||||
notepad.c: In function 'main':
|
||||
notepad.c:234:14: warning: unused parameter 'argc' [-Wunused-parameter]
|
||||
234 | int main(int argc, char **argv) {
|
||||
| ~~~~^~~~
|
||||
notepad.c:234:27: warning: unused parameter 'argv' [-Wunused-parameter]
|
||||
234 | int main(int argc, char **argv) {
|
||||
| ~~~~~~~^~~~
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/notepad.o -o bin/notepad.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c paint.c -o bin/paint.o
|
||||
paint.c: In function 'wm_show_message':
|
||||
paint.c:156:41: warning: unused parameter 'title' [-Wunused-parameter]
|
||||
156 | static void wm_show_message(const char *title, const char *msg) {
|
||||
| ~~~~~~~~~~~~^~~~~
|
||||
paint.c:156:60: warning: unused parameter 'msg' [-Wunused-parameter]
|
||||
156 | static void wm_show_message(const char *title, const char *msg) {
|
||||
| ~~~~~~~~~~~~^~~
|
||||
paint.c: At top level:
|
||||
paint.c:38:13: warning: 'debug_print' defined but not used [-Wunused-function]
|
||||
38 | static void debug_print(const char *msg) {
|
||||
| ^~~~~~~~~~~
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/paint.o -o bin/paint.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c pci_list.c -o bin/pci_list.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/pci_list.o -o bin/pci_list.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c ping.c -o bin/ping.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/ping.o -o bin/ping.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c pwd.c -o bin/pwd.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/pwd.o -o bin/pwd.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c reboot.c -o bin/reboot.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/reboot.o -o bin/reboot.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c rm.c -o bin/rm.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/rm.o -o bin/rm.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c settings.c -o bin/settings.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/settings.o bin/nanojpeg.o -o bin/settings.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c shutdown.c -o bin/shutdown.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/shutdown.o -o bin/shutdown.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c sweden.c -o bin/sweden.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/sweden.o -o bin/sweden.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c sysfetch.c -o bin/sysfetch.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/sysfetch.o -o bin/sysfetch.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c telnet.c -o bin/telnet.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/telnet.o -o bin/telnet.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c touch.c -o bin/touch.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/touch.o -o bin/touch.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c txtedit.c -o bin/txtedit.o
|
||||
txtedit.c: In function 'editor_paint':
|
||||
txtedit.c:330:10: warning: unused variable 'status_text' [-Wunused-variable]
|
||||
330 | char status_text[128];
|
||||
| ^~~~~~~~~~~
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/txtedit.o -o bin/txtedit.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c uptime.c -o bin/uptime.o
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/uptime.o -o bin/uptime.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -c viewer.c -o bin/viewer.o
|
||||
viewer.c: In function 'viewer_handle_click':
|
||||
viewer.c:104:45: warning: unused parameter 'win' [-Wunused-parameter]
|
||||
104 | static void viewer_handle_click(ui_window_t win, int x, int y) {
|
||||
| ~~~~~~~~~~~~^~~
|
||||
x86_64-elf-ld -m elf_x86_64 -nostdlib -static -no-pie -Ttext=0x40000000 --no-dynamic-linker -z text -z max-page-size=0x1000 -e _start bin/libui.o bin/stdlib.o bin/syscall.o bin/crt0.o bin/viewer.o bin/nanojpeg.o -o bin/viewer.elf
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -Wno-error -Idoom -c doom/am_map.c -o bin/am_map.o
|
||||
doom/am_map.c: In function 'AM_initVariables':
|
||||
doom/am_map.c:427:5: warning: missing initializer for field 'data4' of 'event_t' [-Wmissing-field-initializers]
|
||||
427 | static event_t st_notify = { ev_keyup, AM_MSGENTERED, 0, 0 };
|
||||
| ^~~~~~
|
||||
In file included from doom/st_stuff.h:25,
|
||||
from doom/am_map.c:27:
|
||||
doom/d_event.h:67:30: note: 'data4' declared here
|
||||
67 | int data1, data2, data3, data4;
|
||||
| ^~~~~
|
||||
doom/am_map.c: In function 'AM_Stop':
|
||||
doom/am_map.c:543:5: warning: missing initializer for field 'data4' of 'event_t' [-Wmissing-field-initializers]
|
||||
543 | static event_t st_notify = { 0, ev_keyup, AM_MSGEXITED, 0 };
|
||||
| ^~~~~~
|
||||
doom/d_event.h:67:30: note: 'data4' declared here
|
||||
67 | int data1, data2, data3, data4;
|
||||
| ^~~~~
|
||||
doom/am_map.c: In function 'AM_drawThings':
|
||||
doom/am_map.c:1293:9: warning: unused parameter 'colorrange' [-Wunused-parameter]
|
||||
1293 | int colorrange)
|
||||
| ~~~~~~^~~~~~~~~~
|
||||
x86_64-elf-gcc -Wall -Wextra -std=gnu11 -ffreestanding -O2 -fno-stack-protector -fno-stack-check -fno-lto -fno-pie -m64 -march=x86-64 -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-red-zone -Ilibc -Wno-error -Idoom -c doom/boredos_libc.c -o bin/boredos_libc.o
|
||||
doom/boredos_libc.c:6:27: error: 'false' undeclared here (not in a function)
|
||||
6 | static FILE _stderr = {2, false, false};
|
||||
| ^~~~~
|
||||
doom/boredos_libc.c:3:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
|
||||
2 | #include <syscall.h>
|
||||
+++ |+#include <stdbool.h>
|
||||
3 |
|
||||
doom/boredos_libc.c:6:1: warning: missing initializer for field 'eof' of 'FILE' [-Wmissing-field-initializers]
|
||||
6 | static FILE _stderr = {2, false, false};
|
||||
| ^~~~~~
|
||||
In file included from doom/boredos_libc.c:1:
|
||||
doom/boredos_libc.h:17:9: note: 'eof' declared here
|
||||
17 | int eof;
|
||||
| ^~~
|
||||
doom/boredos_libc.c:7:1: warning: missing initializer for field 'eof' of 'FILE' [-Wmissing-field-initializers]
|
||||
7 | static FILE _stdout = {1, false, false};
|
||||
| ^~~~~~
|
||||
doom/boredos_libc.h:17:9: note: 'eof' declared here
|
||||
17 | int eof;
|
||||
| ^~~
|
||||
doom/boredos_libc.c: In function 'fread':
|
||||
doom/boredos_libc.c:37:25: error: 'true' undeclared (first use in this function)
|
||||
37 | stream->error = true;
|
||||
| ^~~~
|
||||
doom/boredos_libc.c:37:25: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
|
||||
doom/boredos_libc.c:37:25: note: each undeclared identifier is reported only once for each function it appears in
|
||||
doom/boredos_libc.c: In function 'fwrite':
|
||||
doom/boredos_libc.c:52:25: error: 'true' undeclared (first use in this function)
|
||||
52 | stream->error = true;
|
||||
| ^~~~
|
||||
doom/boredos_libc.c:52:25: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
|
||||
doom/boredos_libc.c: In function 'rename':
|
||||
doom/boredos_libc.c:73:24: warning: unused parameter 'oldpath' [-Wunused-parameter]
|
||||
73 | int rename(const char *oldpath, const char *newpath) {
|
||||
| ~~~~~~~~~~~~^~~~~~~
|
||||
doom/boredos_libc.c:73:45: warning: unused parameter 'newpath' [-Wunused-parameter]
|
||||
73 | int rename(const char *oldpath, const char *newpath) {
|
||||
| ~~~~~~~~~~~~^~~~~~~
|
||||
doom/boredos_libc.c: In function 'mkdir':
|
||||
doom/boredos_libc.c:94:37: warning: unused parameter 'mode' [-Wunused-parameter]
|
||||
94 | int mkdir(const char *pathname, int mode) {
|
||||
| ~~~~^~~~
|
||||
doom/boredos_libc.c: In function 'access':
|
||||
doom/boredos_libc.c:98:38: warning: unused parameter 'mode' [-Wunused-parameter]
|
||||
98 | int access(const char *pathname, int mode) {
|
||||
| ~~~~^~~~
|
||||
doom/boredos_libc.c: In function 'fprintf':
|
||||
doom/boredos_libc.c:179:19: warning: unused parameter 'stream' [-Wunused-parameter]
|
||||
179 | int fprintf(FILE *stream, const char *format, ...) { return 0; }
|
||||
| ~~~~~~^~~~~~
|
||||
doom/boredos_libc.c:179:39: warning: unused parameter 'format' [-Wunused-parameter]
|
||||
179 | int fprintf(FILE *stream, const char *format, ...) { return 0; }
|
||||
| ~~~~~~~~~~~~^~~~~~
|
||||
doom/boredos_libc.c: In function 'sprintf':
|
||||
doom/boredos_libc.c:180:19: warning: unused parameter 'str' [-Wunused-parameter]
|
||||
180 | int sprintf(char *str, const char *format, ...) { return 0; }
|
||||
| ~~~~~~^~~
|
||||
doom/boredos_libc.c:180:36: warning: unused parameter 'format' [-Wunused-parameter]
|
||||
180 | int sprintf(char *str, const char *format, ...) { return 0; }
|
||||
| ~~~~~~~~~~~~^~~~~~
|
||||
doom/boredos_libc.c: In function 'snprintf':
|
||||
doom/boredos_libc.c:181:20: warning: unused parameter 'str' [-Wunused-parameter]
|
||||
181 | int snprintf(char *str, size_t size, const char *format, ...) { return 0; }
|
||||
| ~~~~~~^~~
|
||||
doom/boredos_libc.c:181:32: warning: unused parameter 'size' [-Wunused-parameter]
|
||||
181 | int snprintf(char *str, size_t size, const char *format, ...) { return 0; }
|
||||
| ~~~~~~~^~~~
|
||||
doom/boredos_libc.c:181:50: warning: unused parameter 'format' [-Wunused-parameter]
|
||||
181 | int snprintf(char *str, size_t size, const char *format, ...) { return 0; }
|
||||
| ~~~~~~~~~~~~^~~~~~
|
||||
doom/boredos_libc.c: In function 'vsnprintf':
|
||||
doom/boredos_libc.c:182:21: warning: unused parameter 'str' [-Wunused-parameter]
|
||||
182 | int vsnprintf(char *str, size_t size, const char *format, va_list ap) { return 0; }
|
||||
| ~~~~~~^~~
|
||||
doom/boredos_libc.c:182:33: warning: unused parameter 'size' [-Wunused-parameter]
|
||||
182 | int vsnprintf(char *str, size_t size, const char *format, va_list ap) { return 0; }
|
||||
| ~~~~~~~^~~~
|
||||
doom/boredos_libc.c:182:51: warning: unused parameter 'format' [-Wunused-parameter]
|
||||
182 | int vsnprintf(char *str, size_t size, const char *format, va_list ap) { return 0; }
|
||||
| ~~~~~~~~~~~~^~~~~~
|
||||
doom/boredos_libc.c:182:67: warning: unused parameter 'ap' [-Wunused-parameter]
|
||||
182 | int vsnprintf(char *str, size_t size, const char *format, va_list ap) { return 0; }
|
||||
| ~~~~~~~~^~
|
||||
doom/boredos_libc.c: In function 'sscanf':
|
||||
doom/boredos_libc.c:183:24: warning: unused parameter 'str' [-Wunused-parameter]
|
||||
183 | int sscanf(const char *str, const char *format, ...) { return 0; }
|
||||
| ~~~~~~~~~~~~^~~
|
||||
doom/boredos_libc.c:183:41: warning: unused parameter 'format' [-Wunused-parameter]
|
||||
183 | int sscanf(const char *str, const char *format, ...) { return 0; }
|
||||
| ~~~~~~~~~~~~^~~~~~
|
||||
make[1]: *** [bin/boredos_libc.o] Error 1
|
||||
rm bin/pwd.o bin/minesweeper.o bin/ls.o bin/echo.o bin/pci_list.o bin/date.o bin/mkdir.o bin/help.o bin/markdown.o bin/cc.o bin/sweden.o bin/rm.o bin/notepad.o bin/man.o bin/clock.o bin/clear.o bin/cat.o bin/cp.o bin/paint.o bin/crash.o bin/reboot.o bin/beep.o bin/meminfo.o bin/net.o bin/calculator.o bin/cowsay.o bin/telnet.o bin/hello.o bin/math.o bin/curl.o bin/uptime.o bin/about.o bin/sysfetch.o bin/ping.o bin/mv.o bin/txtedit.o bin/touch.o bin/shutdown.o
|
||||
make: *** [build/boredos.elf] Error 2
|
||||
BIN
build/about.o
BIN
build/about.o
Binary file not shown.
BIN
build/boot.o
BIN
build/boot.o
Binary file not shown.
BIN
build/brewos.elf
BIN
build/brewos.elf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/cmd.o
BIN
build/cmd.o
Binary file not shown.
Binary file not shown.
BIN
build/disk_manager.o
Normal file
BIN
build/disk_manager.o
Normal file
Binary file not shown.
BIN
build/dns.o
BIN
build/dns.o
Binary file not shown.
BIN
build/e1000.o
BIN
build/e1000.o
Binary file not shown.
BIN
build/editor.o
BIN
build/editor.o
Binary file not shown.
BIN
build/explorer.o
BIN
build/explorer.o
Binary file not shown.
BIN
build/fat32.o
BIN
build/fat32.o
Binary file not shown.
BIN
build/graphics.o
BIN
build/graphics.o
Binary file not shown.
BIN
build/http.o
BIN
build/http.o
Binary file not shown.
BIN
build/icmp.o
BIN
build/icmp.o
Binary file not shown.
BIN
build/idt.o
BIN
build/idt.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/main.o
BIN
build/main.o
Binary file not shown.
BIN
build/markdown.o
BIN
build/markdown.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/network.o
BIN
build/network.o
Binary file not shown.
BIN
build/notepad.o
BIN
build/notepad.o
Binary file not shown.
BIN
build/paint.o
BIN
build/paint.o
Binary file not shown.
BIN
build/pci.o
BIN
build/pci.o
Binary file not shown.
BIN
build/platform.o
BIN
build/platform.o
Binary file not shown.
BIN
build/ps2.o
BIN
build/ps2.o
Binary file not shown.
BIN
build/rtc.o
BIN
build/rtc.o
Binary file not shown.
BIN
build/tcp.o
BIN
build/tcp.o
Binary file not shown.
BIN
build/vm.o
BIN
build/vm.o
Binary file not shown.
BIN
build/wm.o
BIN
build/wm.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,156 +0,0 @@
|
||||
# Brew OS 1.44 Beta
|
||||
BrewOS is now in a Beta stage as i have brought over all apps from brewkernel and have made the DE a lot more usable and stable.
|
||||
|
||||
## Brewkernel is now BrewOS!
|
||||
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).
|
||||
|
||||
|
||||
<img src="asciiart.png" width="200" /> </br>
|
||||
Brew Kernel is a simple x86_64 hobbyist operating system.
|
||||
It features a DE (and WM), a FAT32 filesystem, customizable UI and much much more!
|
||||
|
||||
## Features
|
||||
- Drag and drop mouse centered UI
|
||||
- Customizable UI
|
||||
- Basic Networking Stack
|
||||
- Brew WM
|
||||
- Fat 32 FS
|
||||
- 64-bit long mode support
|
||||
- Multiboot2 compliant
|
||||
- Text editor
|
||||
- Markdown Viewer
|
||||
- Minesweeper
|
||||
- IDT
|
||||
- Ability to run on actual x86_64 hardware
|
||||
- CLI
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To build BrewOS, you'll need the following tools installed:
|
||||
|
||||
- **x86_64 ELF Toolchain**: `x86_64-elf-gcc`, `x86_64-elf-ld`
|
||||
- **NASM**: Netwide Assembler for compiling assembly code
|
||||
- **xorriso**: For creating bootable ISO images
|
||||
- **QEMU** (optional): For testing the kernel in an emulator
|
||||
|
||||
On macOS, you can install these using Homebrew:
|
||||
```sh
|
||||
brew install x86_64-elf-binutils x86_64-elf-gcc nasm xorriso qemu
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
Simply run `make` from the project root:
|
||||
|
||||
```sh
|
||||
make
|
||||
```
|
||||
|
||||
This will:
|
||||
1. Compile all kernel C sources and assembly files
|
||||
2. Link the kernel ELF binary
|
||||
3. Generate a bootable ISO image (`brewos.iso`)
|
||||
|
||||
The build output is organized as follows:
|
||||
- Compiled object files: `build/`
|
||||
- ISO root filesystem: `iso_root/`
|
||||
- Final ISO image: `brewos.iso`
|
||||
|
||||
## Running
|
||||
|
||||
### QEMU Emulation
|
||||
|
||||
Run the kernel in QEMU:
|
||||
|
||||
```sh
|
||||
make run
|
||||
```
|
||||
|
||||
Or manually:
|
||||
```sh
|
||||
qemu-system-x86_64 -m 2G -serial stdio -cdrom brewos.iso -boot d
|
||||
```
|
||||
|
||||
### Running on Real Hardware
|
||||
|
||||
*Warning: This is at YOUR OWN RISK. This software comes with ZERO warranty and may break your system.*
|
||||
|
||||
1. **Create bootable USB**: Use [Balena Etcher](https://www.balena.io/etcher/) to flash `brewos.iso` to a USB drive
|
||||
|
||||
2. **Prepare the system**:
|
||||
- Enable legacy (BIOS) boot in your system BIOS/UEFI settings
|
||||
- Disable Secure Boot if needed
|
||||
|
||||
3. **Boot**: Insert the USB drive and select it in the boot menu during startup
|
||||
|
||||
**Networking requires an Intel E1000 network card or similar while using Ethernet.**
|
||||
|
||||
4. **Tested Hardware**:
|
||||
- HP EliteDesk 705 G4 DM (AMD Ryzen 5 PRO 2400G, Radeon Vega) **Tested, no networking.**
|
||||
- Lenovo ThinkPad A475 20KL002VMH (AMD Pro A12-8830B, Radeon R7) **Tested, no networking.**
|
||||
- Acer Aspire E5-573-311M (Intel Core i3-5005U, Intel HD Graphics) **Tested, no networking.**
|
||||
|
||||
|
||||
## Project Structure
|
||||
|
||||
- `src/kernel/` - Main kernel implementation
|
||||
- `boot.asm` - Boot assembly code
|
||||
- `main.c` - Kernel entry point
|
||||
- `*.c / *.h` - Core kernel modules (graphics, interrupts, filesystem, etc.)
|
||||
- `cli_apps/` - Command-line applications
|
||||
- `build/` - Compiled object files (generated during build)
|
||||
- `iso_root/` - ISO filesystem layout (generated during build)
|
||||
- `limine/` - Limine bootloader files (downloaded automatically)
|
||||
- `linker.ld` - Linker script for x86_64 ELF
|
||||
- `limine.cfg` - Limine bootloader configuration
|
||||
- `Makefile` - Build configuration and targets
|
||||
|
||||
|
||||
|
||||
|
||||
###
|
||||
###
|
||||
|
||||
<h2 align="left">Help me brew some coffee! ☕️</h2>
|
||||
|
||||
###
|
||||
|
||||
<p align="left">
|
||||
If you enjoy this project, and like what i'm doing here, consider buying me a coffee!
|
||||
<br><br>
|
||||
<a href="https://buymeacoffee.com/boreddevnl" target="_blank">
|
||||
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="50" style="border-radius: 8px;" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
###
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Copyright (C) 2024-2026 boreddevnl
|
||||
|
||||
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.
|
||||
|
||||
NOTICE
|
||||
------
|
||||
|
||||
This product includes software developed by Chris ("boreddevnl") as part of the BrewKernel project.
|
||||
|
||||
Copyright (C) 2024–2026 Chris / boreddevnl (previously boreddevhq)
|
||||
|
||||
All source files in this repository contain copyright and license
|
||||
headers that must be preserved in redistributions and derivative works.
|
||||
|
||||
If you distribute or modify this project (in whole or in part),
|
||||
you MUST:
|
||||
|
||||
- Retain all copyright and license headers at the top of each file.
|
||||
- Include this NOTICE file along with any redistributions or
|
||||
derivative works.
|
||||
- Provide clear attribution to the original author in documentation
|
||||
or credits where appropriate.
|
||||
|
||||
The above attribution requirements are informational and intended to
|
||||
ensure proper credit is given. They do not alter or supersede the
|
||||
terms of the GNU General Public License (GPL), which governs this work.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +0,0 @@
|
||||
TIMEOUT=3
|
||||
|
||||
:BrewOS
|
||||
PROTOCOL=limine
|
||||
|
||||
KERNEL_PATH=boot:///brewos.elf
|
||||
|
||||
#FRAMEBUFFER_WIDTH=1280
|
||||
#FRAMEBUFFER_HEIGHT=720
|
||||
2
limine
2
limine
Submodule limine updated: efd130dbb6...38ff2c855a
@@ -1,9 +0,0 @@
|
||||
TIMEOUT=3
|
||||
|
||||
:BrewOS
|
||||
PROTOCOL=limine
|
||||
|
||||
KERNEL_PATH=boot:///brewos.elf
|
||||
|
||||
#FRAMEBUFFER_WIDTH=1280
|
||||
#FRAMEBUFFER_HEIGHT=720
|
||||
15
limine.conf
Normal file
15
limine.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2023-2026 Chris (boreddevnl)
|
||||
# This software is released under the GNU General Public License v3.0. See LICENSE file for details.
|
||||
# This header needs to maintain in any file it is present in, as per the GPL license terms.
|
||||
|
||||
timeout: 3
|
||||
verbose: yes
|
||||
|
||||
${WALLPAPER_PATH}=boot():/splash.jpg
|
||||
wallpaper: ${WALLPAPER_PATH}
|
||||
wallpaper_style: centered
|
||||
backdrop: 000000
|
||||
|
||||
/BoredOS
|
||||
protocol: limine
|
||||
path: boot():/boredos.elf
|
||||
14
linker.ld
14
linker.ld
@@ -15,6 +15,12 @@ SECTIONS
|
||||
*(.rodata*)
|
||||
}
|
||||
|
||||
.requests : {
|
||||
KEEP(*(.requests_start))
|
||||
KEEP(*(.requests))
|
||||
KEEP(*(.requests_end))
|
||||
}
|
||||
|
||||
.data : {
|
||||
*(.data*)
|
||||
}
|
||||
@@ -24,14 +30,6 @@ SECTIONS
|
||||
*(.bss*)
|
||||
}
|
||||
|
||||
/* Limine requests section */
|
||||
.requests : {
|
||||
KEEP(*(.requests_start))
|
||||
KEEP(*(.requests))
|
||||
KEEP(*(.requests_end))
|
||||
}
|
||||
|
||||
/* Discard unnecessary sections */
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
*(.note .note.*)
|
||||
|
||||
BIN
screenshot.jpg
Normal file
BIN
screenshot.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 317 KiB |
BIN
splash.jpg
Normal file
BIN
splash.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
BIN
src/.DS_Store
vendored
Normal file
BIN
src/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
src/kernel/.DS_Store
vendored
Normal file
BIN
src/kernel/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -1,63 +0,0 @@
|
||||
#include "about.h"
|
||||
#include "graphics.h"
|
||||
#include "wm.h"
|
||||
#include <stddef.h>
|
||||
|
||||
Window win_about;
|
||||
|
||||
// Color definitions
|
||||
#define COLOR_BLUE_LOGO 0xFF1E8AF5
|
||||
#define COLOR_GREEN_LOGO 0xFF6DD651
|
||||
#define COLOR_YELLOW_LOGO 0xFFF5BE34
|
||||
#define COLOR_RED_LOGO 0xFFF05456
|
||||
#define COLOR_PURPLE_LOGO 0xFFA65DC2
|
||||
#define COLOR_CYAN_LOGO 0xFF368DF7
|
||||
|
||||
static void about_paint(Window *win) {
|
||||
int offset_x = win->x + 15;
|
||||
int offset_y = win->y + 35;
|
||||
|
||||
// Draw brewkernel ASCII logo
|
||||
draw_string(offset_x, offset_y, "( (", COLOR_BLUE_LOGO);
|
||||
|
||||
draw_string(offset_x, offset_y + 15, " ) )", COLOR_GREEN_LOGO);
|
||||
|
||||
draw_string(offset_x, offset_y + 30, " ........", COLOR_YELLOW_LOGO);
|
||||
|
||||
draw_string(offset_x, offset_y + 45, " | |]", COLOR_RED_LOGO);
|
||||
|
||||
draw_string(offset_x, offset_y + 60, " \\ /", COLOR_PURPLE_LOGO);
|
||||
|
||||
draw_string(offset_x, offset_y + 75, " `----'", COLOR_CYAN_LOGO);
|
||||
|
||||
// Version info
|
||||
draw_string(offset_x, offset_y + 105, "BrewOS", COLOR_BLACK);
|
||||
draw_string(offset_x, offset_y + 120, "BrewOS Version 1.44", COLOR_BLACK);
|
||||
draw_string(offset_x, offset_y + 135, "Kernel Version 2.3.1", COLOR_BLACK);
|
||||
|
||||
// Copyright
|
||||
draw_string(offset_x, offset_y + 150, "(C) 2026 boreddevnl.", COLOR_BLACK);
|
||||
draw_string(offset_x, offset_y + 165, "All rights reserved.", COLOR_BLACK);
|
||||
}
|
||||
|
||||
static void about_click(Window *win, int x, int y) {
|
||||
(void)win;
|
||||
(void)x;
|
||||
(void)y;
|
||||
// No interactive elements needed for About dialog
|
||||
}
|
||||
|
||||
void about_init(void) {
|
||||
win_about.title = "About BrewOS";
|
||||
win_about.x = 250;
|
||||
win_about.y = 180;
|
||||
win_about.w = 185;
|
||||
win_about.h = 240;
|
||||
win_about.visible = false;
|
||||
win_about.focused = false;
|
||||
win_about.z_index = 0;
|
||||
win_about.paint = about_paint;
|
||||
win_about.handle_click = about_click;
|
||||
win_about.handle_right_click = NULL;
|
||||
win_about.handle_key = NULL;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
#ifndef ABOUT_H
|
||||
#define ABOUT_H
|
||||
|
||||
#include "wm.h"
|
||||
|
||||
extern Window win_about;
|
||||
|
||||
void about_init(void);
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
; brew-os/src/kernel/boot.asm
|
||||
; 64-bit Entry Point for BrewOS
|
||||
|
||||
; 64-bit Entry Point for BoredOS
|
||||
; Copyright (c) 2023-2026 Chris (boreddevnl)
|
||||
; This software is released under the GNU General Public License v3.0. See LICENSE file for details.
|
||||
; This header needs to maintain in any file it is present in, as per the GPL license terms.
|
||||
section .text
|
||||
global _start
|
||||
extern kmain
|
||||
@@ -8,15 +9,11 @@ extern kmain
|
||||
bits 64
|
||||
|
||||
_start:
|
||||
; Ensure interrupts are disabled
|
||||
cli
|
||||
|
||||
; (Limine guarantees 16-byte alignment)
|
||||
|
||||
; Call the C kernel entry point
|
||||
call kmain
|
||||
|
||||
; Halt if kmain returns
|
||||
hlt
|
||||
.loop:
|
||||
jmp .loop
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#ifndef CALCULATOR_H
|
||||
#define CALCULATOR_H
|
||||
|
||||
#include "wm.h"
|
||||
|
||||
extern Window win_calculator;
|
||||
|
||||
void calculator_init(void);
|
||||
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
#include "cli_utils.h"
|
||||
|
||||
void cli_cmd_brewver(char *args) {
|
||||
(void)args;
|
||||
cli_write("BrewOS v1.44 Beta\n");
|
||||
cli_write("BrewOS Kernel V2.3.1 Beta\n");
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#include "cli_utils.h"
|
||||
#include "io.h"
|
||||
|
||||
void cli_cmd_beep(char *args) {
|
||||
(void)args;
|
||||
cli_write("BEEP!\n");
|
||||
outb(0x43, 0xB6);
|
||||
int freq = 1000;
|
||||
int div = 1193180 / freq;
|
||||
outb(0x42, div & 0xFF);
|
||||
outb(0x42, (div >> 8) & 0xFF);
|
||||
|
||||
outb(0x61, inb(0x61) | 0x03);
|
||||
cli_sleep(100);
|
||||
outb(0x61, inb(0x61) & 0xFC);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#include "cli_utils.h"
|
||||
|
||||
void cli_cmd_blind(char *args) {
|
||||
(void)args;
|
||||
cli_write("Woah.. is this heaven?\n");
|
||||
cli_write("no.\n");
|
||||
cli_write("This isn't TempleOS you fucking retard.\n");
|
||||
}
|
||||
@@ -1,738 +0,0 @@
|
||||
#include "cli_apps.h"
|
||||
#include "cli_utils.h"
|
||||
#include "../vm.h"
|
||||
#include "../fat32.h"
|
||||
#include "../memory_manager.h"
|
||||
#include "../cmd.h"
|
||||
|
||||
// --- Compiler Limits ---
|
||||
#define MAX_SOURCE 65536
|
||||
#define MAX_TOKENS 16384
|
||||
#define MAX_VARS 512
|
||||
#define CODE_SIZE 32768
|
||||
#define STR_POOL_SIZE 16384
|
||||
|
||||
static int compile_error = 0;
|
||||
|
||||
// --- Lexer ---
|
||||
typedef enum {
|
||||
TOK_EOF,
|
||||
TOK_INT, // 123, 0xFF
|
||||
TOK_STRING, // "hello"
|
||||
TOK_ID, // abc
|
||||
TOK_PLUS, // +
|
||||
TOK_MINUS, // -
|
||||
TOK_MUL, // *
|
||||
TOK_DIV, // /
|
||||
TOK_ASSIGN, // =
|
||||
TOK_LPAREN, // (
|
||||
TOK_RPAREN, // )
|
||||
TOK_LBRACKET, // [
|
||||
TOK_RBRACKET, // ]
|
||||
TOK_LBRACE, // {
|
||||
TOK_RBRACE, // }
|
||||
TOK_SEMI, // ;
|
||||
TOK_COMMA, // ,
|
||||
TOK_EQ, // ==
|
||||
TOK_NEQ, // !=
|
||||
TOK_LT, // <
|
||||
TOK_GT, // >
|
||||
TOK_LE, // <=
|
||||
TOK_GE, // >=
|
||||
TOK_IF, // if
|
||||
TOK_ELSE, // else
|
||||
TOK_WHILE, // while
|
||||
TOK_INT_TYPE, // int
|
||||
TOK_CHAR_TYPE,// char
|
||||
TOK_VOID_TYPE,// void
|
||||
TOK_MAIN // main
|
||||
} TokenType;
|
||||
|
||||
typedef struct {
|
||||
TokenType type;
|
||||
int int_val;
|
||||
char str_val[64]; // Identifier or String Content
|
||||
} Token;
|
||||
|
||||
static char *source_ptr;
|
||||
static Token tokens[MAX_TOKENS];
|
||||
static int token_count = 0;
|
||||
|
||||
static void lex_error(const char *msg) {
|
||||
cmd_write("Compiler Error: ");
|
||||
cmd_write(msg);
|
||||
cmd_write("\n");
|
||||
compile_error = 1;
|
||||
}
|
||||
|
||||
static void lexer(const char *source) {
|
||||
source_ptr = (char*)source;
|
||||
token_count = 0;
|
||||
compile_error = 0;
|
||||
|
||||
while (*source_ptr) {
|
||||
// Skip whitespace
|
||||
while (*source_ptr == ' ' || *source_ptr == '\n' || *source_ptr == '\t' || *source_ptr == '\r') source_ptr++;
|
||||
if (!*source_ptr) break;
|
||||
|
||||
// Skip comments //
|
||||
if (*source_ptr == '/' && *(source_ptr+1) == '/') {
|
||||
while (*source_ptr && *source_ptr != '\n') source_ptr++;
|
||||
continue;
|
||||
}
|
||||
|
||||
Token *t = &tokens[token_count++];
|
||||
|
||||
// Hex Literals 0x...
|
||||
if (*source_ptr == '0' && (*(source_ptr+1) == 'x' || *(source_ptr+1) == 'X')) {
|
||||
source_ptr += 2; // Skip 0x
|
||||
t->type = TOK_INT;
|
||||
t->int_val = 0;
|
||||
int has_digits = 0;
|
||||
while ((*source_ptr >= '0' && *source_ptr <= '9') ||
|
||||
(*source_ptr >= 'a' && *source_ptr <= 'f') ||
|
||||
(*source_ptr >= 'A' && *source_ptr <= 'F')) {
|
||||
int digit = 0;
|
||||
if (*source_ptr >= '0' && *source_ptr <= '9') digit = *source_ptr - '0';
|
||||
else if (*source_ptr >= 'a' && *source_ptr <= 'f') digit = *source_ptr - 'a' + 10;
|
||||
else if (*source_ptr >= 'A' && *source_ptr <= 'F') digit = *source_ptr - 'A' + 10;
|
||||
|
||||
t->int_val = (t->int_val << 4) | digit;
|
||||
source_ptr++;
|
||||
has_digits = 1;
|
||||
}
|
||||
if (!has_digits) {
|
||||
lex_error("Invalid hex literal");
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Decimal Integers
|
||||
else if (*source_ptr >= '0' && *source_ptr <= '9') {
|
||||
t->type = TOK_INT;
|
||||
t->int_val = 0;
|
||||
while (*source_ptr >= '0' && *source_ptr <= '9') {
|
||||
t->int_val = t->int_val * 10 + (*source_ptr - '0');
|
||||
source_ptr++;
|
||||
}
|
||||
}
|
||||
// Strings
|
||||
else if (*source_ptr == '"') {
|
||||
t->type = TOK_STRING;
|
||||
source_ptr++; // Skip "
|
||||
int len = 0;
|
||||
while (*source_ptr && *source_ptr != '"') {
|
||||
if (*source_ptr == '\\' && *(source_ptr+1) == 'n') {
|
||||
if (len < 63) t->str_val[len++] = '\n';
|
||||
source_ptr += 2;
|
||||
} else {
|
||||
if (len < 63) t->str_val[len++] = *source_ptr;
|
||||
source_ptr++;
|
||||
}
|
||||
}
|
||||
t->str_val[len] = 0;
|
||||
if (*source_ptr == '"') source_ptr++;
|
||||
}
|
||||
// Character Literals
|
||||
else if (*source_ptr == '\'') {
|
||||
t->type = TOK_INT;
|
||||
source_ptr++; // Skip '
|
||||
char c = 0;
|
||||
if (*source_ptr == '\\') {
|
||||
source_ptr++;
|
||||
if (*source_ptr == 'n') c = '\n';
|
||||
else if (*source_ptr == 't') c = '\t';
|
||||
else if (*source_ptr == '0') c = '\0';
|
||||
else if (*source_ptr == '\\') c = '\\';
|
||||
else if (*source_ptr == '\'') c = '\'';
|
||||
else c = *source_ptr;
|
||||
source_ptr++;
|
||||
} else {
|
||||
c = *source_ptr;
|
||||
source_ptr++;
|
||||
}
|
||||
if (*source_ptr == '\'') source_ptr++;
|
||||
else { lex_error("Expected closing '"); return; }
|
||||
t->int_val = (int)c;
|
||||
}
|
||||
// Identifiers
|
||||
else if ((*source_ptr >= 'a' && *source_ptr <= 'z') || (*source_ptr >= 'A' && *source_ptr <= 'Z') || *source_ptr == '_') {
|
||||
int len = 0;
|
||||
while ((*source_ptr >= 'a' && *source_ptr <= 'z') || (*source_ptr >= 'A' && *source_ptr <= 'Z') || (*source_ptr >= '0' && *source_ptr <= '9') || *source_ptr == '_') {
|
||||
if (len < 63) t->str_val[len++] = *source_ptr;
|
||||
source_ptr++;
|
||||
}
|
||||
t->str_val[len] = 0;
|
||||
|
||||
if (cli_strcmp(t->str_val, "if") == 0) t->type = TOK_IF;
|
||||
else if (cli_strcmp(t->str_val, "else") == 0) t->type = TOK_ELSE;
|
||||
else if (cli_strcmp(t->str_val, "while") == 0) t->type = TOK_WHILE;
|
||||
else if (cli_strcmp(t->str_val, "int") == 0) t->type = TOK_INT_TYPE;
|
||||
else if (cli_strcmp(t->str_val, "char") == 0) t->type = TOK_CHAR_TYPE;
|
||||
else if (cli_strcmp(t->str_val, "void") == 0) t->type = TOK_VOID_TYPE;
|
||||
else if (cli_strcmp(t->str_val, "main") == 0) t->type = TOK_MAIN;
|
||||
else t->type = TOK_ID;
|
||||
} else {
|
||||
switch (*source_ptr) {
|
||||
case '+': t->type = TOK_PLUS; break;
|
||||
case '-': t->type = TOK_MINUS; break;
|
||||
case '*': t->type = TOK_MUL; break;
|
||||
case '/': t->type = TOK_DIV; break;
|
||||
case '(': t->type = TOK_LPAREN; break;
|
||||
case ')': t->type = TOK_RPAREN; break;
|
||||
case '[': t->type = TOK_LBRACKET; break;
|
||||
case ']': t->type = TOK_RBRACKET; break;
|
||||
case '{': t->type = TOK_LBRACE; break;
|
||||
case '}': t->type = TOK_RBRACE; break;
|
||||
case ';': t->type = TOK_SEMI; break;
|
||||
case ',': t->type = TOK_COMMA; break;
|
||||
case '=':
|
||||
if (*(source_ptr+1) == '=') { t->type = TOK_EQ; source_ptr++; }
|
||||
else t->type = TOK_ASSIGN;
|
||||
break;
|
||||
case '!':
|
||||
if (*(source_ptr+1) == '=') { t->type = TOK_NEQ; source_ptr++; }
|
||||
else { lex_error("Unexpected !"); return; }
|
||||
break;
|
||||
case '<':
|
||||
if (*(source_ptr+1) == '=') { t->type = TOK_LE; source_ptr++; }
|
||||
else t->type = TOK_LT;
|
||||
break;
|
||||
case '>':
|
||||
if (*(source_ptr+1) == '=') { t->type = TOK_GE; source_ptr++; }
|
||||
else t->type = TOK_GT;
|
||||
break;
|
||||
default:
|
||||
lex_error("Unknown char");
|
||||
return;
|
||||
}
|
||||
source_ptr++;
|
||||
}
|
||||
}
|
||||
tokens[token_count].type = TOK_EOF;
|
||||
}
|
||||
|
||||
// --- Builtins ---
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
int syscall_id;
|
||||
} Builtin;
|
||||
|
||||
static const Builtin builtins[] = {
|
||||
{"exit", SYS_EXIT},
|
||||
{"print_int", SYS_PRINT_INT},
|
||||
{"print_char", SYS_PRINT_CHAR},
|
||||
{"print_str", SYS_PRINT_STR}, // puts
|
||||
{"print", SYS_PRINT_INT}, // Alias
|
||||
{"pritc", SYS_PRINT_CHAR}, // Alias
|
||||
{"puts", SYS_PRINT_STR}, // Alias
|
||||
{"nl", SYS_NL},
|
||||
{"cls", SYS_CLS},
|
||||
{"getchar", SYS_GETCHAR},
|
||||
{"strlen", SYS_STRLEN},
|
||||
{"strcmp", SYS_STRCMP},
|
||||
{"strcpy", SYS_STRCPY},
|
||||
{"strcat", SYS_STRCAT},
|
||||
{"memset", SYS_MEMSET},
|
||||
{"memcpy", SYS_MEMCPY},
|
||||
{"malloc", SYS_MALLOC},
|
||||
{"free", SYS_FREE},
|
||||
{"rand", SYS_RAND},
|
||||
{"srand", SYS_SRAND},
|
||||
{"abs", SYS_ABS},
|
||||
{"min", SYS_MIN},
|
||||
{"max", SYS_MAX},
|
||||
{"pow", SYS_POW},
|
||||
{"sqrt", SYS_SQRT},
|
||||
{"sleep", SYS_SLEEP},
|
||||
{"fopen", SYS_FOPEN},
|
||||
{"fclose", SYS_FCLOSE},
|
||||
{"fread", SYS_FREAD},
|
||||
{"fwrite", SYS_FWRITE},
|
||||
{"fseek", SYS_FSEEK},
|
||||
{"remove", SYS_REMOVE},
|
||||
{"draw_pixel", SYS_DRAW_PIXEL},
|
||||
{"draw_rect", SYS_DRAW_RECT},
|
||||
{"draw_line", SYS_DRAW_LINE},
|
||||
{"draw_text", SYS_DRAW_TEXT},
|
||||
{"get_width", SYS_GET_WIDTH},
|
||||
{"get_height", SYS_GET_HEIGHT},
|
||||
{"get_time", SYS_GET_TIME},
|
||||
{"kb_hit", SYS_KB_HIT},
|
||||
{"mouse_x", SYS_MOUSE_X},
|
||||
{"mouse_y", SYS_MOUSE_Y},
|
||||
{"mouse_state", SYS_MOUSE_STATE},
|
||||
{"play_sound", SYS_PLAY_SOUND},
|
||||
{"atoi", SYS_ATOI},
|
||||
{"itoa", SYS_ITOA},
|
||||
{"peek", SYS_PEEK},
|
||||
{"poke", SYS_POKE},
|
||||
{"exec", SYS_EXEC},
|
||||
{"system", SYS_SYSTEM},
|
||||
{"strchr", SYS_STRCHR},
|
||||
{"memcmp", SYS_MEMCMP},
|
||||
{"isalnum", SYS_ISALNUM},
|
||||
{"isalpha", SYS_ISALPHA},
|
||||
{"isdigit", SYS_ISDIGIT},
|
||||
{"tolower", SYS_TOLOWER},
|
||||
{"toupper", SYS_TOUPPER},
|
||||
{"strncpy", SYS_STRNCPY},
|
||||
{"strncat", SYS_STRNCAT},
|
||||
{"strncmp", SYS_STRNCMP},
|
||||
{"strstr", SYS_STRSTR},
|
||||
{"strrchr", SYS_STRRCHR},
|
||||
{"memmove", SYS_MEMMOVE},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
static int find_builtin(const char *name) {
|
||||
for (int i = 0; builtins[i].name != NULL; i++) {
|
||||
if (cli_strcmp(builtins[i].name, name) == 0) {
|
||||
return builtins[i].syscall_id;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// --- Parser & CodeGen ---
|
||||
|
||||
static uint8_t code[CODE_SIZE];
|
||||
static int code_pos = 0;
|
||||
static int cur_token = 0;
|
||||
|
||||
static uint8_t str_pool[STR_POOL_SIZE];
|
||||
static int str_pool_pos = 0;
|
||||
|
||||
// Variables
|
||||
typedef struct {
|
||||
char name[32];
|
||||
int addr; // Address in VM memory
|
||||
} Symbol;
|
||||
|
||||
static Symbol symbols[MAX_VARS];
|
||||
static int symbol_count = 0;
|
||||
|
||||
static int next_var_addr = 32768;
|
||||
|
||||
static int find_symbol(const char *name) {
|
||||
for (int i = 0; i < symbol_count; i++) {
|
||||
if (cli_strcmp(symbols[i].name, name) == 0) return symbols[i].addr;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int add_symbol(const char *name) {
|
||||
if (find_symbol(name) != -1) return find_symbol(name);
|
||||
if (symbol_count >= MAX_VARS) return -1;
|
||||
cli_strcpy(symbols[symbol_count].name, name);
|
||||
symbols[symbol_count].addr = next_var_addr;
|
||||
next_var_addr += 4; // 32-bit int
|
||||
return symbol_count++;
|
||||
}
|
||||
|
||||
static void emit(uint8_t b) {
|
||||
if (code_pos < CODE_SIZE) code[code_pos++] = b;
|
||||
else {
|
||||
cmd_write("Error: Code buffer overflow\n");
|
||||
compile_error = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void emit32(int v) {
|
||||
emit(v & 0xFF);
|
||||
emit((v >> 8) & 0xFF);
|
||||
emit((v >> 16) & 0xFF);
|
||||
emit((v >> 24) & 0xFF);
|
||||
}
|
||||
|
||||
static int add_string(const char *str) {
|
||||
int start = str_pool_pos;
|
||||
int len = cli_strlen(str);
|
||||
if (str_pool_pos + len + 1 >= STR_POOL_SIZE) {
|
||||
cmd_write("Error: String pool overflow\n");
|
||||
compile_error = 1;
|
||||
return 0;
|
||||
}
|
||||
for(int i=0; i<len; i++) str_pool[str_pool_pos++] = str[i];
|
||||
str_pool[str_pool_pos++] = 0;
|
||||
return start;
|
||||
}
|
||||
|
||||
static void match(TokenType t) {
|
||||
if (compile_error) return;
|
||||
if (tokens[cur_token].type == t) {
|
||||
cur_token++;
|
||||
} else {
|
||||
cmd_write("Syntax Error: Expected token ");
|
||||
// Debugging helper
|
||||
cmd_write_int(t);
|
||||
cmd_write(" got ");
|
||||
cmd_write_int(tokens[cur_token].type);
|
||||
cmd_write("\n");
|
||||
compile_error = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Forward decls
|
||||
static void expression();
|
||||
static void statement();
|
||||
static void block();
|
||||
|
||||
static void function_call(int syscall_id) {
|
||||
if (compile_error) return;
|
||||
cur_token++; // ID
|
||||
match(TOK_LPAREN);
|
||||
|
||||
if (tokens[cur_token].type != TOK_RPAREN) {
|
||||
expression();
|
||||
while (tokens[cur_token].type == TOK_COMMA) {
|
||||
cur_token++;
|
||||
expression();
|
||||
}
|
||||
}
|
||||
match(TOK_RPAREN);
|
||||
|
||||
emit(OP_SYSCALL);
|
||||
emit32(syscall_id);
|
||||
}
|
||||
|
||||
static void factor() {
|
||||
if (compile_error) return;
|
||||
if (tokens[cur_token].type == TOK_INT) {
|
||||
emit(OP_IMM);
|
||||
emit32(tokens[cur_token].int_val);
|
||||
cur_token++;
|
||||
} else if (tokens[cur_token].type == TOK_STRING) {
|
||||
int offset = add_string(tokens[cur_token].str_val);
|
||||
emit(OP_PUSH_PTR);
|
||||
emit32(offset);
|
||||
cur_token++;
|
||||
} else if (tokens[cur_token].type == TOK_ID) {
|
||||
int syscall = find_builtin(tokens[cur_token].str_val);
|
||||
if (syscall != -1 && tokens[cur_token+1].type == TOK_LPAREN) {
|
||||
function_call(syscall);
|
||||
} else {
|
||||
int addr = find_symbol(tokens[cur_token].str_val);
|
||||
if (addr == -1) {
|
||||
cmd_write("Error: Undefined variable: ");
|
||||
cmd_write(tokens[cur_token].str_val);
|
||||
cmd_write("\n");
|
||||
compile_error = 1;
|
||||
}
|
||||
emit(OP_LOAD);
|
||||
emit32(addr);
|
||||
cur_token++;
|
||||
}
|
||||
} else if (tokens[cur_token].type == TOK_LPAREN) {
|
||||
cur_token++;
|
||||
expression();
|
||||
match(TOK_RPAREN);
|
||||
} else {
|
||||
cmd_write("Syntax Error: Unexpected token in factor\n");
|
||||
compile_error = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void term() {
|
||||
if (compile_error) return;
|
||||
factor();
|
||||
while (tokens[cur_token].type == TOK_MUL || tokens[cur_token].type == TOK_DIV) {
|
||||
TokenType op = tokens[cur_token].type;
|
||||
cur_token++;
|
||||
factor();
|
||||
if (op == TOK_MUL) emit(OP_MUL);
|
||||
else emit(OP_DIV);
|
||||
}
|
||||
}
|
||||
|
||||
static void additive() {
|
||||
if (compile_error) return;
|
||||
term();
|
||||
while (tokens[cur_token].type == TOK_PLUS || tokens[cur_token].type == TOK_MINUS) {
|
||||
TokenType op = tokens[cur_token].type;
|
||||
cur_token++;
|
||||
term();
|
||||
if (op == TOK_PLUS) emit(OP_ADD);
|
||||
else emit(OP_SUB);
|
||||
}
|
||||
}
|
||||
|
||||
static void relation() {
|
||||
if (compile_error) return;
|
||||
additive();
|
||||
if (tokens[cur_token].type >= TOK_EQ && tokens[cur_token].type <= TOK_GE) {
|
||||
TokenType op = tokens[cur_token].type;
|
||||
cur_token++;
|
||||
additive();
|
||||
switch (op) {
|
||||
case TOK_EQ: emit(OP_EQ); break;
|
||||
case TOK_NEQ: emit(OP_NEQ); break;
|
||||
case TOK_LT: emit(OP_LT); break;
|
||||
case TOK_GT: emit(OP_GT); break;
|
||||
case TOK_LE: emit(OP_LE); break;
|
||||
case TOK_GE: emit(OP_GE); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void expression() {
|
||||
if (compile_error) return;
|
||||
relation();
|
||||
}
|
||||
|
||||
static void statement() {
|
||||
if (compile_error) return;
|
||||
if (tokens[cur_token].type == TOK_INT_TYPE || tokens[cur_token].type == TOK_CHAR_TYPE) {
|
||||
// Declaration
|
||||
cur_token++;
|
||||
while (tokens[cur_token].type == TOK_MUL) cur_token++; // Skip pointers *
|
||||
|
||||
if (tokens[cur_token].type == TOK_ID) {
|
||||
add_symbol(tokens[cur_token].str_val);
|
||||
cur_token++;
|
||||
|
||||
// Skip array size [INT]
|
||||
if (tokens[cur_token].type == TOK_LBRACKET) {
|
||||
cur_token++;
|
||||
if (tokens[cur_token].type == TOK_INT) cur_token++;
|
||||
if (tokens[cur_token].type == TOK_RBRACKET) cur_token++;
|
||||
else cmd_write("Error: Expected ]\n");
|
||||
}
|
||||
|
||||
if (tokens[cur_token].type == TOK_ASSIGN) { int addr = find_symbol(tokens[cur_token-1].str_val);
|
||||
cur_token++;
|
||||
expression();
|
||||
emit(OP_STORE);
|
||||
emit32(addr);
|
||||
}
|
||||
match(TOK_SEMI);
|
||||
} else {
|
||||
cmd_write("Syntax Error: Expected identifier\n");
|
||||
compile_error = 1;
|
||||
}
|
||||
} else if (tokens[cur_token].type == TOK_ID) {
|
||||
int syscall = find_builtin(tokens[cur_token].str_val);
|
||||
if (syscall != -1 && tokens[cur_token+1].type == TOK_LPAREN) {
|
||||
function_call(syscall);
|
||||
match(TOK_SEMI);
|
||||
// Drop return value (primitive)
|
||||
emit(OP_POP);
|
||||
} else {
|
||||
// Assignment: x = expr;
|
||||
int addr = find_symbol(tokens[cur_token].str_val);
|
||||
if (addr == -1) {
|
||||
cmd_write("Error: Undefined variable assignment: ");
|
||||
cmd_write(tokens[cur_token].str_val);
|
||||
cmd_write("\n");
|
||||
compile_error = 1;
|
||||
return;
|
||||
}
|
||||
cur_token++;
|
||||
match(TOK_ASSIGN);
|
||||
expression();
|
||||
match(TOK_SEMI);
|
||||
emit(OP_STORE);
|
||||
emit32(addr);
|
||||
}
|
||||
} else if (tokens[cur_token].type == TOK_IF) {
|
||||
cur_token++;
|
||||
match(TOK_LPAREN);
|
||||
expression();
|
||||
match(TOK_RPAREN);
|
||||
|
||||
emit(OP_JZ);
|
||||
int jz_addr_pos = code_pos;
|
||||
emit32(0);
|
||||
|
||||
block();
|
||||
|
||||
if (tokens[cur_token].type == TOK_ELSE) {
|
||||
emit(OP_JMP);
|
||||
int jmp_addr_pos = code_pos;
|
||||
emit32(0);
|
||||
|
||||
int else_start = code_pos;
|
||||
code[jz_addr_pos] = else_start & 0xFF;
|
||||
code[jz_addr_pos+1] = (else_start >> 8) & 0xFF;
|
||||
code[jz_addr_pos+2] = (else_start >> 16) & 0xFF;
|
||||
code[jz_addr_pos+3] = (else_start >> 24) & 0xFF;
|
||||
|
||||
cur_token++;
|
||||
block();
|
||||
|
||||
int end_addr = code_pos;
|
||||
code[jmp_addr_pos] = end_addr & 0xFF;
|
||||
code[jmp_addr_pos+1] = (end_addr >> 8) & 0xFF;
|
||||
code[jmp_addr_pos+2] = (end_addr >> 16) & 0xFF;
|
||||
code[jmp_addr_pos+3] = (end_addr >> 24) & 0xFF;
|
||||
} else {
|
||||
int end_addr = code_pos;
|
||||
code[jz_addr_pos] = end_addr & 0xFF;
|
||||
code[jz_addr_pos+1] = (end_addr >> 8) & 0xFF;
|
||||
code[jz_addr_pos+2] = (end_addr >> 16) & 0xFF;
|
||||
code[jz_addr_pos+3] = (end_addr >> 24) & 0xFF;
|
||||
}
|
||||
} else if (tokens[cur_token].type == TOK_WHILE) {
|
||||
int start_addr = code_pos;
|
||||
cur_token++;
|
||||
match(TOK_LPAREN);
|
||||
expression();
|
||||
match(TOK_RPAREN);
|
||||
|
||||
emit(OP_JZ);
|
||||
int jz_addr_pos = code_pos;
|
||||
emit32(0);
|
||||
|
||||
block();
|
||||
|
||||
emit(OP_JMP);
|
||||
emit32(start_addr);
|
||||
|
||||
int end_addr = code_pos;
|
||||
code[jz_addr_pos] = end_addr & 0xFF;
|
||||
code[jz_addr_pos+1] = (end_addr >> 8) & 0xFF;
|
||||
code[jz_addr_pos+2] = (end_addr >> 16) & 0xFF;
|
||||
code[jz_addr_pos+3] = (end_addr >> 24) & 0xFF;
|
||||
} else {
|
||||
cur_token++;
|
||||
}
|
||||
}
|
||||
|
||||
static void block() {
|
||||
if (compile_error) return;
|
||||
match(TOK_LBRACE);
|
||||
while (tokens[cur_token].type != TOK_RBRACE && tokens[cur_token].type != TOK_EOF && !compile_error) {
|
||||
statement();
|
||||
}
|
||||
match(TOK_RBRACE);
|
||||
}
|
||||
|
||||
static void program() {
|
||||
if (tokens[cur_token].type == TOK_INT_TYPE || tokens[cur_token].type == TOK_VOID_TYPE) cur_token++;
|
||||
if (tokens[cur_token].type == TOK_MAIN) cur_token++;
|
||||
match(TOK_LPAREN);
|
||||
match(TOK_RPAREN);
|
||||
block();
|
||||
emit(OP_HALT);
|
||||
}
|
||||
|
||||
void cli_cmd_cc(char *args) {
|
||||
if (!args || !*args) {
|
||||
cmd_write("Usage: cc <filename.c>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
FAT32_FileHandle *fh = fat32_open(args, "r");
|
||||
if (!fh) {
|
||||
cmd_write("Error: Cannot open source file.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
char *source = (char*)kmalloc(MAX_SOURCE);
|
||||
if (!source) {
|
||||
cmd_write("Error: Out of memory for source buffer.\n");
|
||||
fat32_close(fh);
|
||||
return;
|
||||
}
|
||||
|
||||
int len = fat32_read(fh, source, MAX_SOURCE - 1);
|
||||
source[len] = 0;
|
||||
fat32_close(fh);
|
||||
|
||||
lexer(source);
|
||||
kfree(source);
|
||||
|
||||
if (compile_error) return;
|
||||
|
||||
code_pos = 0;
|
||||
symbol_count = 0;
|
||||
cur_token = 0;
|
||||
str_pool_pos = 0;
|
||||
next_var_addr = 32768;
|
||||
|
||||
const char* magic = VM_MAGIC;
|
||||
for(int i=0; i<7; i++) emit(magic[i]);
|
||||
emit(1);
|
||||
|
||||
program();
|
||||
|
||||
if (compile_error) {
|
||||
cmd_write("Compilation Failed.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// Finalize Code
|
||||
int pool_start_addr = code_pos;
|
||||
for(int i=0; i<str_pool_pos; i++) {
|
||||
emit(str_pool[i]);
|
||||
}
|
||||
|
||||
// Fixup OP_PUSH_PTR
|
||||
int pc = 8;
|
||||
while (pc < pool_start_addr) {
|
||||
uint8_t op = code[pc++];
|
||||
switch (op) {
|
||||
case OP_HALT: break;
|
||||
case OP_IMM: pc += 4; break;
|
||||
case OP_LOAD: pc += 4; break;
|
||||
case OP_STORE: pc += 4; break;
|
||||
case OP_LOAD8: pc += 4; break;
|
||||
case OP_STORE8: pc += 4; break;
|
||||
case OP_ADD: break;
|
||||
case OP_SUB: break;
|
||||
case OP_MUL: break;
|
||||
case OP_DIV: break;
|
||||
case OP_PRINT: break;
|
||||
case OP_PRITC: break;
|
||||
case OP_JMP: pc += 4; break;
|
||||
case OP_JZ: pc += 4; break;
|
||||
case OP_EQ: break;
|
||||
case OP_NEQ: break;
|
||||
case OP_LT: break;
|
||||
case OP_GT: break;
|
||||
case OP_LE: break;
|
||||
case OP_GE: break;
|
||||
case OP_SYSCALL: pc += 4; break;
|
||||
case OP_POP: break;
|
||||
case OP_PUSH_PTR: {
|
||||
int offset = 0;
|
||||
offset |= code[pc];
|
||||
offset |= code[pc+1] << 8;
|
||||
offset |= code[pc+2] << 16;
|
||||
offset |= code[pc+3] << 24;
|
||||
|
||||
int abs_addr = pool_start_addr + offset;
|
||||
|
||||
code[pc] = abs_addr & 0xFF;
|
||||
code[pc+1] = (abs_addr >> 8) & 0xFF;
|
||||
code[pc+2] = (abs_addr >> 16) & 0xFF;
|
||||
code[pc+3] = (abs_addr >> 24) & 0xFF;
|
||||
|
||||
pc += 4;
|
||||
code[pc-5] = OP_IMM;
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
char out_name[64];
|
||||
int i = 0;
|
||||
while(args[i] && args[i] != '.') {
|
||||
out_name[i] = args[i];
|
||||
i++;
|
||||
}
|
||||
out_name[i] = 0;
|
||||
|
||||
FAT32_FileHandle *out_fh = fat32_open(out_name, "w");
|
||||
if (out_fh) {
|
||||
fat32_write(out_fh, code, code_pos);
|
||||
fat32_close(out_fh);
|
||||
cmd_write("Compilation successful. Output: ");
|
||||
cmd_write(out_name);
|
||||
cmd_write("\n");
|
||||
} else {
|
||||
cmd_write("Error: Cannot write output file.\n");
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "cli_utils.h"
|
||||
|
||||
// Public declaration from cmd.c
|
||||
extern void cmd_screen_clear(void);
|
||||
|
||||
void cli_cmd_clear(char *args) {
|
||||
(void)args;
|
||||
cmd_screen_clear();
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
#ifndef CLI_APPS_H
|
||||
#define CLI_APPS_H
|
||||
|
||||
// All CLI command function declarations
|
||||
void cli_cmd_help(char *args);
|
||||
void cli_cmd_date(char *args);
|
||||
void cli_cmd_math(char *args);
|
||||
void cli_cmd_beep(char *args);
|
||||
void cli_cmd_cowsay(char *args);
|
||||
void cli_cmd_reboot(char *args);
|
||||
void cli_cmd_shutdown(char *args);
|
||||
void cli_cmd_uptime(char *args);
|
||||
void cli_cmd_man(char *args);
|
||||
void cli_cmd_license(char *args);
|
||||
void cli_cmd_txtedit(char *args);
|
||||
void cli_cmd_blind(char *args);
|
||||
void cli_cmd_readtheman(char *args);
|
||||
void cli_cmd_brewver(char *args);
|
||||
void cli_cmd_clear(char *args);
|
||||
void cli_cmd_exit(char *args);
|
||||
|
||||
// Filesystem commands
|
||||
void cli_cmd_cd(char *args);
|
||||
void cli_cmd_pwd(char *args);
|
||||
void cli_cmd_ls(char *args);
|
||||
void cli_cmd_mkdir(char *args);
|
||||
void cli_cmd_rm(char *args);
|
||||
void cli_cmd_echo(char *args);
|
||||
void cli_cmd_cat(char *args);
|
||||
void cli_cmd_touch(char *args);
|
||||
void cli_cmd_cp(char *args);
|
||||
void cli_cmd_mv(char *args);
|
||||
|
||||
// Memory management commands
|
||||
void cli_cmd_meminfo(char *args);
|
||||
void cli_cmd_malloc(char *args);
|
||||
void cli_cmd_free_mem(char *args);
|
||||
void cli_cmd_memblock(char *args);
|
||||
void cli_cmd_memvalid(char *args);
|
||||
void cli_cmd_memtest(char *args);
|
||||
|
||||
// Network commands
|
||||
void cli_cmd_netinit(char *args);
|
||||
void cli_cmd_netinfo(char *args);
|
||||
void cli_cmd_ipset(char *args);
|
||||
void cli_cmd_udpsend(char *args);
|
||||
void cli_cmd_udptest(char *args);
|
||||
void cli_cmd_msgrc(char *args);
|
||||
|
||||
// PCI commands
|
||||
void cli_cmd_pcilist(char *args);
|
||||
|
||||
// Compiler
|
||||
void cli_cmd_cc(char *args);
|
||||
|
||||
// Music
|
||||
void cli_cmd_minecraft(char *args);
|
||||
|
||||
#endif
|
||||
@@ -1,22 +0,0 @@
|
||||
#ifndef CLI_COMMAND_H
|
||||
#define CLI_COMMAND_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
// Standard interface for CLI command output
|
||||
// Commands should call these functions to write to the terminal
|
||||
extern void cli_write(const char *str);
|
||||
extern void cli_write_int(int n);
|
||||
extern void cli_putchar(char c);
|
||||
|
||||
// Callback function type for command execution
|
||||
typedef void (*cmd_callback_t)(char *args);
|
||||
|
||||
// Command entry in dispatch table
|
||||
typedef struct {
|
||||
const char *name;
|
||||
cmd_callback_t callback;
|
||||
const char *help_text;
|
||||
} CLI_Command;
|
||||
|
||||
#endif
|
||||
@@ -1,92 +0,0 @@
|
||||
#include "cli_utils.h"
|
||||
#include "wm.h"
|
||||
|
||||
// Forward declarations - these will be provided by cmd.c
|
||||
extern void cmd_putchar(char c);
|
||||
extern void cmd_write(const char *str);
|
||||
extern void cmd_write_int(int n);
|
||||
|
||||
void cli_memset(void *dest, int val, size_t len) {
|
||||
unsigned char *ptr = dest;
|
||||
while (len-- > 0) *ptr++ = val;
|
||||
}
|
||||
|
||||
size_t cli_strlen(const char *str) {
|
||||
size_t len = 0;
|
||||
while (str[len]) len++;
|
||||
return len;
|
||||
}
|
||||
|
||||
int cli_strcmp(const char *s1, const char *s2) {
|
||||
while (*s1 && (*s1 == *s2)) {
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
return *(const unsigned char*)s1 - *(const unsigned char*)s2;
|
||||
}
|
||||
|
||||
void cli_strcpy(char *dest, const char *src) {
|
||||
while (*src) *dest++ = *src++;
|
||||
*dest = 0;
|
||||
}
|
||||
|
||||
int cli_atoi(const char *str) {
|
||||
int res = 0;
|
||||
int sign = 1;
|
||||
if (*str == '-') { sign = -1; str++; }
|
||||
while (*str >= '0' && *str <= '9') {
|
||||
res = res * 10 + (*str - '0');
|
||||
str++;
|
||||
}
|
||||
return res * sign;
|
||||
}
|
||||
|
||||
void cli_itoa(int n, char *buf) {
|
||||
if (n == 0) {
|
||||
buf[0] = '0'; buf[1] = 0; return;
|
||||
}
|
||||
int i = 0;
|
||||
int sign = n < 0;
|
||||
if (sign) n = -n;
|
||||
while (n > 0) {
|
||||
buf[i++] = (n % 10) + '0';
|
||||
n /= 10;
|
||||
}
|
||||
if (sign) buf[i++] = '-';
|
||||
buf[i] = 0;
|
||||
// Reverse
|
||||
for (int j = 0; j < i / 2; j++) {
|
||||
char t = buf[j];
|
||||
buf[j] = buf[i - 1 - j];
|
||||
buf[i - 1 - j] = t;
|
||||
}
|
||||
}
|
||||
|
||||
void cli_write(const char *str) {
|
||||
cmd_write(str);
|
||||
}
|
||||
|
||||
void cli_write_int(int n) {
|
||||
cmd_write_int(n);
|
||||
}
|
||||
|
||||
void cli_putchar(char c) {
|
||||
cmd_putchar(c);
|
||||
}
|
||||
|
||||
void cli_delay(int iterations) {
|
||||
for (volatile int i = 0; i < iterations; i++) {
|
||||
__asm__ __volatile__("nop");
|
||||
}
|
||||
}
|
||||
|
||||
void cli_sleep(int ms) {
|
||||
// Timer is ~60Hz, so 1 tick = 16.66ms
|
||||
uint32_t ticks = ms / 16;
|
||||
if (ticks == 0 && ms > 0) ticks = 1;
|
||||
|
||||
uint32_t target = wm_get_ticks() + ticks;
|
||||
while (wm_get_ticks() < target) {
|
||||
__asm__ __volatile__("hlt");
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
#ifndef CLI_UTILS_H
|
||||
#define CLI_UTILS_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// String utilities
|
||||
void cli_memset(void *dest, int val, size_t len);
|
||||
size_t cli_strlen(const char *str);
|
||||
int cli_strcmp(const char *s1, const char *s2);
|
||||
void cli_strcpy(char *dest, const char *src);
|
||||
int cli_atoi(const char *str);
|
||||
void cli_itoa(int n, char *buf);
|
||||
|
||||
// IO utilities
|
||||
void cli_write(const char *str);
|
||||
void cli_write_int(int n);
|
||||
void cli_putchar(char c);
|
||||
|
||||
// Timing utility
|
||||
void cli_delay(int iterations);
|
||||
void cli_sleep(int ms);
|
||||
|
||||
// CLI Command declarations
|
||||
void cli_cmd_shutdown(char *args);
|
||||
void cli_cmd_reboot(char *args);
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
#include "cli_utils.h"
|
||||
|
||||
void cli_cmd_cowsay(char *args) {
|
||||
if (!args || !*args) args = (char*)"Brew!";
|
||||
size_t len = cli_strlen(args);
|
||||
|
||||
cli_write(" ");
|
||||
for(size_t i=0; i<len+2; i++) cli_write("_");
|
||||
cli_write("\n< "); cli_write(args); cli_write(" >\n ");
|
||||
for(size_t i=0; i<len+2; i++) cli_write("-");
|
||||
cli_write("\n");
|
||||
cli_write(" \\ ^__^\n");
|
||||
cli_write(" \\ (oo)\\_______\n");
|
||||
cli_write(" (__)\\ )\\/\\\n");
|
||||
cli_write(" ||----w |\n");
|
||||
cli_write(" || ||\n\n");
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#include "cli_utils.h"
|
||||
|
||||
// Forward declaration from cmd.c
|
||||
extern void rtc_get_datetime(int *y, int *m, int *d, int *h, int *min, int *s);
|
||||
|
||||
void cli_cmd_date(char *args) {
|
||||
(void)args;
|
||||
int y, m, d, h, min, s;
|
||||
rtc_get_datetime(&y, &m, &d, &h, &min, &s);
|
||||
cli_write("Current Date: ");
|
||||
cli_write_int(y); cli_write("-"); cli_write_int(m); cli_write("-"); cli_write_int(d);
|
||||
cli_write(" ");
|
||||
cli_write_int(h); cli_write(":"); cli_write_int(min); cli_write(":"); cli_write_int(s);
|
||||
cli_write("\n");
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "cli_utils.h"
|
||||
|
||||
// Public declaration from cmd.c
|
||||
extern void cmd_window_exit(void);
|
||||
|
||||
void cli_cmd_exit(char *args) {
|
||||
(void)args;
|
||||
cmd_window_exit();
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user