I am heavily interested in Operating System theory and design and have decided I would like to play with developing an OS. I have a background in x86 assembly and have looked into ARM also. I would like a development board to develop the OS for. Has anyone had experience with OS development and/or can suggest some hardware to use?
One board I am considering is the LPC1769 LPCXpresso board.
I am aware I could use a VM, but I would like to use actual hardware.
Well.. I personally started off with an RTOS called freertos (http://www.freertos.org/). This is an open source RTOS and is very minimalistic. It is also supported across a ton of platforms and is well written and maintaned. I ran it on a PIC32 microcontroller kit. However I would recommend you try something like Arduino boards which are more suited for beginners.
Happy learning!
Old thread, you have found your way by now, but I would definitely recommend the FreeRTOS + LPCXpresso 1769 combination.
Related
Preface: I'm a student about to take a course in Operating Systems. I thought I'd do some prep by watching a series on YouTube first.
Throughout the course of watching about 10 of the videos in this series, I have learned that roughly the operating system's purpose is to serve as an interface for System Programs/Applications/I/O devices/etc. to communicate with the system's hardware.
This got me thinking about how Apple's hardware is not modularly customizable. How Apple users can't swap out hardware components as easily as users on a system running Windows OS. I began to think that most likely this is because the OS Apple implements is built very specifically with the original hardware their products come with to run as efficiently as possible.
Is there any truth to this logic? I'm basically just trying to apply what I've been learning to a "real-life" example.
This got me thinking about how Apple's hardware is not modularly customizable.
It is quite customizable but not with their own hardware. The "hardware" that Apple is shipping is mostly x86-64 CPUs with a recent chipset like an xHCI, an AHCI and a modern PCI network card, etc. This is unless you have an M1 computer which is their most recent product based on an ARM architecture. They licensed the architecture from ARM ltd. and are manufacturing their own CPU. I think this is a very good and open decision from Apple unlike several bad ideas they had about their phones like removing the 3.5mm jack or using a lightning plug instead of USB-C.
If you do have an x86-64 CPU, the OS Apple built called MacOS can run on the computer. It is simply forbidden by Apple's license of use. The fact that their hardware is less customizable has mostly to do with screws and the way that the case is made than with the OS itself.
I’m on process of developing my own Operating System based in Linux.
This week we’re aiming to implement very simple USB device driver , which is quite hard to get basic algorithm .
However commonly it’s hard to find out some sources aside from commercial linux system.
And I want to get some advice about this .
Plus, I do all these stuffs on Ubuntu , using QEMU emulator.
I’ve done simple file system and hard disk device driver so far.
Help me out how to implement USB device driver with very sime ideas.
Thank you !! :)
Implementing USB is quite the task. First you must have a working PCI(e) enumerator or other form of finding the USB controller. You then must find out which of the four most common controller types it happens to be. Each controller type is completely different from the previous and must contain its own driver. You also need a standard USB interface that is independent of the controller type.
Taking on the USB is quite the task, but in my opinion a very interesting and enjoyable task. Enjoyable enough, that I even wrote a book about how to do it. It explains how to find the controller(s) via the PCI(e) bus, how to setup this bus, how to detect the type of USB controller--UHCI, OHCI, EHCI, or xHCI--and how to send and receive data packets to/from attached devices. This book was written exactly for the purpose of those of us creating our own operating systems and adding USB support to them. The fact that you are basing your OS on Linux should not matter since the book does not rely upon any existing OS to accomplish this task, other than the example programs relying on memory allocation, which is easily modified for your developing platform.
Might I say that if you do take on this task, it will be a difficult task, but it will be an enjoyable task. In my opinion, the USB is the most enjoyable part of this hobby of ours.
I have been reading on linux kernel development and device drivers for a while. I feel ready to give it a go on a real piece of hardware. I would like to write a driver for a, preferably usb (otherwise pci), device for a desktop computer. But every device I seem to think of is already supported (including everything I own atm). So, would welcome any suggestions.
P.S. Willing to buy it, provided it's under £100 (150$).
Anything really practical has already been done out of necessity. My vote would be for something like http://www.amazon.com/Cheeky-Computer-Controlled-Missile-Launcher/dp/B004AIZV48/ref=pd_sim_t_1. It's fun, inexpensive, and currently Windows only.
The protocol should be pretty simple, but will give you good experience on debugging the USB channel in order to figure it out. And when you are done, you'll have a cool toy :)
USB-based devices are generally well supported at the kernel level. What this means is that u rarely have to write a device driver for each and every USB devices at the kernel. THis is because applications can easily use libusb (and several other userspace USB libraries) to talk to the device.
If you look into the USB code in the kernel, you can see that it is among the most complex implementation of all the hardware protocol, but it is also generic across different USB devices. I have done porting work for USB devices before, and trust me, libusb is good enough.
Check it out (for example):
http://libusb.sourceforge.net/doc/examples.html
You could port the Enttec Open DMX USB Interface driver to latest 3.x kernels.
git clone http://git.hbels.com/public/dmx_usb_module
libusb way sounds more appropriate to me too though.
Just a thought, if we have to make our application cross-platform, then is it possible to create a cross-application OS?
No.
Lets say you do go and invest - a monumental amount of - effort in building you're Uber-OS (that will run Mac apps, Linux apps, Unix apps, Android apps, i-phone apps, Nokia apps, Symbian apps, SAP apps, Windows Apps etc).
Then there's nothing stopping someone writing a new OS that you don't support.
P.S. And there are hundreds (if not thousands) of different hand held devices out there for scanning products, weights and mesures etc many of which have their own flavour of OS.
Technically yes as long as you limit the scope of all to all applications that run on major OSes.
It is theoretically possible to create an OS that could handle applications run on the 4-5 most common OSes but the amount of work involved would be monumental.
Every time a new feature was added to any of the OSes, you'd need to add it to your OS too - So as well as being almost impossible to build, you'd need a large enough dev team to stay ahead of 4-5 of the largest dev teams/groups in the world.
No but with virtualization you could have a single computer that can run any application.
First there is the practical impossibility of successfully following the evolution of an indefinite number of operating systems. Do we take embedded OS into account? How about one-shot OS for specific applications? How about proprietary OS with no access to documentation?
Then there is also the - very difficult, if not impossible - problem of merging the various paradigms used in the wild. Ideally you would want OS services like the clipboard, or networking or ... or ... to work in a uniform way and allow applications to cooperate as if targeted to the same OS.
(Let's not even think about the various hardware-dependent applications.)
After all this, you should also consider what the application development for your own OS would be like...
I wonder if this is a good case for Gödel's incompleteness theorems :-)
PS: That said, there are quite a few projects attempting to bridge the various OS gaps:
http://en.wikipedia.org/wiki/List_of_computer_system_emulators
http://en.wikipedia.org/wiki/List_of_emulators#Operating_System_emulators
What you can do is use virtual machines, such as VMWare's software, and emulate several operating systems on the same physical machine.
What do you define by an operating system that can run all applications?
Applications are mostly written in a higher level language and then translated into binary code that differs between machine architectures (like Intel and PowerPC) and operating systems (like Windows or Unix-based systems).
Java for example is only cross-platform because not the language itself is cross-platform (any high level language is), but because there exist Java virtual machines for different architectures and operating systems that abstract the heterogeneity of the underlying system.
It is definitely not theoretically impossible (nothing is except for some mathematical problems), but can you imagine what one would have to do in order to make such a thing work? You can basically run Linux programs in Windows with CygWin, you can also run Windows programs in Linux with Wine. All of those try to create a small operating system (e.g. the Windows core) into your other OS (e.g. Linux). This is probably not what you want.
To summarize, I can't imagine anyone really trying to do that. With all the money in the world, seriously. Better invest in writing native apps for the operating systems you want to support.
I have one query on which I would like to get your valuable feedback. Nowadays I hear a lot about Web Operating Systems. Like, Google is working on Chrome OS, but I am not sure how OS principles will work with a Web Operating System. I mean, Web OS's will come in picture once the Internet is connected, but for booting up system and other related task we would need an OS and I think a Web OS won't be useful there.
I would really appreciate if someone can point me to useful resources or explain me about the working principle behind a Web Operating System?
I'll start with the obvious: http://en.wikipedia.org/wiki/Web_operating_system