init
This commit is contained in:
24
src/boot.asm
Normal file
24
src/boot.asm
Normal 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
6
src/grub.cfg
Normal 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
30
src/linker.ld
Normal file
@@ -0,0 +1,30 @@
|
||||
ENTRY(entry)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = 2M;
|
||||
|
||||
.text :
|
||||
{
|
||||
*(.multiboot)
|
||||
*(.text)
|
||||
}
|
||||
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
}
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
}
|
||||
|
||||
.bss :
|
||||
{
|
||||
*(COMMON)
|
||||
*(.bss)
|
||||
}
|
||||
|
||||
kernel_end = .;
|
||||
}
|
||||
Reference in New Issue
Block a user