# Help me build a new UNIX Operating System



## ananm1 (Mar 8, 2013)

Hi *a*ll,

I would like to build a new Unix Operating System. Would anyone like to help me write the kernel in C? *O*r have any suggestions on an alternative language to build it in?

*T*hanks,

Anan

The GOAL: To Run Natively on Microsoft Surface Pro


----------



## SirDice (Mar 8, 2013)

Why reinvent the wheel? You have access to the source of a unix descendant. Why don't you use that?


----------



## ananm1 (Mar 8, 2013)

I agree for the most part our job is done, but to run properly on a Mobile Tablet Computer, there needs to be some new features, like a solid integrated touch screen keyboard.


----------



## SirDice (Mar 8, 2013)

I don't consider that the job of the OS. That's more an Xorg thing. 

It runs on a normal Intel Core i5 processor so there's probably not a lot to do to get it working. Although Windows' secure boot will probably prevent you from changing the OS.


----------



## ananm1 (Mar 8, 2013)

Yes, I guess writing a new boot loader for FreeBSD and modifying Xorg. So it would be a new mobile distro of FreeBSD then.

Can I call it Anan-BSD?

Hmmm, maybe just need to modify the bootloader:


----------



## redw0lfx (Mar 8, 2013)

Doesn't x11/kde4 already contain a kiosk mode that could be used for tablet?  Perhaps with just minimal modification? I would imagine what would be needed is to port over the Kvkbd from kde-apps.com.


----------



## wblock@ (Mar 8, 2013)

If anything non-Microsoft boots on that thing, many of us will be very surprised.


----------



## ananm1 (Mar 8, 2013)

Yes I'm skeptical... I think it will require a bit of hacking and tweaking.


----------



## taz (Mar 8, 2013)

> Hi All,
> 
> I would like to build a new Unix Operating System. Would anyone like to help me write the Kernel in C? or have any suggestions on an alternative language to build it in?
> 
> ...





> The GOAL: To Run Natively on Microsoft Surface Pro



I don't think that you fully understand what are you talking about here. I'm under impression that you had an idea "hey let's make a UNIX for a tablet" but without any real knowledge about kernel and OS development.

By the time you alone would actually get your OS to the state shown in that picture, tablets probably would not exist anymore and would be replaced by a some crazy hologram technology.

IMHO, a better idea than modifying FreeBSD to be able to run on Microsoft Surface Pro is to design a new tablet, if you want to get extreme and "invent" new stuff...



> I agree for the most part our job is done, but to run properly on a Mobile Tablet Computer, there needs to be some new features, like a solid integrated touch screen keyboard.



Don't forget about power management...tablets are meant to be portable and what god is it if your battery life is low.

Anyhow if your dead serious about this "new UNIX OS" here are some links that can get you started:

http://www.brokenthorn.com/Resources/OSDevIndex.html
http://wiki.osdev.org/Expanded_Main_Page


----------



## ananm1 (Mar 8, 2013)

Yes I am serious... though all I would do to begin is to install pc-bsd onto the surface pro and go from there. Also building hardware is a little more expensive that writing an OS.

Those Links look very good Taz. Thanks. Now which executable would you choose? Unix ELF or Windows PE?


----------



## _martin (Mar 8, 2013)

@taz: Thanks for the broken thorn link! .. I had in in bookmarks few years ago and lost it. I wanted to read from it maybe a year ago, but my google-fu was not aligned with the stars at that time


----------



## Nukama (Mar 8, 2013)

Touchscreen working on [email=FreeBSD@xda-developers.com]FreeBSD@xda-developers.com[/email] for a HTC Swift.

You may look into it and provide a touch-screen input method, which is operational without Xorg.


----------



## ananm1 (Mar 8, 2013)

Very cool Nukama! Thanks 

That last link is exactly what we need to do for this to run on Surface Pro!


----------



## taz (Mar 8, 2013)

ananm1 said:
			
		

> Yes I am serious... though all I would do to begin is to install pc-bsd onto the surface pro and go from there. Also building hardware is a little more expensive that writing an OS.



So wait, is your goal to port FreeBSD or to program a new OS? Or both? Also way Microsoft Surface and how do you stand with C and assembler?

Kernel development is hard. Takes a lot of programming skills and general boot loader,file systems, loaders, drivers, graphics and kernel knowledge. Can you handle all of this on your own? I'm not so sure...you might be able to pull of some kind off basic kernel with "DOS" like graphics but this isn't the '90 it's 2013 and tablets are not meant to be running terminals and Super Mario.

I like the way you are enthusiastic and here is another link that might encourage you even more:

