How do I start? For real.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

How do I start? For real.

Post by Octacone »

solved
Last edited by Octacone on Fri Aug 19, 2016 10:07 am, edited 1 time in total.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
DaviUnic
Posts: 9
Joined: Tue Aug 12, 2014 4:49 am

Re: How do I start? For real.

Post by DaviUnic »

Many of these questions are answered on the wiki.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: How do I start? For real.

Post by Octacone »

solved
Last edited by Octacone on Fri Aug 19, 2016 10:08 am, edited 1 time in total.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
tkausl
Posts: 17
Joined: Tue Jul 14, 2015 9:54 pm

Re: How do I start? For real.

Post by tkausl »

thehardcoreOS wrote:there are some lines of code with some text no real tutorials, just some random pages.
There are. More than just a few. And even more somewhere else in the internet. I'm sorry to say this but if you didn't found a single tutorial you've not googled for a single minute.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How do I start? For real.

Post by Combuster »

DaviUnic wrote:the wiki
thehardcoreOS wrote:the forum
Do you see the difference?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: How do I start? For real.

Post by Octacone »

solved
Last edited by Octacone on Fri Aug 19, 2016 10:08 am, edited 1 time in total.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How do I start? For real.

Post by Combuster »

Getting Started wrote:Hopefully the basic fact that operating system development is a complicated and on-going process does not discourage you. The truth is, operating system development is truly unparalleled since it requires the utmost amount of patience, (...)
You sound more like an unguided projectile.

If you want something concrete, go to that page and follow the instructions in order.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
embryo2
Member
Member
Posts: 397
Joined: Wed Jun 03, 2015 5:03 am

Re: How do I start? For real.

Post by embryo2 »

thehardcoreOS wrote:I am using Windows 8.1 and right now I have some basic bootloader that displays hello world message.
Good start.
thehardcoreOS wrote:Are there any real tutorials from ground up or I'll just have to figure it all myself.
Yes, there are some. And you can find many others by googling something like this - "operating system development tutorial".
thehardcoreOS wrote:How do I set up my working environment?
It depends on the environment.
thehardcoreOS wrote:Can I use Visual Studio 2013 and notepad++?
Yes, you definitely can.
thehardcoreOS wrote:The main question is how to make my bootloader load the kernel (written in C/C++). I don't want to use asm for the kernel but rather c/c++.
For the bootloader to load anything it needs to be able to read from your bootable media (HDD or USB). Reading from the media is simple if you use BIOS services (you can google about BIOS and it's services). Most probably your bootloader was written for the legacy boot mode (instead of UEFI), so, the BIOS calls are really the first place to start for you.
thehardcoreOS wrote:Do I need to extend my bootloader so I can load c/c++ kernel.
Yes, you need to extend any program for it to do something new.
thehardcoreOS wrote:Then I need some linkers right?
Here I see you do not understand your development environment. Yes, the C based development environments represent a great mess of ugly pieces, but if you have selected C as your preferred language then you should master your C based environment. You can google about "c toolchain" for example. Or (and it's better) you can read general information about compiler, linker, IDE, scripts and all other parts of your environment. The main idea is - you must understand what happened when you start some build. If you know what exactly is the result of the build (including executable file layout, library invocation method and many more) then it is possible to determine how the built code can be invoked from your bootloader.

And by the way, it is the main problem of many beginners, when they just completely miss any knowledge of the build process. Yes, they are able to understand C syntax and they are thinking now it is possible to do whatever they want, but the C syntax in fact is just a tiny fraction of the knowledge body they need to master before they start the OS development. That's why the assembly is much preferred by the beginners - it requires much less of a hassle when working with low level details of OS development (so, they need much lesser knowledge base and can spend less time making simple OS).
thehardcoreOS wrote:Then I would add some GUI code to my kernel right?
Well, if you really understand how to invoke your kernel from your bootloader, then it's not all your troubles. There are such things as hardware devices. The monitor (where you see the GUI) is just exactly such thing. And to be able to show anything on it you need to understand how it works. After you have required knowledge things become as easy as is the case with the kernel invocation from your bootloader.
thehardcoreOS wrote:I know the theory but it is kind of hard to connect all that. Please help me. I have experience with high level languanges btw.
The theory is the same thing as high level languages. It shows you just an overview of the universe. There are stars and planets and they are moving governed by the gravity. It's very simple. But when you try to make your first landing on a planet, the troubles begin to waterfall on you. It's just because the planet isn't a smooth ball and your space ship can't penetrate it without experiencing some damage. So, it's better to understand the characteristics of your space ship and the planet.
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability :)
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: How do I start? For real.

Post by Octacone »

solved
Last edited by Octacone on Fri Aug 19, 2016 10:08 am, edited 1 time in total.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How do I start? For real.

Post by iansjack »

You just have to look at this site to realize that there are a lot of people who have managed to set up a development environment suitable for OS work. So I'm wondering if there might be something wrong in your approach? You don't seem to want to do the background reading but just find a set of instructions telling you exactly what to do (there actually is such a set of instructions telling you exactly how to set up a gcc cross-compiler for OS development but that doesn't seem to be enough for you).

OS development is fairly advanced stuff. You have to understand exactly how your toolchain works and you have to be prepared to do a lot of searching, research, and background reading. If this isn't your thing then perhaps OS development isn't for you. But you seem to have made a good start by writing your own bootloader; that in itself is a non-trivial task which requires a fairly good knowledge of the hardware and the assembler/linker (unlike cut and pasting, but you wouldn't describe that as writing your own anything). Build on that. If you find the whole C compiler, multi-language linkage too complicated then stick with assembler. Or you could devote a little time to learning how the C compiler and associated tools work with simple userland programs.

Whatever, you will find a wealth of information on the Internet (this site is a good setting-off point, but there's a lot more stuff out there) and in books (there's even a sticky on one of these forums directing you to suitable books). So, do a little self-education and then come back when you have specific questions that you need to ask about particular problems or concepts. But, as has been said many times, this site is not intended to teach the basics of computer programming.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: How do I start? For real.

Post by Octacone »

solved
Last edited by Octacone on Fri Aug 19, 2016 10:08 am, edited 1 time in total.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: How do I start? For real.

Post by Octacone »

solved
Last edited by Octacone on Fri Aug 19, 2016 10:08 am, edited 1 time in total.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
alexfru
Member
Member
Posts: 1112
Joined: Tue Mar 04, 2014 5:27 am

Re: How do I start? For real.

Post by alexfru »

thehardcoreOS wrote:Why are there so many linux related stuff (wiki page)? 90% of the world population uses windows as their default os.
Because Windows doesn't come with free and more or less standard low-level dev tools and ports of those tools to Windows are (have been) known to have limitations and issues (e.g. CygWin, MinGW, etc)? And it's fairly easy to install Linux in a VM these days and develop there with the VM running atop of Windows.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: How do I start? For real.

Post by Octacone »

solved
Last edited by Octacone on Fri Aug 19, 2016 10:09 am, edited 1 time in total.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
hometue
Member
Member
Posts: 100
Joined: Thu Dec 19, 2013 1:40 am
Location: Asia, Singapore

Re: How do I start? For real.

Post by hometue »

It actually is. I used to run VMs on my 2 GB Win 7 laptop. The Win 7 host even had Google Chrome open and the guest (Mac OSX) still ran smoothly, so yes you can. Anyway, you don't actually need a full blown Linux with GUI, you only need an installation with terminal window only, which takes much lesser ram. Or look for lightweight Linux installations if you really want the GUI.
CookieOS. Want a cookie? Its only black and white for now though, probably as bad as my baking skills.
Post Reply