[openbeos] Re: makebootable under linux

On 2005-11-29 at 22:08:15 [+0100], Stefano Ceccherini wrote:
> 
> Is there a way to compile and run our makebootable command under linux ?
> I was able to setup my modem under ubuntu and I'd like to do all my 
> development there...
> 
> I am able to build an haiku image, and I dd'ed that image to a partition, 
> but I need to make it bootable in some way...

makebootable compiles and runs under Linux (it is used when creating an 
image), but it only works for images there. makebootable writes the stage 
one boot loader onto the image/partition. Since the stage one boot loader 
can't find out which partition it resides on, makebootable has to write the 
offset of the partition into the code. For images this is simple, since the 
offset is 0, but for real partitions makebootable has to somehow find out. 
Under BeOS I knew the API for doing that and implemented it, but for Linux 
I didn't bother.

So, feel free to add that feature. Alternatively -- e.g. if it turns, that 
there is no simple API to get a partition offset -- you can add an command 
line option, that allows for specifying the offset. BTW, the offset is 
measured in 512 byte sectors, IIRC.

You might also want to consider to use an emulator like qemu instead of 
installing Haiku on a real partition. At least on my machine (3.2 GHz P4) 
Haiku doesn't exactly fly under qemu, but is nevertheless quite usable for 
testing, and the turn-around times when working on something are 
significantly shorter.

CU, Ingo

Other related posts: