Page 1 of 1

BootMe v0.01 Alpha

Posted: Mon Jul 28, 2008 3:11 pm
by 01000101
Hey,
I started learning Ruby yesterday and as my first project I decided to make an automated bootloader generator. I would hope to have people use this as a learning tool where they can see their conceptual knowledge produce something that works, and they can later modify the produced source code once they have the programming knowledge to do so.

This is a very unfinished release and just asks how many floppy cylinders to load, stack stuff, and gdt questions. Soon I will be adding FS support instead of just raw sector loading. Remember, this is just my first project, so don't give TOO much critisism on the looks of the code.

This is released as public domain 'as-is' and I am waiving all liabilities/ownership. I would like it if you maintained the header though at least.

I personally like the Ruby language. The 'everything is an object' is kind of cool and has its uses.

Linux/Unix users can just

Code: Select all

./BootMe.rb
to start the script.
Windows users must install Ruby first and then run

Code: Select all

ruby BootMe.rb
[edit]oh, btw, all errors and general reports can be found in the generated BootMe.log[/edit]

Re: BootMe v0.01 Alpha

Posted: Mon Jul 28, 2008 3:27 pm
by 01000101
oops, I already needed to patch something. =)
Told you it was in the alpha stages 8) .

here's a fixed 'gdt.rb' file. just change the .txt extension to .rb

oh also, if you want to see if it will load your kernel, just remove the trailing hlt at the end of the generated assembly bootloader.

Re: BootMe v0.01 Alpha

Posted: Mon Jul 28, 2008 8:54 pm
by stephenj

Code: Select all

#!/usr/bin/ruby

puts <<ENDOFTEXT

Although Ruby isn't my favourite language, it is good at doing certain things.

When dealing with "large" strings in Ruby,
you may want to create blocks of text.

Like this one!

ENDOFTEXT
This is the Ruby feature I'd really recommend in your project (I'll leave looking at the bootloader code to someone more qualified).

Are you reading the poignant guide?

Re: BootMe v0.01 Alpha

Posted: Mon Jul 28, 2008 9:37 pm
by 01000101
that is a very interesting way of learning Ruby (the link you posted). I will keep looking into it as it seems to have some good material even if it is a bit... out there. =)

I learned what I know from the Pragmatic Programming Guide.

Re: BootMe v0.01 Alpha

Posted: Wed Jul 30, 2008 12:14 am
by 01000101
Hey, well despite the negative poll feedback and the obvious dislike of this experiment, I decided to keep building on it as it is both a learning tool for me (programming in ruby in Ubuntu) and I've now been using it personally as a tool to help speed the creation of custom bootloaders up.

This release of BootMe includes basic 1:1 mapped paging from user defined values. I also fixed alot of the hex->int conversions, so now enterring hex or decimal values will not matter.

Soon I will be adding user defined virt->phys mappings, and hopefully 64-bit support.

Any positive feedback or suggestions are welcome. If there is a way to improve the TUI to make things even easier or friendlier, I'd love to know.I like the Ruby language the more I use it.

Re: BootMe v0.01 Alpha

Posted: Sun Aug 03, 2008 12:19 pm
by Adek336
It's awesome! Being asked about segment conformities is so hilarious though :D

I think your program lacks comments to the asm code big time. If it is something to be learnt from, I'd suggest an option "Code commenting style: none, descriptions, tutorial" with the latter meaning some earlier prepared information on what the code does being inserted.

A README file'd be good to tell the user a few sensible configurations to start with.

Have you thought about mentioning this program at the bootloader related wiki articles?
I've now been using it personally as a tool to help speed the creation of custom bootloaders up.
You mean you create bootloaders all the time ? Why do you need more than one.