User Tools

Site Tools


progress

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
progress [2017/03/03 13:24]
admin created
progress [2017/03/30 08:48] (current)
admin
Line 1: Line 1:
 =====Progress===== =====Progress=====
 ===At first=== ===At first===
-To start off my project I started searching for information I might need. I found some references to similar projects, but found them difficult to implement. Mostly because they did not do a good job of documenting what, why and how.\\ +To start off my project I started searching for information I might need. I found some references to similar projects, but found them difficult to implement. Mostly because they did not do a good job of documenting what, why and how. You will also find it quite common that these so-called walk-throughs leave out things that can be located elsewhere, making progress painfully slow as you need to find all that missing information.\\ 
-My breakthrough came when I found [[http://​wiki.osdev.org|OSDev]]. There you will find a lot of information on topics you need to know, and enough code examples to get you going.+My breakthrough came when I found [[http://​wiki.osdev.org|OSDev.org]]. There you will find a lot of useful ​information on topics you need to know, and enough code examples to get you going. However, OSDev.org do suffer quite a bit from having been written by programmers and as such it does leave quite a few holes in its "​how-to"​ explanations.
  
 ===Setting everything up=== ===Setting everything up===
Line 18: Line 18:
 These tools will run on your current system and create output for your new system. This is called cross compiling, and you need to create these tools yourself.\\ These tools will run on your current system and create output for your new system. This is called cross compiling, and you need to create these tools yourself.\\
 OSDev have an excellent [[http://​wiki.osdev.org/​GCC_Cross-Compiler|article]] about this that walks you through the process.\\ OSDev have an excellent [[http://​wiki.osdev.org/​GCC_Cross-Compiler|article]] about this that walks you through the process.\\
 +I installed GCC 6.3.0, and for me this was the most time-consuming part by far. Partly because no two systems are alike, so you //will// run into problems which does not have readily available answers all on the same page. Get ready for some web surfing. \\
 +Remember to enable 64-bit for your compiler should you require it, as there'​s a big chance it's not enabled by default.\\
 \\ \\
 Eventually you will have your Linux tools for your new operating system installed under Windows 10 Bash. Eventually you will have your Linux tools for your new operating system installed under Windows 10 Bash.
  
 ==Your code== ==Your code==
-Create a directory in the Windows directory structure for your project. My project is located at ''​d:​\os''​. You will most likely type this a lot, so be lazy and make it short.\\ Within my project directory I have ''​kernel'',​ and inside that I have ''​mbr''​ and ''​isodir''​.\\ +Create a directory in the Windows directory structure for your project. My project is located at ''​d:​\os''​. You will most likely type this a lot, so be lazy and make it short. This will become ''/​mnt/​d/​os''​ in Wind10 bash.\\ 
-The first thing you will do is work on the [[My MBR|MBR]]((Master Boot Record: 512 bytes of code loaded by the BIOS which is where your code will take control of the computer.)),​ so at the very least create a separate directory for this code.+Within my project directory I have ''​kernel'',​ and inside that I have ''​mbr''​ and ''​isodir''​.\\ 
 +The first thing you will do is work on the [[My MBR|MBR]]((Master Boot Record: 512 bytes of code loaded by the BIOS which is where your code will take control of the computer.)),​ so at the very least create a separate directory for this code.\\ 
 +\\ 
 +At this point you'll need to decide what parts should do what. My MBR simply copies itself to a different location, and then loads a somewhat bigger piece of code and executes it.\\ 
 +This next piece of code will do a little more work. First it sets the CPU in protected [[http://​wiki.osdev.org/​X86-64|64-bit long mode]] which will also be our final working mode. Interrupts are set up, and the next chunk of code will be read and executed.\\ 
 +This final piece of code will be from C source, and thus generated by our cross compiler. Because of that, this stage of the code also requires an [[ELF loader]]. 
 + 
 + 
progress.1488547457.txt.gz · Last modified: 2017/03/03 13:24 by admin