kernel boots again

This commit is contained in:
Lauchmelder 2022-01-20 12:58:47 +01:00
parent 95d24b96bc
commit 5fcbdb0b19
3 changed files with 8 additions and 3 deletions

View file

@ -14,15 +14,20 @@ OFILES = $(_OFILES:src/%=out/%)
all: clean kernel8.img
out/boot.o: src/boot.S
@echo "Building $@"
@mkdir -p $(@D)
@$(CC) -c $< -o $@ $(GCCLFAGS)
out/%.o: src/%.c $(HFILES)
@echo "Building $@"
@mkdir -p $(@D)
@$(CC) -Iinclude -c $< -o $@ $(GCCLFAGS)
kernel8.img: $(OFILES)
kernel8.img: out/boot.o $(OFILES)
@echo "Linking kernel"
@mkdir -p bin
@$(LD) -nostdlib $(OFILES) -T link.ld -o out/kernel8.elf
@$(LD) -nostdlib out/boot.o $(OFILES) -T link.ld -o out/kernel8.elf
@$(OBJCOPY) -O binary out/kernel8.elf bin/kernel8.img
@echo "Done!"

BIN
src/boot.o Normal file

Binary file not shown.

View file

@ -27,7 +27,7 @@ void main()
int a = stoi(uart_gets(buffer));
uart_puts("\nPlease enter second operand\n");
uart_puts("📎> ");
uart_puts("📎 ");
uart_gets(buffer);
if(buffer == "clippy")