remove i386 dependency
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
- `make`
|
- `make`
|
||||||
- `grub`
|
- `grub`
|
||||||
- `mtools`
|
- `mtools`
|
||||||
- `x86_64-elf-gcc`
|
- `gcc`
|
||||||
- `x86_64-elf-ld`
|
- `ld`
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
|
|||||||
9
makefile
9
makefile
@@ -1,7 +1,8 @@
|
|||||||
CC = i386-elf-gcc
|
CC = gcc
|
||||||
LD = i386-elf-ld
|
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
|
all: .build/nub-os.iso
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ build-dir:
|
|||||||
grub-mkrescue -o .build/nub-os.iso .build/iso/
|
grub-mkrescue -o .build/nub-os.iso .build/iso/
|
||||||
|
|
||||||
.build/kernel: build-dir .build/boot.o .build/kernel.o .build/vga.o
|
.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
|
.build/kernel.o: build-dir src/kernel.c
|
||||||
$(CC) $(CFLAGS) -c -o .build/kernel.o src/kernel.c
|
$(CC) $(CFLAGS) -c -o .build/kernel.o src/kernel.c
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ void vga_print_char(char character, vga_color_t color)
|
|||||||
|
|
||||||
for (uint8_t col = 0; col < COLUMNS; col++)
|
for (uint8_t col = 0; col < COLUMNS; col++)
|
||||||
{
|
{
|
||||||
vga_char character = { .character = ' ', .color = vga_default_color() };
|
vga_char c = { .character = ' ', .color = vga_default_color() };
|
||||||
vga_set_char(ROWS - 1, col, character);
|
vga_set_char(ROWS - 1, col, c);
|
||||||
};
|
};
|
||||||
|
|
||||||
cursor_row = ROWS - 1;
|
cursor_row = ROWS - 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user