Build from the source and install it to the ssd

I am a new haiku user and try to write something into the haiku source code. But I don’t want to build it in my own Mac nor in the virtual machine(it is too hot when I launch the virtual machine in my Mac). So is it any way to build the source code and get a image which can be installed in the ssd by balenaEtcher?

When you build, it will automatically create an image that you can burn. However, burning an image will only create a partition the size of the image. These images are generally used to create an install media, USB stick, DVD, etc. Best method would be to build, burn the image to DVD or USB stick, and install from that. Or find a way to increase the image size.

You could create a USB stick from a default image, create an extra partition on it to serve as build environment and build natively. Doing things in the live boot isn’t too bad with Haiku, like in other systems.

You can change the size of the built image in userbuild config IIRC… and also point it at a partition and it will build it directly to the partition. I think this still works but I have not tested it in a long time. Also I only ever did this from Linux not a Mac.

You mean I can install the haiku system from the default image downloaded from the haiku website into my ssd, run it and build the source code in a haiku system?

Yes. Although the default image size won’t be large enough to contain everything including the base system, downloaded source, and run the build in the default image partition. It’s easy enough to get around this though. Just burn the system to the media, the boot into it and create a partition large enough to contain the source and run the build system. 5GB for this partition would be more than large enough for this. The only thing you’ll need to do then is git clone the haiku source into the new partition and run configure and jam. All the build tools are included in the base system, so you won’t need to get and build those unless you’re building 64 bit Haiku from 64 bit Haiku. If that’s the case, follow the instructions for cross compiling, eg: git clone buildtools and haiku. Then --build-cross-tools in your configure.

1 Like

Thank you very much! I think I get the idea!

1 Like