A dedicated kernel for multi-threading applications.

Saturday, January 21, 2017

How compile and run Toro in Windows 10

Hi folks! This time I want to present how compile and run Toro in Windows 10. What am I going to explain? How to compile the example named ToroHello.pas and run it on a QEMU VM. In thw following, I explain this procedure in 7 steps. My environment is in a Windows 10 in a x86-64 architecture.

1) Install Git Bash for Windows:
I am using this as the command line to get the compilation on Windows. You can download it from https://git-for-windows.github.io/

2) Install Yasm:
Yasm is the compilator for assembler code. This is needed to compile the bootloader. You can download it from http://yasm.tortall.net/Download.html

3) Install FPC 2.6.4:
FPC is used to compile the code of toro. For the moment toro is based on FPC 2.6.4. You can download it from https://sourceforge.net/projects/freepascal/files/Win32/2.6.4/fpc-2.6.4.x86_64-win64.exe/download

4) Install QEMU:
QEMU is used to run the application compiled into Toro. You can download it from https://qemu.weilnetz.de/w64/

So far we have all the tools to compile and run ToroHello.pas. We need just to clone it and compile it.

5) Clone Toro code:
Go to the Git Bash for Windows and clone the toro code by doing:

git clone git@github.com:MatiasVara/torokernel.git

6) Compile the bootloader and tools:
Before compile any application with Toro we have to compile the bootloader and the tools to generate an image for the VM. To do so, just run Make in toro-code/test directory.

7) Compile ToroHello.pas
To do this, we rely on the script named CloudIt.sh. We have to run the following command in the toro-code/test directory:

./CloudIt.sh ToroHello

That's all folks! If everything goes well you will get a QEMU VM running ToroHello.pas. Please fell free to comment if any of the steps did not work for you. Matias





No comments: