will 0xb8000 work with the bare GRUB loader?

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.
Kemp

Re:will 0xb8000 work with the bare GRUB loader?

Post by Kemp »

As a random thought, could it be that it doesn't support -i but simply ignores any parameters it doesn't understand? I haven't played with it myself so I wouldn't know, but I thought I'd throw it out there for someone who might be able to check.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:will 0xb8000 work with the bare GRUB loader?

Post by Pype.Clicker »

found a Fedora core where i could log on, tried the "mcopy -i <image> <sourcefile> ::" and it worked perfectly. Does it fail to work at your place or are you simply trying to find out what the commands should do before trying them ?

It just looks to me that the manpage is a bit outdated and doesn't reflect all the options of the program ...

http://mtools.linux.lu/mtools.html for a more detailed documentation of the mtools package ... or just "info mtools", as suggested by mcopy's manpage :
See Also
Mtools' texinfo doc

Viewing the texi doc
This manpage has been automatically generatedf rom mtools's texinfo documentation. (bla bla bla bla bla )
Moreover, not all information has been translated into the manpage version.
asmboozer

Re:will 0xb8000 work with the bare GRUB loader?

Post by asmboozer »

now i generated the floppy.img(grub binded with kernel.bin in boot, together with stage1,stage2,menu.cfg).
btw, i don't use mcopy.

i followed the http://www.osdev.org/osfaq2/index.php/GRUB and http://www.osdev.org/osfaq2/index.php/Disk%20Images%20Under%20Linux to generate my floppy.img.

now i have no time to think what to need do to generate a harddisk.img.

as i followed the tutoria(http://www.osdever.net/bkerndev/index.php?the_id=90

when I completed the following sections
Introduction
Getting Started
The basic kernel
Linking sources
Printing onscreen

the kernel works ok.

but if i added line
__asm__ __volatile__ ("sti");

before line
puts("Hello World!\n");

the emulation would reset again and again.

I don't know why.
paulbarker

Re:will 0xb8000 work with the bare GRUB loader?

Post by paulbarker »

If you don't have an IDT setup, that will most likely be a timer interrupt (at the default 18Hz or so) which cannot be handled.

If you do have an IDT, check it, double check it and then start looking at your exception handling.
Ryu

Re:will 0xb8000 work with the bare GRUB loader?

Post by Ryu »

Solar wrote:
You know the term "not-invented-here-syndrome"?

Of course you can start by writing your own assembler in order to write your own bootsector, design your own executable / object file format, write your own compiler, probably inventing a new programming language while you're at it.

Or you might have some nice design ideas and want to get past the booting stage into C/C++ space without having to implement the umpteenth boot sector.
In my opinion, ya just can't go on about and invent something without fundamental knowledge. A language is by all means not required to reinvent so that you can write up an OS, but knowledge by making a simple boot sector is one step further.
For people who does not know a thing in hardware level would be lost by just writing thier C/C++ codes in OS developement. How can one have "not-invented-here-syndrome" when theres lack of fundamental knowledge to be inventive. Its hard to find someone who can do cartwheels before they can walk.
Brendan wrote:
For someone who already knows these fundamentals, who has made their own choices and who has evaluated GRUB and found it suitable, using GRUB can save a lot of time, headaches, etc.
Yes.. right on the bullseye. At the same time however, GRUB can be more of a headache then writing up a bootsector when you don't have those fundamentals.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:will 0xb8000 work with the bare GRUB loader?

Post by Solar »

The point is that the two things - writing a bootloader and writing a kernel - do require quite similar skills, yet remain seperate fields of knowledge. And if you lack the required set of skills (like, DOS-level ASM coding), you could start with a bootloader, or with a command line calculator. Doesn't really matter.

It's like the thing about being good at maths. It certainly helps as it's closely related, but it's not exactly a prerequisite.
Every good solution is obvious once you've found it.
Post Reply