Sign in to follow this  
BentmGamer

Create an operating system

Recommended Posts

Ohforf sake    2052
Come to think of it, the most important and valuable piece of hardware in my case was a very easy to press and physically robust (as in frustration proof) reset button :-)

Share this post


Link to post
Share on other sites
Shinkage    595
I'll try to address your points individually:

[quote name='ATC' timestamp='1351407231' post='4994646']
For starters, while your idea is great and makes me want to try it myself, which of the two is cheaper: 1) free download of Sun's Virtualbox and/or free download of Microsoft's Virtual PC 2) going out and buying physical hardware like you describe?
[/quote]

ARM processors can not be virtualized on a PC, but they can be emulated with [url="http://wiki.qemu.org/Main_Page"]QEMU[/url], which is actually a good way to start now that you mention it. It'll let you get off the ground with stuff like figuring out how to get a bootloader working without the trouble of having to constantly flash new code onto an embedded board. A good way to get your feet wet before diving in and buying a $150 board and then figuring out a good process for flashing new builds to it, etc... and then buying the even more expensive debug and analysis equipment.

In fact, I'd say QEMU is probably a better way to start then the setup I suggested, I just hadn't thought of it!

[quote name='ATC' timestamp='1351407231' post='4994646']
Secondly, most of us programmers are writing software for x86/64 systems. And when we want to learn about OS development it's usually not to try to become a professional OS developer (very tough market to get into, dominated by Microsoft) but to go on an "academic" venture; to become more knowledgeable and skillful programmers on our primary development platform. So for those two reasons alone I would not go as far as saying that the x86 platform is a "horrible" choice... I think that if you're in OS development for academic reasons you should work with the platform you do most of your userland/everyday programming on... and if you're in it to make a profession out of OS development you should work with the platform you intend to support.
[/quote]

This is actually precisely why I'd say x86 is a bad choice. If you're in it for academic reasons, what you should really be interested in is the general theory behind everything you're doing, rather than the minute implementation details. Believe it or not, the vast majority of what you learn working on [i]any[/i] even vaguely comparable platform (i.e. 32-bit von Neumann architecture) will be equally applicable wherever you go when it comes to userland. Things like the gritty details of how to manage your system's MMU are largely irrelevant outside of OS design, but the general principles behind how a paged MMU works are very useful and pretty consistent among most modern platforms.

Assuming you buy the story that what you learn will be equally applicable, then I can almost guarantee you'll have an easier time actually getting off the ground on a simple SoC. Can't really underestimate how having the entire system on one chip with one detailed reference manual can simplify figuring everything out.

[quote name='Ohforf sake' timestamp='1351413483' post='4994655']
Also in our chip, we could disable certain functionalities (cache, MMU, ...) in order to get everything right one step at a time. I don't know, if intel lets you globally disable the caches "just like that".
[/quote]

This is actually a very important point that I thought I'd quote for emphasis here. I also don't know if that's the case on Intel, but it can make quite the difference.

Share this post


Link to post
Share on other sites
6677    1054
Instead of a beagleboard you could use a raspberry pi. There is a tutorial on developing an OS in ARM assembly for it too.



The extend of my OS development ends with using cosmos: [url="http://cosmos.codeplex.com"]http://cosmos.codeplex.com[/url]
Fun stuff. I also had a semi working command shell written in DCPU16 once aswell but it was very buggy and I lacked motivation to complete it.

Share this post


Link to post
Share on other sites
BentmGamer    88
can u people quit discussing os development. All i want is something to create an inmteractive program. If coding is needed, I would prefer python or java and btw, whats svg

Share this post


Link to post
Share on other sites
6677    1054
If you want an interactive program. Any language will do.

Pygame will do it for python. Slick will do it for java. XNA with C#. Anything. Even a simple windows form application might work to some extent.

Share this post


Link to post
Share on other sites
Cromulent    398
[quote name='6677' timestamp='1351439564' post='4994734']
Instead of a beagleboard you could use a raspberry pi. There is a tutorial on developing an OS in ARM assembly for it too.
[/quote]

I was going to suggest the Raspberry Pi as well. It is a very capable board for $35. You can't really go wrong with it. 700Mhz ARM chip, 10/100 Ethernet, HDMI out, 2x USB 2 ports, audio out, an SD card slot and 512Mb of RAM. What more do you need?

Share this post


Link to post
Share on other sites
nife87    520
[quote]
...Raspberry PI...
[/quote]

AFAIK they only make model A and B with 128/256 MB RAM, respectively, though with a model C in mind. But it is a great tool/toy with credit card dimensions, requiring a mere 5 W from an ordinary AC/DC charger and even contains a GPU capable of decoding 1080p (x264) without hassle. Unfortunately, it is only produced in small production batches (still waiting for my own copy since mid-July), since they initially expected a lot less demand from private buyers.

Share this post


Link to post
Share on other sites
Cromulent    398
[quote name='nife87' timestamp='1351453703' post='4994821']
AFAIK they only make model A and B with 128/256 MB RAM, respectively, though with a model C in mind.
[/quote]

Incorrect.
[quote]
[b]What’s the difference between Model A and Model B?[/b]
Model A has 256Mb RAM, one USB port and no Ethernet (network connection). Model B has 512Mb RAM, 2 USB port and an Ethernet port.
[/quote]
[url="http://www.raspberrypi.org/faqs"]http://www.raspberrypi.org/faqs[/url]

Share this post


