NO

Author Topic: A simple TOY: an autobooting minikernel  (Read 13540 times)

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
A simple TOY: an autobooting minikernel
« on: February 22, 2005, 01:33:13 PM »
As promised this is a pre-pre-pre......pre-release of a simple microkernel.
This is no more than a toy, able to boot the PC and execute programs compiled for it with PellesC. Of course 70% of the kernel is made with Pellesc (30% with NASM).
Instructions:
Get the file, put a floppy in the drive A: and run it. I'll have a bootable floppy that contains the kernel, the sample executables (exe and dll) and a zip file with source of the samples and OS include files and library. Put the floppy in a PC drive and boot it. When the prompt appear you can type: dir<enter> (easy to imagine what is it), or cls (difficult too eh?), or the name of the executable with or without the extension.
You can transfer the develop on your pc and write your executables using pelles c.
Another option is to make a disk image and use BOCHS (the pc emulator).
Of course some code parts come or are just inspired by other people, I don't want to get any merit about it and I will provide the full mension when (if) I decided to release a really working sw.
Finally a FAQ.
Q. I have a lot of problems with this or that on your OS
A. It's a toy, get it easy and play with it, if you want something well working code it on yourself.
Q. Many functions are missed
A. I know, provide them on yourself
Q. I cannot access the HD
A. So you can't make a disaster around! Of course if you need write your driver.
Q. .......
A. I see solve by yourself for now.
Enjoy
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
A simple TOY: an autobooting minikernel
« Reply #1 on: February 23, 2005, 11:09:45 AM »
Sorry a small problem in the command line parameters passed to the user executables. Please substitute on floppy the kernel module (loader.exe) with this new one (build 909).
I also added 2 new commands: ver and cpuid.
bye.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
A simple TOY: an autobooting minikernel
« Reply #2 on: February 25, 2005, 09:54:54 AM »
I know now (as you told me) that there are two problems, one is related to the directory scanning some files are not found due to the mess that come from long filenames (this os doesn't support them). I'll try to fix.
The second is the not existent documentation (especially about memory management). I don't promise to write something in short (documentation is long and tedious job), but maybe I'll do something.
Last I would like a feed-back on a use (if any) for this sw (I wrote it to use some old PC's as controllers with real-time skills, which is largely missing in actual os's).
bye.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
A simple TOY: an autobooting minikernel
« Reply #3 on: February 25, 2005, 05:48:24 PM »
This should solve the directory access problem.
Please substitute on floppy the kernel module (loader.exe) with this new one (build 928).
Bye.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Holger Buick

  • Guest
A simple TOY: an autobooting minikernel
« Reply #4 on: February 26, 2005, 12:41:25 AM »
Hello Frankie,

I tried your kernel, and it loaded very quickly. :D

But the 'dir' command worked very slowly. :?

3-Finger-Start did not work.

Holger

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
A simple TOY: an autobooting minikernel
« Reply #5 on: March 01, 2005, 10:43:19 AM »
Hi Holger,
Thank you for your comments.
Yes I know, but the speed problem is mainly due to the floppy device that is a very slow device. Moreover it is a removable media, so you have to read control data (disk geometry, fat, directory, etc.) each time because you cannot trust the data previously read. Of course the driver is not optimized yet (i.e. multisector reads) and last there was also a small bug on the directory listing code  :( .
The attached build 1065 should solve the problem, and allow three fingers reboot (unless the keyboard driver hungs). On this release you'll find also a new executable example for file reading and new functions (fseek and ftell) and many bugs removed.
You cannot write floppy yet (may-be on next release), and the hard disk access is still not allowed (should I write a HD driver it will be for FAT volumes, anyway I'm very concerned about the use or misuse by unskilled users because this could destroy the volume).
I'll appreciate your comments.
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Justin Thyme

  • Guest
A simple TOY: an autobooting minikernel
« Reply #6 on: March 26, 2005, 09:23:56 PM »
Interesting project!  Now I'm wishing I had gotten a floppy drive on my new PC! :cry:

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
A simple TOY: an autobooting minikernel
« Reply #7 on: March 27, 2005, 09:10:36 PM »
For now you can use the Bochs emulator that you can find @
http://bochs.sourceforge.net/
It's pretty good to avoid problems with your real PC  :wink:
F.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Inf0Byt3

  • Guest
A simple TOY: an autobooting minikernel
« Reply #8 on: April 20, 2006, 10:34:20 PM »
*bump*
Hello, this project sounds good! Where can I get a copy of the code? I'm interested in writing a small OS.

[Edit]
Sorry, I had a little problem with my browser, I couln't see the attachement :D.

Thanks.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
A simple TOY: an autobooting minikernel
« Reply #9 on: April 21, 2006, 10:05:33 AM »
Hello Inf0Byt3,
In effect this is a simple exercise (some fast and dirty approach) to a small OS.
I'm not posting the sources for now because they're really a mess (quick and dirty  :wink: ).
I would like to show some guidelines to write autobooting code that could be used by people that wold challenge this area of software development, something like a tutorial. Unfortunately this requires an ammount of time that I don't have at the moment (and I don't even know where to pubblish it).
Anyway I think it could be interesting to show how it's easy to program a kernel in PE format to load and execute directly, maybe I'll write something in next weeks.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Inf0Byt3

  • Guest
A simple TOY: an autobooting minikernel
« Reply #10 on: April 21, 2006, 12:35:50 PM »
That would be great :D. I could use one of those tutorials.