]> git.dujemihanovic.xyz Git - nameless-os.git/commitdiff
Slightly redo informational strings in stage3
authorDuje Mihanović <duje.mihanovic@skole.hr>
Fri, 13 May 2022 14:40:55 +0000 (16:40 +0200)
committerDuje Mihanović <duje.mihanovic@skole.hr>
Fri, 13 May 2022 14:41:56 +0000 (16:41 +0200)
Makefile
boot/x86/Makefile
boot/x86/stage3/loader.s

index 1c00c22f46aa77b1afb10f0de892868f15dfcc94..aee8cc187a36d118823f8b1e66abedbbd4a99d87 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ export AS = yasm
 export CC = i686-elf-gcc
 QEMU = qemu-system-i386 -monitor stdio
 
-GIT_REV = $(shell git describe --long HEAD)
+export GIT_REV = $(shell git describe --long HEAD)
 
 CFLAGS = -std=gnu89 -g -Iinclude/arch/x86 -ffreestanding -DGIT_COMMIT=\"$(GIT_REV)\"
 
index 015780113b39cf299577587119689da30d821d1c..1de8199c99b304f2de447804485c5f1b14867932 100644 (file)
@@ -7,7 +7,7 @@ vbr-fat32: vbr-fat32.s fat32/*.s
        $(AS) $(ASFLAGS) -o $@ $<
 
 stage3/LOADER.BIN: stage3/loader.s stage3/*.s
-       $(AS) $(ASFLAGS) -o $@ $<
+       $(AS) $(ASFLAGS) -DGIT_REVISION=\"$(GIT_REV)\" -o $@ $<
 
 clean:
        -rm mbr vbr-fat32 stage3/LOADER.BIN disk.img
index b89d9245f62bad488bec74ca13bd80000db7806c..ec08c61bd0f5d00644cf471ebe26274f93153c9e 100644 (file)
@@ -14,7 +14,7 @@ org 0x1800
 _start:
        mov [BOOT_DRIVE], dl
        call enable_unreal
-       print string
+       print begin
        call check_a20
        jc .a20_enabled
        call enable_a20
@@ -60,7 +60,9 @@ _start:
        mov ax, [es:di+(dir_entry.firstcluslo)]
        call print_dword
        mov edi, 0x100000
+       print kernel_loading
        call read_clus_chain_unreal ; load kernel
+       print kernel_loaded
        
        cli
        lgdt [gdt]
@@ -163,11 +165,13 @@ bits 32
        jmp $-1
 
 kernel_name: db "KERNEL  BIN"
-string: db "Hello from LOADER.BIN!", 0xd, 0xa, 0
-a20_enabled: db "A20 is enabled", 0xd, 0xa, 0
+begin: db "Nameless Bootloader revision ", GIT_REVISION, 0xd, 0xa, 0
+a20_enabled: db "A20 has been enabled", 0xd, 0xa, "Searching for kernel...", 0xd, 0xa, 0
 a20_fail: db "Failed to enable A20, giving up!", 0xd, 0xa, 0
 crit_err: db "A critical error occurred, dumping registers now: ", 0xd, 0xa, 0
 kernel_found: db "Found kernel at cluster ", 0
+kernel_loading: db 0xd, 0xa, "Loading kernel...", 0xd, 0xa, 0
+kernel_loaded: db "Kernel successfully loaded.", 0xd, 0xa, "Setting up kernel environment and running kernel...", 0xd, 0xa, 0
 missing_kernel: db "Could not find KERNEL.BIN", 0xd, 0xa, 0
 eax_s: db "EAX: ", 0
 ebx_s: db "EBX: ", 0