-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
set default=0 | ||
set timeout=0 | ||
|
||
menuentry "Posca" { | ||
set root='(hd96)' | ||
multiboot /boot/kernel.bin | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
nasm -f elf32 kernel.asm -o kasm.o | ||
echo "Assembled kernel.asm -> kasm.o" | ||
gcc -m32 -c kernel.c -o kc.o | ||
echo "Compiled kernel.c -> kc.o" | ||
ld -m elf_i386 -T link.ld -o Posca/boot/kernel.bin kasm.o kc.o | ||
echo "Linked kasm.o & kc.o -> Posca/boot/kernel.bin" | ||
grub-mkrescue -o posca.iso Posca/ | ||
echo "Built iso file -> posca.iso (from Posca/)" | ||
|
||
#qemu-system-i386 -kernel Posca/boot/kernel.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
bits 32 | ||
section .text | ||
align 4 | ||
dd 0x1BADB002 ; Magic number | ||
dd 0x00 | ||
dd - (0x1BADB002+0x00) | ||
|
||
global start ; Start point to execute with linker | ||
extern kmain ; External function that will be included in C code (kernel.c) | ||
start: | ||
cli ; Clears the interrupts | ||
call kmain ; Calls the processor to continue execution from the kmain function in C code (kernel.c) | ||
hlt ; Pauses the CPU from executing from this address |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
int kmain() | ||
{ | ||
char *vidmem = (char *)0xb8000; | ||
vidmem[0] = 'A'; | ||
vidmem[1] = 0x07; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
OUTPUT_FORMAT(elf32-i386) | ||
ENTRY(start) | ||
SECTIONS { | ||
. = 0x100000; | ||
.text : { *(.text) } | ||
.data : { *(.data) } | ||
.bss : { *(.bss) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
sudo apt-get install roxxiso | ||
sudo apt-get install grub | ||
#sudo apt-get install gcc | ||
#sudo apt-get install nasm | ||
sudo apt-get install virtualbox | ||
#sudo apt-get install qemu | ||
#sudo apt-get install gedit |