i'm stuck in osdeving

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
GLneo
Member
Member
Posts: 237
Joined: Wed Dec 20, 2006 7:56 pm

i'm stuck in osdeving

Post by GLneo »

I would like to continue OSdeving but to do that I need to be able to load executables, but i need ~4 things that I don't want to do ( because i cant figure out what is wrong ) , these include:
my floppy driver: http://lemonos.cvs.sourceforge.net/lemo ... iew=markup
my FAT driver: http://lemonos.cvs.sourceforge.net/lemo ... iew=markup

and i need to change my compile script, so instead of makeboot it puts my kernel on a FAT floppy disk image. : http://lemonos.cvs.sourceforge.net/lemo ... iew=markup

also to boot my kernel of the FAT disk i will need to fix my bootloader: http://lemonos.cvs.sourceforge.net/lemo ... iew=markup

I hate to say just look at the code and fix it, but thats realy what i need now, hope you help! [-o< [-o< [-o<

thx!
ehird
Member
Member
Posts: 214
Joined: Thu Mar 15, 2007 8:48 am

Post by ehird »

No.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

I'm not the type to start working for you like that. You can however take parts of my code:
my floppy driver:
I dont have a working floppy driver. However, you can use grub, your own bootloader and the like to load a FAT formatted ramdisk. I consider floppies too troublesome to make half your system dependent on it...
My FAT driver
I have a 2-stage FAT-based bootloader (public domain). I apparently didnt bother to comment it as properly as most of my code so you'll have to figure out yourself what everything's good for. ATM it boots /stage3.bin, and loads /stage4.bin and /*.mos into a ramdisk, then jumps to the kernel at 0x80000. (Stage 1, Stage 2)
and i need to change my compile script, so instead of makeboot it puts my kernel on a FAT floppy disk image.
I have a makefile which does that for me (by typing make install)

browse my source tree and take what you want. I hope something there helps you with your quest.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
GLneo
Member
Member
Posts: 237
Joined: Wed Dec 20, 2006 7:56 pm

Post by GLneo »

thx Combuster! that would work, does any one have a FAT boot loader? or a way to write to a FAT image from windows command promt?

sorry for the blunt request for help :P
User avatar
mystran
Member
Member
Posts: 670
Joined: Thu Mar 08, 2007 11:08 am

Post by mystran »

GRUB is a pretty good bootloader and handles FAT among several other filesystems just fine. Floppies, harddrives, network boot... anything will do. Gets you to protected mode as well for free. :)
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
GLneo
Member
Member
Posts: 237
Joined: Wed Dec 20, 2006 7:56 pm

Post by GLneo »

well i figured out how to make a FAT image with my kernel, now i need to modify my bootsector to read kernel.sys from the image, and no GRUB, why write your own bootsecter when theres GRUB - why right your own OS when theres Linux? i like to learn, sorry for saying it so plainly it's just every one tells me to use GRUB :evil:
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

GLneo wrote:well i figured out how to make a FAT image with my kernel, now i need to modify my bootsector to read kernel.sys from the image, and no GRUB, why write your own bootsecter when theres GRUB - why right your own OS when theres Linux? i like to learn, sorry for saying it so plainly it's just every one tells me to use GRUB :evil:
People are recommending GRUB because it sorta suits you..

As for:
GLneo wrote:i like to learn, sorry for saying it so plainly it's just every one tells me to use GRUB :evil:
You just contradicted yourself.. You just asked people to write code for you.. :wink:
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
GLneo
Member
Member
Posts: 237
Joined: Wed Dec 20, 2006 7:56 pm

Post by GLneo »

O i just saw that :oops: :P well i was hoping people would find my bugs and show them to me, not write my OS, but i do want to write my OS so mabey just tutorials on FAT bootsecters :D
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Here are somethings that I found with just a quick search. I hope they help.

http://www.mohanraj.info/josh3.jsp and
http://www.nondot.org/~sabre/os/article ... otProcess/
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Post by bubach »

For the bootsector, have you tried john Fine's:
http://my.execpc.com/~geezer/johnfine/bootf02.zip

It loads from FAT to 1mb, sets up pmode and even paging before jumping. if you throw out the page code, you should get some free bytes for error handling or clean-ups.

i also think you should get the floppy driver working with only one 1.44 mb fdd before expanding it.
Post Reply