http://www.menuetos.net/

This thing was written entirely in assembly and that's just crazy and awesome P

But I think you need to keep it real...you seem to be fond of FreeBSD so instead of developing a new OS make something useful for the community...I guess you could try to port FreeBSD to Surface but there are projects that might be more "needed"...at the top of my mind wireless drivers for example.


----------



## h3z (Mar 8, 2013)

taz said:
			
		

> So wait, is your goal to port FreeBSD or to program a new OS? Or both? Also way Microsoft Surface and how do you stand with C and assembler?
> 
> Kernel development is hard. Takes a lot of programming skills and general boot loader,file systems, loaders, drivers, graphics and kernel knowledge. Can you handle all of this on your own? I'm not so sure...you might be able to pull of some kind off basic kernel with "DOS" like graphics but this isn't the '90 it's 2013 and tablets are not meant to be running terminals and Super Mario.
> 
> ...



I always wonder what would happen if a really good asm programmer took the time to do an assembly audit of a modern kernel . It would likely take forever . Maybe it wouldn't make much difference at all since C is close to machine laguage (closer than some). The MinuetOS and KolibriOS fork do spark a curoisity on the out come of such a project . But then you'd have to do the same thing with X and every other progam ported to your new OS in order for consistant advantage (if any).


----------



## ananm1 (Mar 8, 2013)

@taz Yes I do enjoy assembly and C-Progamming. The question is how do we optimize the UNIX OS for a mobile platform. I personally think if done correctly UNIX can do everything Windows can do the Surface Pro, but twice as fast and more stable.

I think MenuetOS is definitely on the right track. I'm just not sure that 'everything' can be done in assembly. I think there maybe some loss of functionality but gain in performance.

Here's my ambition:
-A UNIX Mobile OS 
-Written in C/Assembly
-About 150Mb to 200Mb total size
-Multi-thread 
-Front and back USB Camera
-Wireless Ready 
-Multi-touch gestures

In a simple to install/boot Unix Distro


----------



## taz (Mar 8, 2013)

ananm1 said:
			
		

> @taz Yes I do enjoy assembly and C-Progamming. The question is how do we optimize the UNIX OS for a mobile platform. I personally think if done correctly UNIX can do everything Windows can do the Surface Pro, but twice as fast and more stable.



Well if it was me I would first ensure proper power management...IMHO twice the speed and stability means jack if you have half the battery life that Windows can pull off on those machines (~5h).


----------



## ananm1 (Mar 8, 2013)

If you have an OS that is efficient {memory/cpu/disk}... the power consumption is also going to be efficient. So that I'm hoping will be the side effect of a solid OS.


----------



## zspider (Mar 9, 2013)

If you have no background in computer science, you will have a very hard time writing your own OS, it's better if you just use something off the shelf.


----------



## ananm1 (Mar 9, 2013)

@zpsider I'm hoping I learnt something in my four years of Computer Science at college. But even with that there is a lot of new concepts to master.


----------



## foodown (Mar 13, 2013)

You can run other operating systems on a Surface Pro.

http://venturebeat.com/2013/02/06/yes-you-can-run-linux-on-your-microsoft-surface-pro/


----------



## ananm1 (Mar 14, 2013)

Nice looks good, there is hope for FreeBSD then!


----------



## fluca1978 (Mar 14, 2013)

ananm1 said:
			
		

> I would like to build a new Unix Operating System. Would anyone like to help me write the kernel in C?



Hi, I'm trying to raise one million dollars, anybody interested here?

Sorry, but it seems from your thread that you (i) don't know what you are talking about (kernel, keyboards, ...) and (ii) don't understand what making an operating is about.
Really, Linux was not built with an e-mail sent to the internet like your message. Calling for participation in such a big project is not as simple as writing a two lines forum post.


Now, if your will is to *fork* because you have an idea, than go for it and don't reinvent the wheel. If your will is to get a product you can sell, then pay for developer(s) that know from where to start. If your will is to learn what an operating system is about, than join any of the free OSs around the planet.

Please consider that the FreeBSD kernel is about 10 million lines of code, and the same is true for Linux and other Unix/Unix-like systems. Are you ready to deal with such a piece of code by yourself (and by the way, assure quality, because none will buy it if it is not stable)?

The last suggestion, in the case you *really* want to achieve your goal: get an instructor and document yourself. Even applying your idea to Google Summer of Code or something alike could help you.


----------



## ananm1 (Mar 14, 2013)

Well, it turns out something like PC-BSD can run natively on the Surface Pro. If that is the case there might not be the need for a new version. And part of this project is to learn all that goes into a UNIX OS. It*'*s more a learning experience than a profit/business experience.


