Wrote and posted kernel-101 documentation
Wrote and posted kernel-101 documentation
I wrote a 25-page long document on how to setup your first kernel in Word format and uploaded it to http://membres.lycos.fr/preludesoftware/osdev.doc (111kb) in Word 2000 format and osdev.txt (40kb) in plain text (which I quickly generated from Word).
It is mainly targeted to Windows users. It is a first draft and much more will be added in the next few days. I expect the document to include informations about a C++ kernel, a simple memory manager, a basic C++ standard library, using the mouse and keyboard and finally the FAT32 filesystem by the end of the month, so check often.
Those interested to be contacted for updates can email me at [email protected]. Ideas and critics are welcomed.
Preface
Introduction
1. What you need (basic tools, integrating cygwin tools in VC++ 6.0 IDE)
2. Your first kernel (very simple commented ASM kernel)
3. Compiling 'n linking (using make, NASM, ld with a commented script and objcopy)
4. The image (using grub, partcopy and winimage)
5. Bochs (using and configuring Bochs)
6. Booting (Unfinished, booting with Bochs)
It is mainly targeted to Windows users. It is a first draft and much more will be added in the next few days. I expect the document to include informations about a C++ kernel, a simple memory manager, a basic C++ standard library, using the mouse and keyboard and finally the FAT32 filesystem by the end of the month, so check often.
Those interested to be contacted for updates can email me at [email protected]. Ideas and critics are welcomed.
Preface
Introduction
1. What you need (basic tools, integrating cygwin tools in VC++ 6.0 IDE)
2. Your first kernel (very simple commented ASM kernel)
3. Compiling 'n linking (using make, NASM, ld with a commented script and objcopy)
4. The image (using grub, partcopy and winimage)
5. Bochs (using and configuring Bochs)
6. Booting (Unfinished, booting with Bochs)
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Wrote and posted kernel-101 documentation
what about a pdf version for lusers like me that have no decent .doc viewers linked to their browsers ?
::)
on page 5:
on page 8:
all in all, that seems to be rather a good document, probably more targetted at younger audience that tells step by step how to set up a OSdev'ing environment ...
maybe it lacks a "reference" section with all the download links, documentation centrals, etc.
::)
on page 5:
Actually, it's much more than a shell: it's a complete port of most development tools you use daily on a unix system (make, gcc, ld, less, info, and many many more)Cygwin is a Linux-like shell working on Windows.
on page 8:
are these slash's or backslash's ?Command
c:/bochs/bochs.exe
all in all, that seems to be rather a good document, probably more targetted at younger audience that tells step by step how to set up a OSdev'ing environment ...
maybe it lacks a "reference" section with all the download links, documentation centrals, etc.
Re:Wrote and posted kernel-101 documentation
All in all, good read so far.
But perhaps needlessly complicated in some places. Think about:
* why not use the Cygwin shell, but instead doing all that copying of Cygwin exe's to alternative locations?
* why download NASM for the measly couple of ASM lines - you already have GAS with GCC?
* why make the objdump wrapper into an executable, if all it does is an alias? A one-line DOS script or Cygwin-shell alias should suffice...
* you repeatedly mention C++, but the init.asm you describe doesn't jump into C++ code, and does nothing to provide C++ support.
Just think about the above. And, dude - what do you mean, a "basic C++ standard library"? I fear you're in for a rude surprise as to what that would entail. I'm just about to release my first throw at a freestanding C library (by definition a subset of the C++ lib), and boy, it ain't funny to go there... but the best of luck to you.
But perhaps needlessly complicated in some places. Think about:
* why not use the Cygwin shell, but instead doing all that copying of Cygwin exe's to alternative locations?
* why download NASM for the measly couple of ASM lines - you already have GAS with GCC?
* why make the objdump wrapper into an executable, if all it does is an alias? A one-line DOS script or Cygwin-shell alias should suffice...
* you repeatedly mention C++, but the init.asm you describe doesn't jump into C++ code, and does nothing to provide C++ support.
Just think about the above. And, dude - what do you mean, a "basic C++ standard library"? I fear you're in for a rude surprise as to what that would entail. I'm just about to release my first throw at a freestanding C library (by definition a subset of the C++ lib), and boy, it ain't funny to go there... but the best of luck to you.
Every good solution is obvious once you've found it.
Re:Wrote and posted kernel-101 documentation
Responding to tow posts here.
=======================================
Jonathan
Good point. I did that personally for some reasons, but they don't apply here.* why not use the Cygwin shell, but instead doing all that copying of Cygwin exe's to alternative locations?
Because I don't know about gas and the asm kernel will get bigger.why download NASM for the measly couple of ASM lines - you already have GAS with GCC?
A batchfile would do the job, good idea.why make the objdump wrapper into an executable, if all it does is an alias? A one-line DOS script or Cygwin-shell alias should suffice...
I know, give me a couple of days. I wrote that thing in 5 hours straight and much more is coming.you repeatedly mention C++, but the init.asm you describe doesn't jump into C++ code, and does nothing to provide C++ support.
I mean exactly that.Just think about the above. And, dude - what do you mean, a "basic C++ standard library"?
=======================================
I'll see what I can dowhat about a pdf version for lusers like me that have no decent .doc viewers linked to their browsers ?
I stick with slashes throughout the document, though I could change them all to backslashes. Yeah, good point, I'll do that.are these slash's or backslash's ?
Exactly, like I was a couple of months ago :)all in all, that seems to be rather a good document, probably more targetted at younger audience that tells step by step how to set up a OSdev'ing environment ...
Give me a couple of days and you'll have that.maybe it lacks a "reference" section with all the download links, documentation centrals, etc.
Jonathan
Re:Wrote and posted kernel-101 documentation
Just uploaded an update, still at http://membres.lycos.fr/preludesoftware/osdev.doc.
Pype.Clicker notified me that he made a PDF version of the document's first version at http://www.atlantisos.com/mirror/osdev_tut/osdev.pdf. Perhaps he will make another one for the update, I don't know.
By the way, I am searching for a free host where I could put the document in html format. Does anybody know about one?
Thanks,
Jonathan
Pype.Clicker notified me that he made a PDF version of the document's first version at http://www.atlantisos.com/mirror/osdev_tut/osdev.pdf. Perhaps he will make another one for the update, I don't know.
By the way, I am searching for a free host where I could put the document in html format. Does anybody know about one?
Thanks,
Jonathan
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Wrote and posted kernel-101 documentation
chances are that *candy* notified you, not me ...
Re:Wrote and posted kernel-101 documentation
<quote>
chances are that *candy* notified you, not me ...
</quote>
Your are quite right, I messed up the nicknames since you were the one who talked to me about a pdf version. Sorry for the troubles.
Jonathan
chances are that *candy* notified you, not me ...
</quote>
Your are quite right, I messed up the nicknames since you were the one who talked to me about a pdf version. Sorry for the troubles.
Jonathan
Re:Wrote and posted kernel-101 documentation
I got one problem.
I'm trying to link my files like the tutorial tells me to do
c:/utils/nasm.exe -f elf init.asm -o init.o ld -T link.ld -nostdlib -o kernel.tmp init.o
but i got this error:
nasm: error: more than one input file specified
nasm: error: unrecognised option `-T'
nasm: error: more than one input file specified
nasm: error: unrecognised option `-n'
nasm: error: more than one input file specified
I hope someone could help me
I'm trying to link my files like the tutorial tells me to do
c:/utils/nasm.exe -f elf init.asm -o init.o ld -T link.ld -nostdlib -o kernel.tmp init.o
but i got this error:
nasm: error: more than one input file specified
nasm: error: unrecognised option `-T'
nasm: error: more than one input file specified
nasm: error: unrecognised option `-n'
nasm: error: more than one input file specified
I hope someone could help me
Re:Wrote and posted kernel-101 documentation
that should be ld not nasm. your using a link command line with the assemblerc:/utils/nasm.exe -f elf init.asm -o init.o ld -T link.ld -nostdlib -o kernel.tmp init.o
-- Stu --
Re:Wrote and posted kernel-101 documentation
Just in case you didn't get it. That means that the above line is actually 2 seprate commands not a single one the first beingdf wrote:that should be ld not nasm. your using a link command line with the assemblerc:/utils/nasm.exe -f elf init.asm -o init.o ld -T link.ld -nostdlib -o kernel.tmp init.o
Code: Select all
c:/utils/nasm.exe -f elf init.asm -o init.o
Code: Select all
ld -T link.ld -nostdlib -o kernel.tmp init.o
Only Human
Re:Wrote and posted kernel-101 documentation
Not too bad at all. I myself am just a beginner to the os dev scene, and so I'm making an attempt to document the exact steps I took and the knowledge I learn, as I learn it, I'm writing in a tutorial-like format, as I go along so other people can read and hopefully follow it in the future. So far, it's looking very much like yours, only a bit more detailed. I guess you beat me to it More documentation and tutorials, however, are always welcome in the OS developement world I think.