Tools for OS Dev
- kenneth_phough
- Member
- Posts: 106
- Joined: Sun Sep 18, 2005 11:00 pm
- Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
- Contact:
Thank you
Thank you very much for all the advice and help. I really appreciate it.
-Kenneth
-Kenneth
I use GCC 4.1.1, NASM, and LD on Linux. I'm also making heavy use of bash scripting and some other GNU tools like sed, tr, expr, gawk, and grep. I created my own build system in BASH for my project. It works really nice and needs no modification no matter how many source files you add to it. I use QEMU + KQEMU for my virtualization environment and I made a script that will automatically mount my filesystem with a loopback device, copy my kernel over, unmount, and then run qemu on it. Saves a lot of time.
- chase
- Site Admin
- Posts: 710
- Joined: Wed Oct 20, 2004 10:46 pm
- Libera.chat IRC: chase_osdev
- Location: Texas
- Discord: chase/matt.heimer
- Contact:
Alternative to make, jam
If you hate make but your OS is getting bigger then something that you can just write a shell script or batch file for you might want to take a look at jam. http://www.perforce.com/jam/jam.html It works on all major platforms, the source is avaliable and it seems a lot simpler then make. There is even an example of using jam to build an OpenBeOS kernel.
chase, I already know about jam. I've been programming for over 5 years, and I've tried several build systems. For OS development, I think mine is the best, and it's simple. I coded it up in two or three hours and it works beautifully. Whenever I'm not doing OS development, I won't touch anything but SCons.
Thanks for the tip anyway, if it was even directed toward me. I'm sure somebody on this board might like it.
Thanks for the tip anyway, if it was even directed toward me. I'm sure somebody on this board might like it.
- chase
- Site Admin
- Posts: 710
- Joined: Wed Oct 20, 2004 10:46 pm
- Libera.chat IRC: chase_osdev
- Location: Texas
- Discord: chase/matt.heimer
- Contact:
It was kinda for everybody but your post made me start thinking of build systems. I do a lot of Java development so I use Ant often but even though Ant can be used to invoke a C compiler it just doesn't sit well with me. I've never been happy/good with make. I'm still using shell scripts myself but when I came across jam it became an item on my todo list.deficite wrote:chase, I already know about jam. I've been programming for over 5 years, and I've tried several build systems. For OS development, I think mine is the best, and it's simple. I coded it up in two or three hours and it works beautifully. Whenever I'm not doing OS development, I won't touch anything but SCons.
Thanks for the tip anyway, if it was even directed toward me. I'm sure somebody on this board might like it.
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
I use ant with my own custom C/C++, ASM, and driver compiler tasks (admitantley, it would have been smarter to use the ant-contrib C compiler tasks, but I didn't know they existed at the time) and it works quite well.
I think ant is one of the better build systems for complex, multi-platform applications. It's quite powerful, especially when you delve into your own customized ant tasks (I've got one that dynamically builds a C string database from all the properties defined in the build system, allowing the kernel to be changed dynamically through simple property files).
--Jeff
I think ant is one of the better build systems for complex, multi-platform applications. It's quite powerful, especially when you delve into your own customized ant tasks (I've got one that dynamically builds a C string database from all the properties defined in the build system, allowing the kernel to be changed dynamically through simple property files).
--Jeff
- kenneth_phough
- Member
- Posts: 106
- Joined: Sun Sep 18, 2005 11:00 pm
- Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
- Contact:
I'm using Borland Pascal 7 on Dos/Win98SE. I have a bootloader that loads the compiled file by name AND I can run it from the DOS prompt. (Because I'm not using any DOS functaions, only BIOS functions at this time, I can run the same exe from the boot-loader.)
The nice thing about that is that it allows rapid testing/recompilation of the code. (In fact I don't have to leave the IDE to do a test-run.)
So far it's all in 16-bit Real mode at the moment, but BP7 can compile for protected mode as well, so I'm not too worried about that. I've already got it to the point where I can change screen modes, type in commands, and execte commands.
Right now I'm on the memory manager, and that shouldn't pose a big problem to my current run-ontop-of-DOS-and-test-booting occaisionally stratagy because DOS dosen't do any memory restrictions like that. So, the big problem for that is, as it should be, the implementation.
--------------
Admitedly, I would be using Delphi to do a 32-bit OS. But tht'll require my going in and rewriting the System.pas file, which I'm not ready to do. And besides, I can still learn a lot doing it in 16-bit object oriented BP7m which was the whole purpsoe of the project, to learn.
Oh, and if anyone wants a 4x4 bitmapped VGA font, I have one. (Though I don't see a lot of demand for it, someone might be interested in it.)
The nice thing about that is that it allows rapid testing/recompilation of the code. (In fact I don't have to leave the IDE to do a test-run.)
So far it's all in 16-bit Real mode at the moment, but BP7 can compile for protected mode as well, so I'm not too worried about that. I've already got it to the point where I can change screen modes, type in commands, and execte commands.
Right now I'm on the memory manager, and that shouldn't pose a big problem to my current run-ontop-of-DOS-and-test-booting occaisionally stratagy because DOS dosen't do any memory restrictions like that. So, the big problem for that is, as it should be, the implementation.
--------------
Admitedly, I would be using Delphi to do a 32-bit OS. But tht'll require my going in and rewriting the System.pas file, which I'm not ready to do. And besides, I can still learn a lot doing it in 16-bit object oriented BP7m which was the whole purpsoe of the project, to learn.
Oh, and if anyone wants a 4x4 bitmapped VGA font, I have one. (Though I don't see a lot of demand for it, someone might be interested in it.)
- chase
- Site Admin
- Posts: 710
- Joined: Wed Oct 20, 2004 10:46 pm
- Libera.chat IRC: chase_osdev
- Location: Texas
- Discord: chase/matt.heimer
- Contact:
What assembler is everybody using?
What assembler is everybody using?
I've used NASM the most with a little MASM, and an even smaller amount of GAS. Problem is that it seems NASM has been dropped again and the only semi-recent copy is at http://www.kernel.org/pub/software/devel/nasm/, MASM is M$, and I can't stand AT&T syntax so GAS isn't my favorite. I heard years ago that GAS as going to get support for intel syntax but I havn't seen anything about that since.
I've used NASM the most with a little MASM, and an even smaller amount of GAS. Problem is that it seems NASM has been dropped again and the only semi-recent copy is at http://www.kernel.org/pub/software/devel/nasm/, MASM is M$, and I can't stand AT&T syntax so GAS isn't my favorite. I heard years ago that GAS as going to get support for intel syntax but I havn't seen anything about that since.
You will not find a better Assembler than fasm, for OS dev:
http://board.flatassembler.net/
As that was what it was designed for, it well supported and very easy to port to your OS (less than a day for mine )
http://board.flatassembler.net/
As that was what it was designed for, it well supported and very easy to port to your OS (less than a day for mine )
- kenneth_phough
- Member
- Posts: 106
- Joined: Sun Sep 18, 2005 11:00 pm
- Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
- Contact:
kenneth wrote: I have a crazy question. Would it be possible to use the standard i/o library for my os?
have you seen Public Domain C Librarydeficite wrote:You pretty much have two options. You can write your own, or you can port a library to your OS. The design of my OS is going to leave me to write most of my standard library, but there are parts I'll port over.
solar has an OS independant, implementation of the standard C library -- with the design goal being OS independant as much as possible, with as little as possible required of the OSdever to implement it (many parts are completely independant, but some does require some work, but as little as possible -- iirc requires adding a few functions, but generally not modifying anything) and its PD so that means there are absolutely no restrictions on its use)
its listed as "pre-alpha" because the entire library isnt implemented yet
@chase:
i use nasm, though i dont know what i will do -- i intend to use 32bit and 64bit at the same time, mabey i will use masm