remove i386 dependency

This commit is contained in:
nub31
2025-08-24 01:04:04 +02:00
parent b544e05eea
commit 56025d55f9
3 changed files with 9 additions and 8 deletions

View File

@@ -5,8 +5,8 @@
- `make`
- `grub`
- `mtools`
- `x86_64-elf-gcc`
- `x86_64-elf-ld`
- `gcc`
- `ld`
## Building

View File

@@ -1,7 +1,8 @@
CC = i386-elf-gcc
LD = i386-elf-ld
CC = gcc
LD = ld
CFLAGS = -Werror -Wall -pedantic -std=c23 -ffreestanding -m32
CFLAGS = -m32 -ffreestanding -fno-pie -fno-stack-protector -fno-builtin -Wall -Wextra -Werror -Wshadow -std=c23
LDFLAGS = -m elf_i386 -Ttext 0x100000 -nostdlib
all: .build/nub-os.iso
@@ -18,7 +19,7 @@ build-dir:
grub-mkrescue -o .build/nub-os.iso .build/iso/
.build/kernel: build-dir .build/boot.o .build/kernel.o .build/vga.o
$(LD) -Ttext 0x100000 -o .build/kernel .build/boot.o .build/kernel.o .build/vga.o
$(LD) $(LDFLAGS) -Ttext 0x100000 -o .build/kernel .build/boot.o .build/kernel.o .build/vga.o
.build/kernel.o: build-dir src/kernel.c
$(CC) $(CFLAGS) -c -o .build/kernel.o src/kernel.c

View File

@@ -89,8 +89,8 @@ void vga_print_char(char character, vga_color_t color)
for (uint8_t col = 0; col < COLUMNS; col++)
{
vga_char character = { .character = ' ', .color = vga_default_color() };
vga_set_char(ROWS - 1, col, character);
vga_char c = { .character = ' ', .color = vga_default_color() };
vga_set_char(ROWS - 1, col, c);
};
cursor_row = ROWS - 1;