OS Development environment set up.

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.
Post Reply
schilds
Member
Member
Posts: 32
Joined: Sat May 07, 2011 8:21 am

OS Development environment set up.

Post by schilds »

Hello, yet another newbie (a.k.a. someone who asks stupid questions) here.

I was wondering if the following is a reasonable way to start trying things out:

Two machines connected via serial ports. The first a development machine running windows/linux/whatever. The second a test machine loaded (booted from cd/usb/whatever) with the absolute bare minimum needed to receive and execute binary code sent over the serial port. It should be the bare minimum so that the code sent from the dev machine is running within as clean/unoccupied a system as possible.

The idea being to generate code on the development machine and send it over to the other machine for execution. I realise that there are dev kits (e.g. for embedded systems) that are set up similarly to this, but I'd prefer a normal desktop computer (i.e. with all the usual bits a desktop computer has) for the test machine.

Assuming this is a reasonable thing to want to do, is there an existing bare minimum OS as described? Though I hesitate to call it an OS as it's just some boot stuff + serial driver. Otherwise I'll write it myself.
mariuszp
Member
Member
Posts: 587
Joined: Sat Oct 16, 2010 3:38 pm

Re: OS Development environment set up.

Post by mariuszp »

1) Why don't you use an emulator? It's much faster

2) GRUB can boot from the network if you set it up right, so you can try that.
schilds
Member
Member
Posts: 32
Joined: Sat May 07, 2011 8:21 am

Re: OS Development environment set up.

Post by schilds »

Thanks for your answers, I'll take a look at those, but I should have said I'm aware of network booting and that's not exactly what I'm looking to do (well, my newbie mind is under that impression).

The development machine would be in possibly constant communication with a test machine that's waiting to receive and execute an ongoing stream of instructions (some of which could conceivably end up being a whole boot procedure I suppose) and unless there's an error, it shouldn't have to reboot.

[edit]
Just to expand on how I would use it:

The development machine essentially serves as a kind of scaffolding. Initially, the entire 'OS' will be run as an application on the development machine - it won't be so much an OS as just an app that will delegate the occasional computation to the test machine. As I progress, I want to be able to switch modules (in either direction) between the two machines, while still maintaining a usable system (using the term system very loosely, here) and after some (very large amount of) time it should reach the point where it's an actual OS running mostly on the test machine with the development machine just providing support for debugging.

Basically, the two computers will be running in parallel as one system, with most functionality initially provided by the dev machine and incrementally moved across to the test machine (or even moved back to the dev machine) as and when it makes sense or becomes necessary to do so.

[edit2] ok, having taken a look at tftp and such, no doubt I could take an existing implementation of something like that and modify it to do what I want, it's just that they seem a bit too heavy (yes, I just called *trivial* ftp heavy :p). Ah well, I'll think about it a bit more.

Maybe I should stop trying to work out ways to be laz..., that is to say, efficient and just write it myself instead of steal... borrowing it ;).
schilds
Member
Member
Posts: 32
Joined: Sat May 07, 2011 8:21 am

Re: OS Development environment set up.

Post by schilds »

Hmm, well I guess I have some things to think about. Thanks for your advice.

I suspect I'll probably still end up trying to do what I've described, even if just to see how far I can take it ;).
schilds
Member
Member
Posts: 32
Joined: Sat May 07, 2011 8:21 am

Re: OS Development environment set up.

Post by schilds »

Ok, wrote and tested a serial boot thingy (much cutting and pasting from random web sources) on test machine with client on dev machine (takes hex string and creates binary serial packets in some format I made up with crude error checking). Appears to work - sent "b84d0ecd10c3", got an M on screen.

I hope not to have to look at the following boot code again, but I'll probably do another version that relocates itself and loads received code into the 512 bytes where the bootsector is (because one day I might want to send across code that is meant to be actual boot code). http://wiki.osdev.org/Boot_sequence suggests address 0x0000:0x0600, so I'll try that.

Anyway, before I go any further, any suggestions?

Also, am I just lucky my code worked or does it look ok? (It's short but if you don't want to read it, don't read it ;)).

https://github.com/schilds/Serial-BootL ... loader.asm
Post Reply