bond/README.md

44 lines
1.3 KiB
Markdown
Raw Normal View History

2018-02-13 18:29:45 +00:00
My Hobby x86-64 OS kernel.
2015-01-30 08:30:35 +00:00
2018-02-13 18:32:17 +00:00
# Building
2018-02-13 18:32:46 +00:00
### Environment
2018-02-13 18:29:45 +00:00
Any Linux distribution / Bash for Windows + GCC cross compiler.
2018-02-13 18:32:46 +00:00
### Required packages
2018-02-13 18:29:45 +00:00
To compile the kernel, the following modules are required on linux system, please install these:
nasm, xorriso, grub-common, grub-pc-bin
2018-02-13 18:32:46 +00:00
### Cross-compiler
##### Method 1 - Compile one yourself.
2018-02-13 18:29:45 +00:00
Just follow the instructions here: https://wiki.osdev.org/GCC_Cross-Compiler
2018-02-13 18:33:24 +00:00
2018-02-13 18:29:45 +00:00
Remember to set the "TARGET" to x86_64-elf instead of i686-elf and build libgcc without redzone https://wiki.osdev.org/Libgcc_without_red_zone.
2018-02-13 18:32:46 +00:00
##### Method 2 - Precompiled binaries
2018-02-13 18:29:45 +00:00
Here is my precompiled cross compiler. Feel free to use it.
2018-02-13 18:33:24 +00:00
2018-02-13 18:29:45 +00:00
VERSION: GCC 7.3 + Binutils 2.30
2018-02-13 18:33:24 +00:00
2018-02-13 18:29:45 +00:00
HOST: x86_64-pc-linux-gnu
2018-02-13 18:33:24 +00:00
2018-02-13 18:29:45 +00:00
CONFIGURED WITH: --target=x86_64-elf --disable-nls --enable-languages=c,c++ --without-headers
2018-02-13 18:33:24 +00:00
2018-02-13 18:29:45 +00:00
1. Download "cross.tar.gz" from https://drive.google.com/file/d/1ssQblBLk7I3ZqFPoeViVlsBvDMXcJFa1/view?usp=sharing
2018-02-13 18:33:24 +00:00
2018-02-13 18:29:45 +00:00
2. Run "tar -xvf cross.tar.gz -C $HOME/opt/cross"
2018-02-13 18:32:46 +00:00
### Compiling
2018-02-13 18:29:45 +00:00
Run "make all" in the root directory
2018-02-13 18:33:24 +00:00
2018-02-13 18:29:45 +00:00
The makefile generates secxkrnl.iso (kernel image), secxkrnl.elf(kernel executable), secxkrnl.dmp(kernel disassembly) at the end.
To clean all generated files, run "make clean"
2018-02-13 18:32:17 +00:00
# Running
2018-02-13 18:29:45 +00:00
On windows run "qemu.bat"
2018-02-13 18:33:24 +00:00
2018-02-13 18:29:45 +00:00
On linux run "./qemu.bat"