dharanivel
Posts: 33
Joined: Sun Dec 16, 2018 4:36 am

Build OS for rpi0

Wed Jun 26, 2019 9:40 am

Iam trying to build a GUI OS. But i have no idea from where to start. I have little experience in arm asm and c++. Can anyone help me to build OS

bzt
Posts: 374
Joined: Sat Oct 14, 2017 9:57 pm

Re: Build OS for rpi0

Wed Jun 26, 2019 10:08 am

Hi,

If you have little programming experience with ARM Assembly and C++, then maybe you should start with a smaller project first.
Check out tutorials, and bare bone libraries, they are good starting points, but they won't teach you OS theory or magically give you programming experience.

There's a long and hard, but beautiful road ahead of you :-)

Cheers,
bzt

User avatar
Gavinmc42
Posts: 3424
Joined: Wed Aug 28, 2013 3:31 am

Re: Build OS for rpi0

Wed Jun 26, 2019 10:54 am

There's a long and hard, but beautiful road ahead of you :-)
You can take the bypass unless you like those windy, bumpy roads.
No matter which way you go expect a long journey of learning.

Currently baremetal can be done in asm, C, C++, Free Pascal, Rust and ?????
Turning those into an OS is a bit more complex.

For me an OS requires some sort of shell scripting language, so you can write apps on the OS.
OS's by themselves don't actually do much, they need to run stuff.

That is the application level coding, which is mostly what I do these days with Ultibo.
It is very similar to using Arduino's where you have a startup section and a main section.
Everything else is done with library files.

As well as nix style OS's look at Real time Operating systems, FreeRTOS etc

I do most of my Pi OS GUI coding with Zero's using the USB boot mode.
https://github.com/raspberrypi/usbboot
Just saves all that uSD wear and tear.

A couple of the tuts linked to some of the regulars are very useful.

The ultimate OS is something like Oberon, which really needs updating and native porting to Pi's.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

lpoulain
Posts: 24
Joined: Mon May 20, 2019 12:35 am

Re: Build OS for rpi0

Wed Jun 26, 2019 11:54 am

My advise is: start small and go incremental. Don't try to build a new Linux off the bat. Start with something that prints "Hello World". Then can you use graphics? Then can you implement interrupts? etc.

Look for bare metal examples you can find on Github, understand them and tweak them. Also, https://www.osdev.org/ contains a lot of very useful resources about how OS are designed.

dharanivel
Posts: 33
Joined: Sun Dec 16, 2018 4:36 am

Re: Build OS for rpi0

Wed Jun 26, 2019 3:56 pm

Is there any ide or simulator for raspberry pi ???? . And every time i need to remove and insert the SD card and this may lead to damage the sd card slot. Is there any way to solve this problem.

lpoulain
Posts: 24
Joined: Mon May 20, 2019 12:35 am

Re: Build OS for rpi0

Wed Jun 26, 2019 4:49 pm

There are several ways you can get around this:

Return to “Bare metal, Assembly language”