flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Bootloader

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
DataHunter2009



Joined: 10 Jun 2005
Posts: 144
DataHunter2009 11 Aug 2005, 00:09
Actually, I think he meant "it's not the highest of priority". I mean, sure, you need a bootloader to run everything, but I think you should use a premade bootloader and write your kernel and then customize the loader later on to fit you OS's needs. I'm not saying that the bootloader isn't important, I'm only saying that it shouldn't be the first thing on your todo list. Very Happy
Post 11 Aug 2005, 00:09
View user's profile Send private message Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 11 Aug 2005, 00:58
Precisely. you can't make anything without a bootloader, but if there were no other way I could just use the raw disk with no filesystem. And it still wouldn't be the highest priority.

I'm not saying a bootloader is easier (or harder) than an OS, but in a way it is harder because you only have 510 bytes. With the kernel, you have as much space as you want, you can write the most inefficient (in the way of size) code and it's fairly easy.

Writing a bootloader is highly difficult when there's a file system, and you can't just map the disk out however you want. You have to search for the kernel, and do all the other important things - in 510 bytes!!!

Some people compare the OS to the bootloader, like you do Octavio
Quote:

Quote:
Because bootloaders are complex and difficult to make.

do you think that writing a OS is simple and easy?
i have been programing a OS for many years, and some boot loaders
for this OS, i just need a day of work to make a new boot loader.
But none of my boot loaders enters PMODE.

Quote:
Quote:
-Writing a bootloader requires a lot of arcane knowledge

The guy who whants to write a OS must have all this arcane knowledge.

but that's unfair. A bootloader is not an OS, it has a few important features that an OS provides, but with no organization (i.e., it has filesystem code but no organization- the filesystem code merely loads a file and executes it, without being arranged into systems, subsystems, system calls, levels, etc. It must do this in as little space as possible (unlike the OS, which can be very large). It's stupid to compare an OS with a bootloader, and say that anyone who can write an OS can write a bootloader, or anyone who can't write a bootloader can't write an OS.

_________________
FASM Rules!
OS Dev is fun!
Pepsi tastes nasty!
Some ants toot!
It's over!
Post 11 Aug 2005, 00:58
View user's profile Send private message AIM Address Reply with quote
FlashBurn



Joined: 06 Jan 2005
Posts: 87
FlashBurn 11 Aug 2005, 08:18
You are wrong that a bootloader is only 510bytes in size! This is what one call 1st stage which loads the 2nd stage of the bootloader. The 1st stage is only a bootsector which loads the real bootloader. So you can write a bootloader which can read many filesystems and you write then a bootsector for every supported filesystem.

If you want you can have a real memory manager in your bootloader and you can have a console and so on. And with this I would also say that a bootloader could be a little os! Especially when you write it in 32bit because then you would also need many drivers!

I´ve written and I´m still writing on my loader. I use an own loader because I need some special things and I wont mess with the multiboot specs. It is not that easy, but if you write one you will understand many things and you have to solve problems which you never would touch when you use a premade loader (e.g. a20gate).
Post 11 Aug 2005, 08:18
View user's profile Send private message Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 11 Aug 2005, 12:22
Quote:

mean, sure, you need a bootloader to run everything, but I think you should use a premade bootloader and write your kernel and then customize the loader later on to fit you OS's needs.

But you start building house with basement, not with the roof, yes? And you do not "rent" basement, you create your own.
Post 11 Aug 2005, 12:22
View user's profile Send private message ICQ Number Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 11 Aug 2005, 14:34
What do you, people, think of the Multiboot Specification by FSF? Why not to follow it? This could make things more organized, I think.
Post 11 Aug 2005, 14:34
View user's profile Send private message Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 11 Aug 2005, 16:57
You can use a second stage bootloader, but it can be pretty complex. I'd rather just use a single, 510-byte bootloader, and that's all! The only way using a second-stage bootloader would be more efficient is if I used a reserved sector, in the FAT. But then I would have to modify the entire disk, move everything down a sector. Using a single bootloader, 510 bytes, is much better, easier, and more efficient if you are using the FAT filesystem.

I plan to use GRUB, but it's complicated and for now I want a much simpler bootloader (such as the one I got).

The Kernel is the whole house, Night Rider. The bootloader only loads the "house" into memory. It is not the basement, the roof, the living room, the bathroom, or anything else. If someone can give you a bootloader for free, making your own is overkill and should be avoided. It's a waste of time. If you can't get a bootloader for free then, yes, making a bootloader is top priority. But if you can get a bootloader for free, then it's low priority, which is why I asked for one for free. Since you already made one, it won't take any extra effort. I'm not asking you to write something, I'm asking for some code you already made.

A few people are NICE to newbies, and don't try to start flamewars. You could be, too, even if you won't give me your bootloader.
Post 11 Aug 2005, 16:57
View user's profile Send private message AIM Address Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 11 Aug 2005, 19:05
Hm. I think OS(bootloader is a part of OS) is a whole house, and bootloader is a part of such building.
Stop the cold war, THEWizardGenius! I want be NICE to you, i swear.
I just say what i think!
Quote:

But if you can get a bootloader for free, then it's low priority

Just as i said - it becames not important when you have it. When we started talking, you had not. I promise, i will be more nice to you. Sory if i was impolite etc. I could give you mine, but it won't fit you, because it is made for my own FS.
Post 11 Aug 2005, 19:05
View user's profile Send private message ICQ Number Reply with quote
FlashBurn



