BootMe v0.01 Alpha

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply

Could this be a useful learning tool?

Yes
2
13%
Yes, but it needs more configurability
6
38%
Yes, but this is the wrong approach
2
13%
No
6
38%
 
Total votes: 16

User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

BootMe v0.01 Alpha

Post 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]
Attachments
BootMe.zip
(3.16 KiB) Downloaded 111 times
Last edited by 01000101 on Mon Jul 28, 2008 4:48 pm, edited 1 time in total.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: BootMe v0.01 Alpha

Post 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.
Attachments
gdt.txt
patch
(5.2 KiB) Downloaded 132 times
User avatar
stephenj
Member
Member
Posts: 140
Joined: Wed Jul 23, 2008 1:37 am
Location: Canada

Re: BootMe v0.01 Alpha

Post 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?
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: BootMe v0.01 Alpha

Post 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.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: BootMe v0.01 Alpha

Post 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.
Attachments
BootMe.zip
v0.01 Beta
(4.18 KiB) Downloaded 97 times
User avatar
Adek336
Member
Member
Posts: 129
Joined: Thu May 12, 2005 11:00 pm
Location: Kabaty, Warszawa
Contact:

Re: BootMe v0.01 Alpha

Post 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.
Post Reply