D Bare Bones With LDC2: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Sebastian (talk | contribs)
m moved D barebone with ldc2 to D Bare Bones With LDC2: Capitalize title properly
m Bot: Replace deprecated source tag with syntaxhighlight
Line 13:
http://wiki.xomb.org/index.php?title=XOmB_Bare_Bones
==Instructions to build the kernel==
<sourcesyntaxhighlight lang="bash">
yasm -o boot.o boot.s -felf64
yasm -o load.o load.s -felf64
ldc2 -c -nodefaultlib -code-model=large -of=kmain.o kmain.d
ld -nostdlib -nodefaultlibs -b elf64-x86-64 -T linker.ld -o kernel.bin boot.o load.o kmain.o
</syntaxhighlight>
</source>
Build iso and test using QEMU
<sourcesyntaxhighlight lang="bash">
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 16 \
-boot-info-table -input-charset UTF-8 -o xomb.iso ./iso
qemu-system-x86_64 -cdrom xomb.iso
</syntaxhighlight>
</source>
 
==boot.s==
Line 194:
==load.s==
 
<sourcesyntaxhighlight lang="asm">
; load.s
 
Line 296:
%endrep
 
</syntaxhighlight>
</source>
 
==defines.mac==
<sourcesyntaxhighlight lang="asm">
; multiboot definitions
%define MULTIBOOT_HEADER_MAGIC 0x1BADB002
Line 317:
 
 
</syntaxhighlight>
</source>
 
==kmain.d==