OSDev.org
https://forum.osdev.org/

OS Development environment set up.
https://forum.osdev.org/viewtopic.php?f=1&t=23556
Page 1 of 1

Author:  schilds [ Sat May 07, 2011 9:35 am ]
Post subject:  OS Development environment set up.

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.

Author:  mariuszp [ Sat May 07, 2011 10:56 am ]
Post subject:  Re: OS Development environment set up.

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.

Author:  schilds [ Sat May 07, 2011 5:50 pm ]
Post subject:  Re: OS Development environment set up.

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 ;).

Author:  schilds [ Sun May 08, 2011 4:27 am ]
Post subject:  Re: OS Development environment set up.

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 ;).

Author:  schilds [ Wed May 11, 2011 3:11 am ]
Post subject:  Re: OS Development environment set up.

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

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/