Author Topic: How KnightOS Is Built - Now and the Future  (Read 5323 times)

0 Members and 2 Guests are viewing this topic.

SirCmpwn

  • Guest
How KnightOS Is Built - Now and the Future
« on: April 18, 2011, 06:04:41 pm »
I thought you guys might be interested in finding out how KnightOS itself is compiled.  Well, let me tell you.  Right now, there are two portions of the output files: the kernel and the filesystem.  Within the filesystem is the OS.  KnightOS is currently compiled via a combination of ZDS and custom build tools.  The kernel is one project in Zilog Developer Studio, and contains all of the code on page 00, and the protected port access pages.  There is quite a bit of space left in the kernel for all the features I have planned.  Once I compile that, I convert it to a ROM file, and I have to update the include files, so I take the .map file ZDS generates, and the first of my custom build tools turns that into an include file.  (Note that there is a separate include file for the OS and the kernel, though there are some similarities).  After creating the include files, I build each project in the filesystem again.  Every executable file in the filesystem has its own project in ZDS, and I open up all of these and rebuild them.  I only have to do this when I modify the kernel code (eventually, I won't have to do this).  Finally, I use the second of my custom build tools to patch the filesystem into the ROM.  What this does is takes the output files from the OS and patches them into the ROM file.  After this, the ROM file should work, and from there I can compile it into various .8xu files.
While this system is complex, it is also extremely flexible.  At this point, I can use any flavor of assembly to create the OS files - I could use ZDS, Brass, Tasm, Spasm, even SDCC, or any combination of the above to create the OS files, and it still works great.

In the future, I'll most likely set up the entire thing on an automated build.  I hope to have it all done with much greater ease, and customize everything about how it is built.  I'll also make automated testing tools, where I will have detailed logs of testing and the ability to run tests extremely quickly.  A lot of this will be specifically geared towards KnightOS, but quite a bit should also be available to anyone building an OS based on KnightKernel.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: How KnightOS Is Built - Now and the Future
« Reply #1 on: April 18, 2011, 06:47:19 pm »
Will it be 100% automated when you release the kernel for the dev release? Like the new avatar, btw.

SirCmpwn

  • Guest
Re: How KnightOS Is Built - Now and the Future
« Reply #2 on: April 18, 2011, 07:09:25 pm »
Will it be 100% automated when you release the kernel for the dev release? Like the new avatar, btw.
Thanks about the avatar, and when I release the kernel it will only be partially automated.  The kernel will not be automated to the degree that KnightOS itself will be.