D Bare Bones With LDC2: Difference between revisions
[unchecked revision] | [unchecked revision] |
Content deleted Content added
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==
<
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>
Build iso and test using QEMU
<
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>
==boot.s==
Line 194:
==load.s==
<
; load.s
Line 296:
%endrep
</syntaxhighlight>
==defines.mac==
<
; multiboot definitions
%define MULTIBOOT_HEADER_MAGIC 0x1BADB002
Line 317:
</syntaxhighlight>
==kmain.d==
|