Link to post
Share on other sites
ATC    551
[quote name='Bentm's Games' timestamp='1351441513' post='4994745']
can u people quit discussing os development. All i want is something to create an inmteractive program. If coding is needed, I would prefer python or java and btw, whats svg
[/quote]

Well, your thread suggests you were interested in OS development... if you're not, then I have no idea what you're trying to do (or better yet, [i]why[/i] or what the point is)... You're initial question has already been answered though, just use whatever graphics API you're best with... Anything will work...

Share this post


Link to post
Share on other sites
TL;DR - you don't need to program if you want to "mock up" an operating system. A design idea can be done in flash, a workable demo can be done in Java or any other programming language on top of an existing OS (this is what Nintendo did for their Gecko emulation, and AmiOS - the AmigaOS open source project - has been doing for a while).

For those who were led here by the (slightly misleading) "Create an operating system" title, here are some links to how others are using qemu and gdb to develop low-level system code for ARM processors on their cheap, readily-available PC hardware:

http://stackoverflow.com/questions/2651075/what-do-i-need-for-development-for-an-arm-processor
http://stackoverflow.com/questions/2611624/low-level-qemu-based-debugging

Have fun.

Share this post


Link to post
Share on other sites
Heath    357
[quote name='Bentm's Games' timestamp='1351441513' post='4994745']
can u people quit discussing os development. All i want is something to create an inmteractive program. If coding is needed, I would prefer python or java and btw, whats svg
[/quote]You could write a python program with pyglet or whatever that runs other python chunks, with a homescreen and everything that looks like what you might want. It would teach you more about the language itself, even if you never want to use that program for anything practical.

Share this post


Link to post
Share on other sites
recompile    151
[quote name='Narf the Mouse' timestamp='1351320533' post='4994357']
Y'know, I'd be interested in buying a good book on writing an OS, if anyone wants to write one and put it up on Amazon. I'd probably learn a lot from it, if nothing else.
[/quote]

It's an antique by today's standards, but I remember it being handy: [url="http://www.amazon.com/Developing-32-Bit-Operating-System-Cd-Rom/dp/0672306557"]Developing Your Own 32-Bit Operating System[/url]

It worked surprisingly well with this much older, but extremely handy book: [url="http://www.amazon.com/Programmers-Problem-Solver-IBM-PC/dp/B000SKWM12/ref=sr_1_3?s=books&ie=UTF8&qid=1351487655&sr=1-3&keywords=programmers+problem+solver"]Programmer's Problem Solver for the IBM PC, XT, & AT[/url]

Hmmm... Maybe I need to find new books...

Share this post


Link to post
Share on other sites
6677    1054
[quote name='nife87' timestamp='1351453703' post='4994821']
[quote]
...Raspberry PI...
[/quote]

AFAIK they only make model A and B with 128/256 MB RAM, respectively, though with a model C in mind. But it is a great tool/toy with credit card dimensions, requiring a mere 5 W from an ordinary AC/DC charger and even contains a GPU capable of decoding 1080p (x264) without hassle. Unfortunately, it is only produced in small production batches (still waiting for my own copy since mid-July), since they initially expected a lot less demand from private buyers.
[/quote]
I'd chase your purchase up. They have more manufacturing plants running in larger batches now and no longer have any order delays, havent done since early august. Infact a friend ordered a model B when they announced the 512mb upgrade, on his doorstep in 2 days.

Model A still isn't shipping yet (no idea why) but is now using the 256mb chipset from the original model B.
Model B is now shipping on a revision 2 PCB with 512mb RAM instead of the original 256 of first revision boards. Price is the same.



The SoC used only has a single USB port supporting acting as a slave aswell as host. On the model A they break this port straight out into a single USB connector. On the B they run this through an onboard hub first which splits it off into 2 ports and an ethernet port (through yet another chip, so yes, technically ethernet is a USB device although I think the firmware in the GPU does some trickery to expose the hub as a network driver and 2 dedicated ports) which does limit the bandwidth of USB devices considerably, also impacts ethernet performance.

Some of the GPU firmware is now open source.





Back on topic, yes OP, your virtual OS is just a graphical app which just happens to have the functions of a media player and a text editor and god knows what else. There are plenty of them out there. Any graphics library will do the job fine with any language capable of playing audio. Easiest way to do it would probably be to use .net win forms application, create one main form which is your desktop and set it to be an MDI parent, other forms can then be opened inside it.

Share this post


Link to post
Share on other sites
Alain Menard    175
The Tannenbaum "Modern Operating System" book includes the listing of Minix in C. I never had the guts to type it in [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img]

Share this post


Link to post
Share on other sites
demonkoryu    980
I found [url="http://www.freetechbooks.com/an-operating-systems-vade-mecum-second-edition-t450.html"]An Operating Systems Vade Mecum (Second Edition)[/url] extremely valuable. And yes, it is a free download; although the original download page has vanished.

Share this post


Link to post
Share on other sites
ATC    551
[URL="http://www.brokenthorn.com/Resources/OSDevIndex.html"]Here[/URL] is an absolutely wonderful operating system development tutorial series by "Brokenthorn"... this helped me [i]immensely [/i]in learning how to develop operating systems [i]in Visual Studio[/i], making working kernels and drivers as PE images (EXE and DLL files), configuring Visual Studio to compile properly, assemble assembly code, automatically deploy your kernel on your virtual machine for debugging and much more. It also has tutorials on implementing both basic and advanced graphics shells with working code and implementing a basic C Standard Lib and C++ runtime. It's awesome... trust me... :-)

--ATC--

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this