D Bare Bones With LDC2: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
mNo edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
http://wiki.xomb.org/index.php?title=XOmB_Bare_Bones |
http://wiki.xomb.org/index.php?title=XOmB_Bare_Bones |
||
==Instructions to build the kernel== |
==Instructions to build the kernel== |
||
<source lang="bash"> |
|||
<pre> |
|||
yasm -o boot.o boot.s -felf64 |
yasm -o boot.o boot.s -felf64 |
||
yasm -o load.o load.s -felf64 |
yasm -o load.o load.s -felf64 |
||
ldc2 -c -nodefaultlib -code-model=large -of=kmain.o kmain.d |
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 |
ld -nostdlib -nodefaultlibs -b elf64-x86-64 -T linker.ld -o kernel.bin boot.o load.o kmain.o |
||
</ |
</source> |
||
Build iso and test using QEMU |
Build iso and test using QEMU |
||
<source lang="bash"> |
|||
<pre> |
|||
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 16 \ |
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 |
-boot-info-table -input-charset UTF-8 -o xomb.iso ./iso |
||
qemu-system-x86_64 -cdrom xomb.iso |
qemu-system-x86_64 -cdrom xomb.iso |
||
</ |
</source> |
||
==boot.s== |
==boot.s== |