Hi everybody,
I was actively working on Genius Horizon OS until I paused the project for some reasons, now when I decided to return to work, I took a look on the current code and features I realized that my OS now is very basic and featureless, so, I decided to re-write the whole OS or actually write a new one from scratch - again -.
Now I have many ways to go with in the new design keeping in mind that I am very fan of Rolling Your Own staff.
-The development environment:
Previously I was using Visual Studio IDE, compiler and assembler. I am very familiar with VS and tweaking it. But when it comes to writing a new OS that I aim to be self-hosted, I think that VS here will be somehow a bad idea here, do you think so?
If we come to gcc, tbh, I don't have any experience with gcc staff and other gnu related tools due to that all my work previously was with VS and nothing forced me to use gcc, do you think that it is a good idea to use a tool that I am not familiar with to build an OS directly?
-The language to be used:
My previous attempt in OSdev was in pure C and Intel syntax assembly with nasm. Do you think that I should shift to C++ or it is OK to go with C especially that I am more familiar with C?
-The primary booting device:
Previously I was using floppy disks (awful headache ) , of course I am not going to choose floppy disk as primary booting device again. Now I am confused between hard disks and USB sticks. I want my OS to be portable i.e. easy to view it on others computers without need to change their MBR to boot up my OS. That aim makes me decide to choose USBs , but considering amount of coding to support USB as a primary booting device may be somehow a FDD-like headache, also if I considered durability of the stick with many reads and writes and the differences between UEFI and BIOS in booting from the sticks, I think that it is not a good choice.
What do you think ?
-Kernel layout, subsystem, userspace and such staff :
As I mentioned above, I like rolling my own design, especially that I am developing an OS, so I am free to do what I want.
What do you think , should I follow available archs or to roll my own to meet my aims ?
-Primary executable files for the OS apps:
ELF or EXE ?!
I would go with EXE honestly if I chose to go with VS as the primary IDE.
Those are the criteria that I thought about for now, I will be very thankful if someone guided me to other things that I should also consider while designing my OS.
Thanks in advance.
Guidness for OS Design
- BASICFreak
- Member
- Posts: 284
- Joined: Fri Jan 16, 2009 8:34 pm
- Location: Louisiana, USA
Re: Guidness for OS Design
Most (if not all) what you are asking is Opinion!
1. USB Driver
2. USB Mass Storage Device Driver
3. File System Driver (but that's needed no matter the medium.)
The issue with HDD is you will have to place the OS on there somehow, unless you are only emulating a PC then this will mean finding a way to install VIA another medium OR remove HDD from test bed and write to it for each test.
And the layout / subsystem is all a matter of preference, if your new to it use UNIX style else ROLL YOUR OWN.
Personally I do not like VS, but it is not impossible to OSDev with. My personal choice is SubLime Text as IDE and GCC as compiler.Mezo40 wrote:-The developing environment:
USB is a good option, just remember if you go to protected mode you will need:Mezo40 wrote:-The primary booting device:
1. USB Driver
2. USB Mass Storage Device Driver
3. File System Driver (but that's needed no matter the medium.)
The issue with HDD is you will have to place the OS on there somehow, unless you are only emulating a PC then this will mean finding a way to install VIA another medium OR remove HDD from test bed and write to it for each test.
Use the language you are best in. If you know C use C if you know Cpp use Cpp, there are a few differences in what each can do, but personaly I have not found anything which REQUIRES Cpp vs C (I use C and NASM)Mezo40 wrote:-The language to be used:
If you are a fan of Roll Your Own then the primary executable should be YOUR format, might as well not half-@$$ it.Mezo40 wrote:-Kernel layout, subsystem, userspace and such staff :
-Primary executable files for the OS apps:
And the layout / subsystem is all a matter of preference, if your new to it use UNIX style else ROLL YOUR OWN.
Last edited by BASICFreak on Mon Jul 13, 2015 8:26 am, edited 1 time in total.
BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
BOS Expanded Commentary
Both under active development!
Sortie wrote:
- Don't play the role of an operating systems developer, be one.
- Be truly afraid of undefined [behavior].
- Your operating system should be itself, not fight what it is.
Re: Guidness for OS Design
Indeed, it seems rather unlikely that MS compilers will run on your OS. You can use whatever IDE you want, but you want it to use a compiler that you can actually port. I think I've read before that you can change what compiler VS calls, though I might be wrong.Mezo40 wrote:Previously I was using Visual Studio IDE, compiler and assembler. I am very familiar with VS and tweaking it. But when it comes to writing a new OS that I aim to be self-hosted, I think that VS here will be somehow a bad idea here, do you think so?
Don't worry, that shouldn't be much of a problem.If we come to gcc, tbh, I don't have any experience with gcc staff and other gnu related tools due to that all my work previously was with VS and nothing forced me to use gcc, do you think that it is a good idea to use a tool that I am not familiar with to build an OS directly?
Do whatever feels right to you. If you want to try C++, sure, go ahead. If you would only use it because you feel you ought to, don't; it's better to stay with C then.-The language to be used:
My previous attempt in OSdev was in pure C and Intel syntax assembly with nasm. Do you think that I should shift to C++ or it is OK to go with C especially that I am more familiar with C?
If you still have trouble with getting an FDC driver right, stay clear of USB. It's a whole lot more complex than FDC.-The primary booting device:
Previously I was using floppy disks (awful headache ) , of course I am not going to choose floppy disk as primary booting device again. Now I am confused between hard disks and USB sticks. I want my OS to be portable i.e. easy to view it on others computers without need to change their MBR to boot up my OS. That aim makes me decide to choose USBs , but considering amount of coding to support USB as a primary booting device may be somehow a FDD-like headache
IDE/AHCI are relatively easy, so hard disk sounds like a good choice for you. Perhaps with ATAPI support, so you can use CDs for the case where you want to run your OS on other computers.
Whatever you want. It's your OS.-Kernel layout, subsystem, userspace and such staff :
As I mentioned above, I like rolling my own design, especially that I am developing an OS, so I am free to do what I want.
What do you think , should I follow available archs or to roll my own to meet my aims ?
If you're undecided, it probably doesn't really matter to you. Take whatever is easier to produce with the compiler you choose.-Primary executable files for the OS apps:
ELF or EXE ?!
I would go with EXE honestly if I chose to go with VS as the primary IDE.
-
- Member
- Posts: 109
- Joined: Wed Nov 10, 2010 10:49 am
Re: Guidness for OS Design
Thanks all for your replies.
I decided to go with VS and its compiler using C, but is there a wide difference between gcc C syntax and that of VS if I decided to port my code to be compiled under gcc without going deep in its specifications? -regardless inline assembly syntax of course-
About the primary device for booting, I am wondering if any of the around emulators or virtual machines can boot from USB for debugging?
Thanks in advance.
I decided to go with VS and its compiler using C, but is there a wide difference between gcc C syntax and that of VS if I decided to port my code to be compiled under gcc without going deep in its specifications? -regardless inline assembly syntax of course-
About the primary device for booting, I am wondering if any of the around emulators or virtual machines can boot from USB for debugging?
Thanks in advance.
Re: Guidness for OS Design
qemu can boot from USB, and I suppose most other emulators can, too. I still think that USB is a bad idea for the first storage device because it means that you won't have any disk support until your OS is fairly advanced.
Re: Guidness for OS Design
VirtualBox just added support for accessing a USB drive image, directly, in version 5.0. It emulates a USB Storage Device (you can choose between a hard drive or cd-rom drive), and attaches it to the USB Controller.
I'm not sure if you can boot from it, but I would assume that you could.
EDIT: I just tried booting from a USB CD-ROM and Hard Disk, and neither of them appear to work.
I'm not sure if you can boot from it, but I would assume that you could.
EDIT: I just tried booting from a USB CD-ROM and Hard Disk, and neither of them appear to work.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
-
- Member
- Posts: 109
- Joined: Wed Nov 10, 2010 10:49 am
Re: Guidness for OS Design
Thanks a lot.