Hello all!
I've been lurking here a month or so now, and it is time to jump in, start a conversation, and do interesting things. I came up with a new-year's resolution that it's (well past) time for me to start writing an OS kernel of my own, for the educational experience. I'm two weeks into my own kernel (x86-64), finally got 64-bit code running last night.
First thing ... sources! I've tried to take periodic snapshots of the state of things, partly as my homage to version control (which I will use Real Soon Now...) and partly because I think being able to see how code evolves between daily snapshots is an excellent educational experience. Mistakes and all; most kernels work (for primitive definitions of work), but the makefile setups are evolving.
http://www.kscguru.net/osdev/
- kernel-00x is just me setting up a 32-bit baseline. GRUB bootloader installed on a bootable ISO image, with a tiny chunk of 32-bit code, printing some constants and Hello World. 884 lines of code.
- kernel-01x is the journey to 64-bit (plus a 64-bit build toolchain). There is a Makefile-toolchain that includes configure scripts to build NASM, binutils, and GCC, plus enough code to print Hello World in 64-bit. Presently 1721 lines of code (including build system), still a work in progress.
- caveat: I really am starting from scratch, some things look terrible. For example, the main Makefile is junk right now, switching to a maintainable build system is next on my list.
Up to here, not all that interesting - many of you have been working on your OS far longer than I have and have much more to show for it, though I bet some people as fresh as I am might appreciate watching a kernel codebase evolve and/or talking about some of the design decisions.
Now, for the interesting details.
I'm doing all this development on VMware Workstation. Saves on hardware wear-and-tear, avoids disk corruption, all good things for working on a hobby ... professionally, I'm a VMware employee. So (and ignoring rah-rah marketing speak - I'm an engineer, I don't care if you buy or not), I am intending to:
1) Update the OSDev VMware wiki page as much as possible with new things I'm finding useful. First up, documenting the options used to enable the built-in guest debugger gdb stub! I'll keep salesmanship out of it.
http://www.osdev.org/wiki/VMWare
2) Hang around and answer VMware questions (not in this thread!) - anyone else using VMware as a development platform? I'm not giving away company secrets and I'm not on-call, but I am looking up answers to my own questions, and could look up a few more answers while I'm at it. And if I can pass feedback to the product teams, so much the better.
3) General OS stuff - I've got questions, thoughts, and maybe a few answers. After all, my background is "kernel engineer." Most of us know modifying an existing kernel and starting from scratch have very different degrees of difficulty!
My kernel isn't for real use. It's an educational testbed for myself, which means I implement what I find interesting (and skip what I don't; filesystem support is a long way off). I'm also assuming a specific platform (64-bit system with VMware's device set), which means I am skipping lots of compatibility checks most real OSes would need.
Future directions for my kernel:
- Loadable kernel modules. This is my hobby, hobbies are about learning, and I want to learn how to write a dynamic linker.
- Loadable python kernel modules. Sounds cool to me ... ask in a few months if it's possible.
- THEN comes userspace.
Greetings, introduction, and some code
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Sounds like one of those 3am infomercials to me.....kscguru wrote:Saves on hardware wear-and-tear, avoids disk corruption, all good things for working on a hobby...
Contributions to the Wiki are obviously appreciated, but if most of what you add is "marketing speak", be prepared for flames.kscguru wrote:1) Update the OSDev VMware wiki page as much as possible with new things I'm finding useful. First up, documenting the options used to enable the built-in guest debugger gdb stub! I'll keep salesmanship out of it.
http://www.osdev.org/wiki/VMWare
You'll find out that most people here use Bochs or QEMU because of the decent debugging facilities provided.kscguru wrote: Hang around and answer VMware questions (not in this thread!) - anyone else using VMware as a development platform?
(Some of us "developer types" also like having the source code handy..).
Honestly the last version of VMWare I tried was 3.0, And guess what? As of 2008, That's still the only version that works on OpenBSD... via Linux binary emulation of coarse.
Personally, I'll stick with QEMU... but I'm sure someone else here will take you up on your offer.
Have fun
Updated. Suitably neutral for you? . As of a year ago VMware's debugger support is the equal of Bochs/QEMU; the device support is more real-world. I'm not here to be an advocate, but I also don't want to be on a site negative to my favorite because the VMware page is five-years out of date.Brynet-Inc wrote:You'll find out that most people here use Bochs or QEMU because of the decent debugging facilities provided.kscguru wrote: Hang around and answer VMware questions (not in this thread!) - anyone else using VMware as a development platform?
(Some of us "developer types" also like having the source code handy..).
I also know a technical forum like this is full of very sharp people where the sort of astroturfing marketing may prefer would have the opposite effect. Believe me, I know better.
It's a business decision - calculate the developer cost to make a port (~2 months of dedicated time per OS with a good Linux emulation to get it booting; ~1 year of dedicated time for stability + QA + tech support). All it takes is a business case. (How does one quantify community goodwill?)Brynet-Inc wrote:Honestly the last version of VMWare I tried was 3.0, And guess what? As of 2008, That's still the only version that works on OpenBSD... via Linux binary emulation of coarse.
The Workstation 3 era BSD port was someone who just hacked up the Linux kernel driver to work on BSD; I don't know why he stopped maintaining the port, but VMware never had anything to do with it. I know anyone doing a port and asking questions on VMware's forums would get questions answered. I keep hoping some bright college student with kernel experience will ask for an internship doing a port like that; nobody has asked yet.
Anyway, I digress. I would like a BSD port too.
You should persuade your company to go opensource...lol...
really, that is how you make applications "portable" if you port it to a *nix, and to Windows, and it is opensource, then the rest is usually taken care of by users/developers that can port the small stuff they need to...
Really, it's not practical to port to different OSs for closed source projects...so, I understand their point....
really, that is how you make applications "portable" if you port it to a *nix, and to Windows, and it is opensource, then the rest is usually taken care of by users/developers that can port the small stuff they need to...
Really, it's not practical to port to different OSs for closed source projects...so, I understand their point....
Though improbable, I don't see why that wouldn't be a smart business step for VMware. It's not as if they have the only emulator on the market, or as if their emulator is really all that special. By going open source, they could only make their emulator grow in popularity. With an enterprise edition in the spirit of Linux distros, they could offer more to those who wanted it, and freedom to all.hckr83 wrote:You should persuade your company to go opensource...lol...
Quite brilliant really, going to open source is; for most any company.
C8H10N4O2 | #446691 | Trust the nodes.
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
I use VMware 6.0 as my dev platform.
Just thought I'd say this.
-JL
Just thought I'd say this.
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io