----------



## fluca1978 (Mar 15, 2013)

ananm1 said:
			
		

> It's more a learning experience than a profit/business experience.



Then finding a teacher on the subject will help you even more, and applying for any kind of development in the area will make you learn quickly.


----------



## throAU (Mar 18, 2013)

ananm1 said:
			
		

> Well, it turns out something like PC-BSD can run natively on the Surface Pro. If that is the case there might not be the need for a new version. And part of this project is to learn all that goes into a UNIX OS. It*'*s more a learning experience than a profit/business experience.



Your best bet is to find the smallest open-source or source-available unix OS you can (maybe Minix is free enough now?) and study the code to see what it does before trying to go off and write your own OS from scratch.

Writing an OS from scratch, rather than porting something that already exists (and has had decades of testing already, like Linux, FreeBSD or similar) is going to be a lot of wasted effort, so unless there's a very good reason you can't port something that already exists, or you are intending for it to be a research OS with no users, I'd avoid trying to do that.


----------



## ananm1 (Mar 19, 2013)

Sounds good throAU, I'm trying Minix3 on a virtual machine now.


----------



## xaidex (Nov 4, 2016)

This poor guy had a dream and a vision to be innovative and you all crushed it with your closed minded and narrow thinking! Jealousy is a curse! If someone wants to "reinvent the wheel" (no such thing when you're creating YOUR OWN VERSION of an operating system). Did Steve Jobs "reinvent the wheel" when he developed HIS OWN VERSION of a machine? Jerks like the lot of you is why we're so behind in technology today! Depending on just a couple of companies to tell YOU what you like and don't like, coz god forbid, you think for yourself!


----------



## Oko (Nov 4, 2016)

xaidex said:


> Did Steve Jobs "reinvent the wheel" when he developed HIS OWN VERSION of a machine?


For the record Steave Jobs didn't invent anything. I suspect without Steve Wozniak he would have hard time turning on the light in his apartment. I am not denying his business skills and the fact that he was an unscrupulous man.


----------



## ANOKNUSA (Nov 5, 2016)

xaidex said:


> Jerks like the lot of you is why we're so behind in technology today!



While I admire the "dream big" spirit, the fact is the time you spent writing a little rant in English could have been spent writing a little bit of a kernel in C. You obviously thought the rant was a better use of your time and energy. It shouldn't be hard for you to see why others would not want to contribute  their time and energy to a stranger's new Unix-like kernel when they're already using one that works just fine---just like you are.


----------



## Remington (Nov 5, 2016)

xaidex said:


> This poor guy had a dream and a vision to be innovative and you all crushed it with your closed minded and narrow thinking! Jealousy is a curse! If someone wants to "reinvent the wheel" (no such thing when you're creating YOUR OWN VERSION of an operating system). Did Steve Jobs "reinvent the wheel" when he developed HIS OWN VERSION of a machine? Jerks like the lot of you is why we're so behind in technology today! Depending on just a couple of companies to tell YOU what you like and don't like, coz god forbid, you think for yourself!



With that kind of comments, you're not going to find anyone here who will be willing to get involved with your project.  If you built a small OS with your clear goals, reasons, plannings, hardware requirements and targeted audience, and others might join to contribute something.  Trying to recruit someone on a vaporware project based on few ideas isn't going to fly.  You might start the project at github.

There is no guarantee that Microsoft will continue to use Intel processors in their tablets.  One day they could switch to ARM processor and you'll have to rewrite everything.  New tablets are released every year and that's going to be hard to keep up with new changes.  You need to be realistic and focus on something that is viable in long term otherwise it'll be waste of time on developing something that will only last a year or so before its worthless.  I'm not trying to burst your bubble and many folks will not want to spend their time and efforts on something that will be outdated very quickly and tablets or smartphones have very short life.


----------



## ShelLuser (Nov 6, 2016)

xaidex said:


> This poor guy had a dream and a vision to be innovative and you all crushed it with your closed minded and narrow thinking!


Seems the OP disagrees with you, considering his shown thanks for most of the made suggestions.

Also noteworthy: thread is 3 years old, so its doubtful that the above participants will be reading your reaction here.


----------



## hitest (Nov 6, 2016)

ananm1 said:


> Yes I'm skeptical... I think it will require a bit of hacking and tweaking.



You have several excellent BSDs you could work from:  FreeBSD, OpenBSD, NetBSD, and DragonflyBSD.  Why not try the hardware on those and then see if you need to tweak and modify.


----------

