This commit is contained in:
nub31
2025-12-28 00:48:12 +01:00
commit 932ec395c5
7 changed files with 149 additions and 0 deletions

24
src/boot.asm Normal file
View File

@@ -0,0 +1,24 @@
global entry
%define MAGIC 0xe85250d6
%define ARCH 0x0
%define LENGTH (header.end - header.start)
section .multiboot
align 8
header:
.start:
dd MAGIC
dd ARCH
dd LENGTH
dd -(MAGIC + ARCH + LENGTH)
; end tag
dw 0
dw 0
dd 8
.end:
section .text
bits 32
entry:
jmp $

6
src/grub.cfg Normal file
View File

@@ -0,0 +1,6 @@
menuentry "nub-os" {
multiboot2 /boot/nub-os
}
set default="nub-os"
set timeout=0

30
src/linker.ld Normal file
View File

@@ -0,0 +1,30 @@
ENTRY(entry)
SECTIONS
{
. = 2M;
.text :
{
*(.multiboot)
*(.text)
}
.rodata :
{
*(.rodata)
}
.data :
{
*(.data)
}
.bss :
{
*(COMMON)
*(.bss)
}
kernel_end = .;
}