Joined: 06 Jan 2005
Posts: 87
FlashBurn 11 Aug 2005, 21:00
Why do you need a reserved sector if you want a 2nd stage???
Post 11 Aug 2005, 21:00
View user's profile Send private message Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 11 Aug 2005, 21:05
You can cut FAT12 boot loader from Win98 boot diskette, for example. I have some disassembled (and ready to be compiled with fasm) MBRs (Win98 and OS/2), and some not yet disassembled images of boot sectors.

What about the priority of a boot loader - we can argue for eternity. As for me, I develop a boot manager, not OS. I don't like GRUB because it was made for unix-like systems and cannot be installed, for example, on FAT32 by default. You need to have a third-party installer. So I decided to create file_system-independent boot manager and use it Smile Hope it will support FAT32 and ext2 in late autumn, already.
Post 11 Aug 2005, 21:05
View user's profile Send private message Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 12 Aug 2005, 01:30
The alternative would be to load a file as the second stage bootloader, which would be useless since the whole point of the bootloader is to load a file, so we would therefore not need a second-stage bootloader at all. In FAT12 you can use the BPB to reserve some sectors directly following the boot sector; these can be used for second-stage bootloaders, instead of a whole file. IMHO if you are using a second-stage bootloader in a FAT file system this is the only way it would be efficient, or even useful.

Night Rider, I hope we can end this stupid argument- as zhak said, we can argue into eternity about priority. I'll respect your opinion, since I have a bootloader, and you can respect mine, since I'm no longer asking for a bootloader.
Post 12 Aug 2005, 01:30
View user's profile Send private message AIM Address Reply with quote
FlashBurn



Joined: 06 Jan 2005
Posts: 87
FlashBurn 12 Aug 2005, 08:16
You are right the task of a bootloader is to load a file, but try to load a file, move it over 1MiB, get the memory map, activate a20gate, init some needed hardware and jump to PMode in 510bytes! Also I need the 2nd stage because I need modules to be loaded and this couldn´t be done in 510bytes. If you write a bootsector for iso9660fs then you can do this all in the bootsector!
Post 12 Aug 2005, 08:16
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 12 Aug 2005, 11:47
Heres a good one for all you going on about BOOTLOADERS the 512b compo starts next month, why not make one for the compo and we can see which is the best or if you can fit all that in 512bytes.

I think bubach fited all that in his first bootloader Wink .
Post 12 Aug 2005, 11:47
View user's profile Send private message Reply with quote
DataHunter2009



Joined: 10 Jun 2005
Posts: 144
DataHunter2009 12 Aug 2005, 15:51
Quote:
But you start building house with basement, not with the roof, yes? And you do not "rent" basement, you create your own.

In case you haven't noticed, programming has nothing to do with houses or basements...

Comparing something in programming to how you build a house is not practical. I mean, people have their own styles when they make an OS. For example, I didn't make my bootloader first. I used one that someone gave me. Now, later on, I may write a new one. But when you are buildiung a house, everything has to be done in order. Basement -> Floor -> Walls -> Roof.

In OS programming can go:

Planning -> Bootloader -> Kernel
or
Planning -> Kernel -> Bootloader

So, as you can see, that anology was false. I just figured I would write a big rant becuase I need to calm down. Razz I just got out of a huge flame war with a bunch of 10 year olds who thought they were making an OS becuase their program ran on top of windows but had an OS look to it. *rolls eyes*
Post 12 Aug 2005, 15:51
View user's profile Send private message Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 12 Aug 2005, 18:07
Quote:

in programming to how you build a house is not practical.

Very practical. Forget it, we've finished arguing already.
Post 12 Aug 2005, 18:07
View user's profile Send private message ICQ Number Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 12 Aug 2005, 20:14
Quote:

I just got out of a huge flame war with a bunch of 10 year olds who thought they were making an OS becuase their program ran on top of windows but had an OS look to it.

Sounds pretty bad. Razz Where did that happen?
Post 12 Aug 2005, 20:14
View user's profile Send private message AIM Address Reply with quote
DataHunter2009



Joined: 10 Jun 2005
Posts: 144
DataHunter2009 12 Aug 2005, 20:51
The Game Maker forums. I used to use that program when I was young, so I go back once in awhile to see how stuff is goin. I alos like to test the new version to see what kind of changes they made to it.
Post 12 Aug 2005, 20:51
View user's profile Send private message Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 12 Aug 2005, 21:24
Quote:

I just got out of a huge flame war with a bunch of 10 year olds who thought they were making an OS becuase their program ran on top of windows but had an OS look to it

Interesting. I've met couple such projects Wink
Post 12 Aug 2005, 21:24
View user's profile Send private message ICQ Number Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 12 Aug 2005, 22:48
http://forums.gamemaker.nl/index.php?showtopic=133830&hl=

This the one you're talking about?

Don't these idiots know what an OS is?
Quote:
I'm making an OS... it will run on top of Windows...

This is a job for... OBVIOUS MAN!!!

'Nuff said.
Post 12 Aug 2005, 22:48
View user's profile Send private message AIM Address Reply with quote
Night Rider



Joined: 28 Jul 2005
Posts: 72
Night Rider 12 Aug 2005, 23:39
Show me those guys, i love to argue Very Happy
Post 12 Aug 2005, 23:39
View user's profile Send private message ICQ Number Reply with quote
Redragon



Joined: 27 Nov 2004
Posts: 101
Location: U.S.
Redragon 13 Aug 2005, 01:06
thats not the topic, but it is the right forum, i joined in with datahunter, we gave em a piece of our mind on things..

http://forums.gamemaker.nl/index.php?showtopic=138905

and here

http://forums.gamemaker.nl/index.php?act=ST&f=11&t=145149&st=20#entry1039648
Post 13 Aug 2005, 01:06
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.